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
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)