laforge has submitted this change and it was merged. (
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(-)
Approvals:
Jenkins Builder: Verified
laforge: Looks good to me, approved
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 <[email protected]>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <[email protected]>
Gerrit-MessageType: merged