Add caching to the DBC signal system so that we can show all the

signals in overwrite mode.
This commit is contained in:
Collin Kidder
2019-03-11 20:53:45 -04:00
parent ef5f41644a
commit c9880be2c5
3 changed files with 24 additions and 10 deletions
+7 -1
View File
@@ -334,11 +334,17 @@ QVariant CANFrameModel::data(const QModelIndex &index, int role) const
for (int j = 0; j < msg->sigHandler->getCount(); j++)
{
QString sigString;
if (msg->sigHandler->findSignalByIdx(j)->processAsText(thisFrame, sigString))
DBC_SIGNAL* sig = msg->sigHandler->findSignalByIdx(j);
if (sig->processAsText(thisFrame, sigString))
{
tempString.append(sigString);
tempString.append("\n");
}
else if (sig->isMultiplexed && overwriteDups) //wasn't in this exact frame but is in the message. Use cached value
{
tempString.append(sig->makePrettyOutput(sig->cachedValue.toDouble(), sig->cachedValue.toLongLong()));
tempString.append("\n");
}
}
}
}