From 1c18f49ddfef32b3e7c29ce682f8c65ba1329519 Mon Sep 17 00:00:00 2001 From: Collin Kidder Date: Sun, 6 Aug 2017 19:29:27 -0400 Subject: [PATCH] Fixed an issue with DBC value table based signals --- dbc/dbc_classes.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/dbc/dbc_classes.cpp b/dbc/dbc_classes.cpp index 9d0a14e..465b2b2 100644 --- a/dbc/dbc_classes.cpp +++ b/dbc/dbc_classes.cpp @@ -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)