Battery SOC fix display 100%
This commit is contained in:
parent
c2e715f1cf
commit
8e349b96b4
|
@ -202,7 +202,15 @@ void display_screen_battery(float battery_voltage, float battery_amps, float bat
|
||||||
display.setCursor(72,28); display.print(battery_amps,1); display.print("A");
|
display.setCursor(72,28); display.print(battery_amps,1); display.print("A");
|
||||||
display.setCursor(72,38); display.print(battery_wattage,0); display.print("W");
|
display.setCursor(72,38); display.print(battery_wattage,0); display.print("W");
|
||||||
display.setFont(u8g2_font_inr19_mf);
|
display.setFont(u8g2_font_inr19_mf);
|
||||||
display.setCursor(70,63); display.print(battery_soc,0); display.print("%");
|
if (battery_soc = 100)
|
||||||
|
{
|
||||||
|
display.setCursor(65,63);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
display.setCursor(70,63);
|
||||||
|
}
|
||||||
|
display.print(battery_soc,0); display.print("%");
|
||||||
display.setFont(u8g2_font_6x10_tr);
|
display.setFont(u8g2_font_6x10_tr);
|
||||||
int batt_fill_y = map(battery_soc, 0, 100, 62, 37);
|
int batt_fill_y = map(battery_soc, 0, 100, 62, 37);
|
||||||
int batt_fill_height = map(battery_soc, 0, 100, 0, 25);
|
int batt_fill_height = map(battery_soc, 0, 100, 0, 25);
|
||||||
|
|
Loading…
Reference in a new issue