Skip to content

Commit

Permalink
Fix Tel Sensor UI to display "Ratio" with 1 Decimal
Browse files Browse the repository at this point in the history
This makes it consistent with B&W UI and Companion.. Also is backward compatible, internally the value is stored as integer, only converted to PREC1 for display.
  • Loading branch information
frankiearzu authored and pfeerick committed Jan 6, 2024
1 parent ba0a6c7 commit 94051db
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion radio/src/gui/colorlcd/model_telemetry.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 94051db

Please sign in to comment.