Bug fixes for ISOTP and UDS interpretation.
This commit is contained in:
@@ -409,7 +409,7 @@ QString UDS_HANDLER::getDetailedMessageAnalysis(const UDS_MESSAGE &msg)
|
||||
if (dataLen > 1)
|
||||
{
|
||||
buildString.append("Data payload: ");
|
||||
for (int j = 1; j < dataLen; j++) buildString.append(Utility::formatHexNum(data[j]) + " ");
|
||||
for (int j = 2; j < dataLen; j++) buildString.append(Utility::formatHexNum(data[j]) + " ");
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -417,8 +417,8 @@ QString UDS_HANDLER::getDetailedMessageAnalysis(const UDS_MESSAGE &msg)
|
||||
buildString.append("Key sending for security level: " + QString::number(msg.subFunc - 1));
|
||||
if (dataLen > 1) //and it sure as hell should be!
|
||||
{
|
||||
buildString.append("KEY: ");
|
||||
for (int j = 1; j < dataLen; j++) buildString.append(Utility::formatHexNum(data[j]) + " ");
|
||||
buildString.append(" KEY: ");
|
||||
for (int j = 2; j < dataLen; j++) buildString.append(Utility::formatHexNum(data[j]) + " ");
|
||||
}
|
||||
}
|
||||
break;
|
||||
@@ -429,7 +429,7 @@ QString UDS_HANDLER::getDetailedMessageAnalysis(const UDS_MESSAGE &msg)
|
||||
if (dataLen > 1) //be kinda pointless if it weren't
|
||||
{
|
||||
buildString.append("SEED: ");
|
||||
for (int j = 1; j < dataLen; j++) buildString.append(Utility::formatHexNum(data[j]) + " ");
|
||||
for (int j = 2; j < dataLen; j++) buildString.append(Utility::formatHexNum(data[j]) + " ");
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -484,13 +484,13 @@ QString UDS_HANDLER::getDetailedMessageAnalysis(const UDS_MESSAGE &msg)
|
||||
break;
|
||||
case UDS_SERVICES::ROUTINE_CTRL:
|
||||
buildString.append("Routine Control: " + getLongDesc(UDS_ROUTINE_SUB, msg.subFunc));
|
||||
if (dataLen > 2)
|
||||
if (dataLen > 3)
|
||||
{
|
||||
int routineID;
|
||||
routineID = (data[1] * 256 + data[2]);
|
||||
routineID = (data[2] * 256 + data[3]);
|
||||
buildString.append("\nRoutine ID: " + Utility::formatHexNum(routineID));
|
||||
}
|
||||
if (dataLen > 3)
|
||||
if (dataLen > 4)
|
||||
{
|
||||
buildString.append("\nParameter bytes to routine: ");
|
||||
for (int i = 4; i < dataLen; i++)
|
||||
@@ -501,13 +501,13 @@ QString UDS_HANDLER::getDetailedMessageAnalysis(const UDS_MESSAGE &msg)
|
||||
break;
|
||||
case UDS_SERVICES::ROUTINE_CTRL + 0x40:
|
||||
buildString.append("Routine Control: " + getLongDesc(UDS_ROUTINE_SUB, msg.subFunc));
|
||||
if (dataLen > 2)
|
||||
if (dataLen > 3)
|
||||
{
|
||||
int routineID;
|
||||
routineID = (data[1] * 256 + data[2]);
|
||||
routineID = (data[2] * 256 + data[3]);
|
||||
buildString.append("\nRoutine ID: " + Utility::formatHexNum(routineID));
|
||||
}
|
||||
if (dataLen > 3)
|
||||
if (dataLen > 4)
|
||||
{
|
||||
buildString.append("\nBytes returned by routine: ");
|
||||
for (int i = 4; i < dataLen; i++)
|
||||
|
||||
Reference in New Issue
Block a user