Added DBC signal value table strings to graphs of signals with value
tables, incremented version number.
This commit is contained in:
@@ -180,6 +180,22 @@ bool DBC_SIGNAL::processAsText(const CANFrame &frame, QString &outString, bool o
|
||||
return true;
|
||||
}
|
||||
|
||||
bool DBC_SIGNAL::getValueString(int64_t intVal, QString &outString)
|
||||
{
|
||||
if (valList.count() > 0) //if this is a value list type then look it up and display the proper string
|
||||
{
|
||||
for (int x = 0; x < valList.count(); x++)
|
||||
{
|
||||
if (valList.at(x).value == intVal)
|
||||
{
|
||||
outString = valList.at(x).descript;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
QString DBC_SIGNAL::makePrettyOutput(double floatVal, int64_t intVal, bool outputName, bool isInteger)
|
||||
{
|
||||
QString outputString;
|
||||
|
||||
@@ -115,6 +115,7 @@ public: //TODO: this is sloppy. It shouldn't all be public!
|
||||
bool processAsText(const CANFrame &frame, QString &outString, bool outputName = true);
|
||||
bool processAsInt(const CANFrame &frame, int32_t &outValue);
|
||||
bool processAsDouble(const CANFrame &frame, double &outValue);
|
||||
bool getValueString(int64_t intVal, QString &outString);
|
||||
QString makePrettyOutput(double floatVal, int64_t intVal, bool outputName = true, bool isInteger = false);
|
||||
QString processSignalTree(const CANFrame &frame);
|
||||
DBC_ATTRIBUTE_VALUE *findAttrValByName(QString name);
|
||||
|
||||
Reference in New Issue
Block a user