|
|
|
@ -6778,7 +6778,10 @@ void display_bar_float(const char* title, float value, float factor, int32_t min |
|
|
|
|
|
|
|
|
|
// Value
|
|
|
|
|
display.setCursor(LCD_cols - size, 1); |
|
|
|
|
display_float(value * factor, size_number, size_fraction, zeros, false, sign); // TBD
|
|
|
|
|
//display_float(value * factor, size_number, size_fraction, zeros, false, sign); // does not work with "Smallest code" optimizer
|
|
|
|
|
char s[LCD_cols + 1]; |
|
|
|
|
snprintf_P(s, strlen(s), PSTR("%+1.1f"), value * factor); // not so good solution, but works with optimizer
|
|
|
|
|
display.print(s); |
|
|
|
|
|
|
|
|
|
// Bar
|
|
|
|
|
display.setCursor(0, 1); |
|
|
|
@ -6833,7 +6836,10 @@ void display_meter_float(const char* title, float value, float factor, float off |
|
|
|
|
|
|
|
|
|
// Value
|
|
|
|
|
display.setCursor(LCD_cols - size, 1); |
|
|
|
|
display_float((value + offset) * factor, size_number, size_fraction, zeros, false, sign); |
|
|
|
|
//display_float((value + offset) * factor, size_number, size_fraction, zeros, false, sign); // does not work with "Smallest code" optimizer
|
|
|
|
|
char s[LCD_cols + 1]; |
|
|
|
|
snprintf_P(s, strlen(s), PSTR("%+1.1f"), (value + offset) * factor); // not so good solution, but works with optimizer
|
|
|
|
|
display.print(s); |
|
|
|
|
|
|
|
|
|
// Bar
|
|
|
|
|
display.setCursor(0, 1); |
|
|
|
|