aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPau Espin Pedrol <pespin@sysmocom.de>2019-09-06 14:22:31 +0200
committerPau Espin Pedrol <pespin@sysmocom.de>2019-09-06 14:33:59 +0200
commit1fba10409b542cf52655f70aea37efcf7c969f3c (patch)
treee717314d21b262590e4015b8595deb97ae40f82c
parent77f3396d0411c19f1846496e2c3e85e4ae6aa31f (diff)
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
-rw-r--r--Transceiver52M/Transceiver.cpp8
1 files changed, 4 insertions, 4 deletions
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 @@ bool Transceiver::driveTxPriorityQueue(size_t chan)
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 @@ void Transceiver::logRxBurst(size_t chan, const struct trx_ul_burst_ind *bi)
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)