Index: sources/canbus/messagebuilder.cpp =================================================================== diff -u -r561055268da68e24fe91a1148b76bf1785dae14d -r9392f5be540bb428dc64757ef2e50a4d4e5090a8 --- sources/canbus/messagebuilder.cpp (.../messagebuilder.cpp) (revision 561055268da68e24fe91a1148b76bf1785dae14d) +++ sources/canbus/messagebuilder.cpp (.../messagebuilder.cpp) (revision 9392f5be540bb428dc64757ef2e50a4d4e5090a8) @@ -89,7 +89,7 @@ vPayload += (mAction >> 8) & 0xFF;//high byte vPayload += mAction & 0xFF;// low byte } else { - QString mHexString = Format::toHexString(vAction, false, 3); + QString mHexString = Format::toHexString(vAction, false, eLenMessageIDDigits); qDebug() << "ERROR :" << tr("Incorrect Action ID '%1'").arg(mHexString); return false; } @@ -117,7 +117,7 @@ } } if (vData.length() < len) { - QString mHexString = Format::toHexString(vAction, false, 3); + QString mHexString = Format::toHexString(vAction, false, eLenMessageIDDigits); qDebug() << "ERROR :" << tr("Not enough data has been provided for the Message ID '%1'").arg(mHexString); qDebug() << vData.toHex('.'); return false; @@ -232,8 +232,8 @@ quint8 mBeenRead = 0; if ( ! checkCRC(crcData, mExpected, mBeenRead ) ) { // CRC is always next byte after Data qDebug() << "ERROR :" << tr("CRC error, expected %1 but got %2") - .arg(Format::toHexString(mExpected, true, 2)) - .arg(Format::toHexString(mBeenRead, true, 2)); + .arg(Format::toHexString(mExpected, true, eLenCRCDigits)) + .arg(Format::toHexString(mBeenRead, true, eLenCRCDigits)); return false; } } @@ -385,10 +385,10 @@ byteList[i] = QByteArray("\033[36m") + byteList[i].constData() + QByteArray("\033[0m"); } } - view = Format::toHexString(vCan_Id, false, 3).toLatin1() + " " + byteList.join('.'); + view = Format::toHexString(vCan_Id, false, eLenChannelDigits).toLatin1() + " " + byteList.join('.'); fprintf(stderr, "%s\n", view.constData()); } else { - view = Format::toHexString(vCan_Id, false, 3).toLatin1() + " " + vPayload.toHex('.'); + view = Format::toHexString(vCan_Id, false, eLenChannelDigits).toLatin1() + " " + vPayload.toHex('.'); fprintf(stderr, "%s\n", view.constData()); } }