Change in ...osmo-trx[master]: Transceiver: Fix logging TN and version

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

pespin gerrit-no-reply at lists.osmocom.org
Fri Sep 6 13:06:23 UTC 2019


pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-trx/+/15433


Change subject: Transceiver: Fix logging TN and version
......................................................................

Transceiver: Fix logging TN and version

Since tn is declared as uint8_t, it's actually a char, and by default
c++'s ostream& operator<<(ostream&, unsigned char) tries to print chars
with its ASCII visible character instead of numeric value.

Change-Id: I534158e8e1719ad19a9cde7c747a8f8ad5a01a2b
---
M Transceiver52M/Transceiver.cpp
1 file changed, 4 insertions(+), 4 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-trx refs/changes/33/15433/1

diff --git a/Transceiver52M/Transceiver.cpp b/Transceiver52M/Transceiver.cpp
index 590101c..0583998 100644
--- a/Transceiver52M/Transceiver.cpp
+++ b/Transceiver52M/Transceiver.cpp
@@ -968,12 +968,12 @@
   case 1:
     break;
   default:
-    LOG(ERR) << "Rx TRXD message with unknown header version " << dl->common.version;
+    LOG(ERR) << "Rx TRXD message with unknown header version " << unsigned(dl->common.version);
     return false;
   }
 
-  LOG(DEBUG) << "Rx TRXD message (hdr_ver=" << dl->common.version << "): "
-             << "fn=" << fn << ", tn=" << dl->common.tn << ", "
+  LOG(DEBUG) << "Rx TRXD message (hdr_ver=" << unsigned(dl->common.version) << "): "
+             << "fn=" << fn << ", tn=" << unsigned(dl->common.tn) << ", "
              << "burst_len=" << burstLen;
 
   BitVector newBurst(burstLen);
@@ -1018,7 +1018,7 @@
 
   LOG(DEBUG) << std::fixed << std::right
     << " chan: "   << chan
-    << " time: "   << bi->tn << ":" << bi->fn
+    << " time: "   << unsigned(bi->tn) << ":" << bi->fn
     << " RSSI: "   << std::setw(5) << std::setprecision(1) << (bi->rssi - rssiOffset)
                    << "dBFS/" << std::setw(6) << -bi->rssi << "dBm"
     << " noise: "  << std::setw(5) << std::setprecision(1) << (bi->noise - rssiOffset)

-- 
To view, visit https://gerrit.osmocom.org/c/osmo-trx/+/15433
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-trx
Gerrit-Branch: master
Gerrit-Change-Id: I534158e8e1719ad19a9cde7c747a8f8ad5a01a2b
Gerrit-Change-Number: 15433
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin at sysmocom.de>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20190906/65684c7f/attachment.htm>


More information about the gerrit-log mailing list