1
0
mirror of https://bitbucket.org/librepilot/librepilot.git synced 2024-11-29 07:24:13 +01:00

LP-567 uavtalk: show object id has hex in log message

This commit is contained in:
Philippe Renon 2018-03-17 14:53:07 +01:00
parent d28cf2a070
commit 5c746fb28a

View File

@ -365,7 +365,7 @@ bool UAVTalk::processInputByte(quint8 rxbyte)
{ {
UAVObject *rxObj = objMngr->getObject(rxObjId); UAVObject *rxObj = objMngr->getObject(rxObjId);
if (rxObj == NULL && rxType != TYPE_OBJ_REQ) { if (rxObj == NULL && rxType != TYPE_OBJ_REQ) {
qWarning() << "UAVTalk - error : unknown object" << rxObjId; qWarning().noquote() << "UAVTalk - error : unknown object" << QString::number(rxObjId, 16).toUpper();
stats.rxErrors++; stats.rxErrors++;
rxState = STATE_ERROR; rxState = STATE_ERROR;
break; break;
@ -385,7 +385,7 @@ bool UAVTalk::processInputByte(quint8 rxbyte)
// Check length and determine next state // Check length and determine next state
if (rxLength >= MAX_PAYLOAD_LENGTH) { if (rxLength >= MAX_PAYLOAD_LENGTH) {
// packet error - exceeded payload max length // packet error - exceeded payload max length
qWarning() << "UAVTalk - error : exceeded payload max length" << rxObjId; qWarning().noquote() << "UAVTalk - error : exceeded payload max length" << QString::number(rxObjId, 16).toUpper();
stats.rxErrors++; stats.rxErrors++;
rxState = STATE_ERROR; rxState = STATE_ERROR;
break; break;
@ -394,7 +394,7 @@ bool UAVTalk::processInputByte(quint8 rxbyte)
// Check the lengths match // Check the lengths match
if ((rxPacketLength + rxLength) != packetSize) { if ((rxPacketLength + rxLength) != packetSize) {
// packet error - mismatched packet size // packet error - mismatched packet size
qWarning() << "UAVTalk - error : mismatched packet size" << rxObjId; qWarning().noquote() << "UAVTalk - error : mismatched packet size" << QString::number(rxObjId, 16).toUpper();
stats.rxErrors++; stats.rxErrors++;
rxState = STATE_ERROR; rxState = STATE_ERROR;
break; break;
@ -430,7 +430,7 @@ bool UAVTalk::processInputByte(quint8 rxbyte)
if (rxCS != rxCSPacket) { if (rxCS != rxCSPacket) {
// packet error - faulty CRC // packet error - faulty CRC
qWarning() << "UAVTalk - error : failed CRC check" << rxObjId; qWarning().noquote() << "UAVTalk - error : failed CRC check" << QString::number(rxObjId, 16).toUpper();
stats.rxCrcErrors++; stats.rxCrcErrors++;
rxState = STATE_ERROR; rxState = STATE_ERROR;
break; break;
@ -438,7 +438,7 @@ bool UAVTalk::processInputByte(quint8 rxbyte)
if (rxPacketLength != packetSize + CHECKSUM_LENGTH) { if (rxPacketLength != packetSize + CHECKSUM_LENGTH) {
// packet error - mismatched packet size // packet error - mismatched packet size
qWarning() << "UAVTalk - error : mismatched packet size" << rxObjId; qWarning().noquote() << "UAVTalk - error : mismatched packet size" << QString::number(rxObjId, 16).toUpper();
stats.rxErrors++; stats.rxErrors++;
rxState = STATE_ERROR; rxState = STATE_ERROR;
break; break;