fix: Properly scale PREC2 sensor values using "ratio" (#4083)

This commit is contained in:
Frankie Arzu
2024-01-07 10:19:17 +10:00
committed by GitHub
parent 1daa5526c5
commit 526a87e1f1
2 changed files with 6 additions and 2 deletions
+2 -1
View File
@@ -671,7 +671,8 @@ class SensorEditWindow : public Page {
paramLines[P_RATIO] = form->newLine(&grid);
new StaticText(paramLines[P_RATIO], rect_t{}, STR_RATIO, 0, COLOR_THEME_PRIMARY1);
auto edit = new NumberEdit(paramLines[P_RATIO], rect_t{}, 0, 30000, GET_SET_DEFAULT(sensor->custom.ratio));
auto edit = new NumberEdit(paramLines[P_RATIO], rect_t{}, 0, 30000, GET_SET_DEFAULT(sensor->custom.ratio),
0, PREC1);
edit->setZeroText("-");
paramLines[P_CELLINDEX] = form->newLine(&grid);