mirror of
https://github.com/dragonpilot/dragonpilot.git
synced 2026-07-20 04:12:05 +08:00
cabana: use raw signal value to match value descriptions (#28554)
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