Fixed an issue with DBC value table based signals

This commit is contained in:
Collin Kidder
2017-08-06 19:29:27 -04:00
parent 2d01f695e2
commit 1c18f49ddf
+8 -1
View File
@@ -95,9 +95,16 @@ bool DBC_SIGNAL::processAsText(const CANFrame &frame, QString &outString)
if (valList.count() > 0) //if this is a value list type then look it up and display the proper string
{
bool foundVal = false;
for (int x = 0; x < valList.count(); x++)
{
if (valList.at(x).value == result) outputString += valList.at(x).descript;
if (valList.at(x).value == result)
{
outputString += valList.at(x).descript;
foundVal = true;
break;
}
if (!foundVal) outputString += QString::number(endResult) + unitName;
}
}
else //otherwise display the actual number and unit (if it exists)