cabana: use raw signal value to match value descriptions (#28554)
old-commit-hash: 6f54ebe1103c7960afcd2f3f550e56ba9a7e4667
This commit is contained in:
@@ -131,8 +131,9 @@ void cabana::Signal::update() {
|
||||
|
||||
QString cabana::Signal::formatValue(double value) const {
|
||||
// Show enum string
|
||||
int64_t raw_value = (value - offset) / factor;
|
||||
for (const auto &[val, desc] : val_desc) {
|
||||
if (std::abs(value - val) < 1e-6) {
|
||||
if (std::abs(raw_value - val) < 1e-6) {
|
||||
return desc;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user