fix: multiplexed value display to not jump all around

- feat: now have a array to cache values and always display them in the
  order in the DBC, also keep track of which values are not stale to not
display 0 on init
This commit is contained in:
Refuhr
2026-07-06 16:18:13 +02:00
parent 863192ddef
commit 137508392a
2 changed files with 26 additions and 11 deletions
+5
View File
@@ -4,6 +4,7 @@
#include <QAbstractTableModel>
#include <QList>
#include <QVector>
#include <QHash>
#include <QDebug>
#include <QMutex>
#include "can_structs.h"
@@ -89,6 +90,10 @@ private:
QMap<int, bool> filters;
QMap<int, bool> busFilters;
DBCHandler *dbcHandler;
//model-owned cache of the last rendered text for each signal, used to keep multiplexed
//signals from other branches visible. Kept separate from DBC_SIGNAL::cachedValue so that
//other windows decoding the same signal can't clobber what this view shows.
mutable QHash<DBC_SIGNAL *, QString> sigDisplayCache; //mutable: updated from const data()
QMutex mutex;
bool interpretFrames; //should we use the dbcHandler?
bool overwriteDups; //should we display all frames or only the newest for each ID?