Formatting
This commit is contained in:
+3
-2
@@ -5092,16 +5092,17 @@ void ShowBattery() {
|
||||
if (batteryV < BATTERY_LOW_VALUE) return;
|
||||
|
||||
tftPrint(-1, String(batteryVold,1), 213, 163, BackgroundColor, BackgroundColor, FONT16);
|
||||
|
||||
tftPrint(-1, String(batteryV,1), 213, 163, PrimaryColor, PrimaryColorSmooth, FONT16);
|
||||
tftPrint(-1, "V", 232, 163, PrimaryColor, PrimaryColorSmooth, FONT16);
|
||||
batteryVold = batteryV;
|
||||
} else if (batteryoptions == BATTERY_PERCENT) {
|
||||
float vPer = 0.0;
|
||||
vPer = (batteryPold - BATTERY_LOW_VALUE)/(BATTERY_FULL_VALUE - BATTERY_LOW_VALUE);
|
||||
vPer = (batteryPold - BATTERY_LOW_VALUE) / (BATTERY_FULL_VALUE - BATTERY_LOW_VALUE);
|
||||
if (vPer >= 1) vPer = 1;
|
||||
tftPrint(-1, String(vPer * 100, 0), 213, 163, BackgroundColor, BackgroundColor, FONT16);
|
||||
|
||||
vPer = (batteryV - BATTERY_LOW_VALUE)/(BATTERY_FULL_VALUE - BATTERY_LOW_VALUE);
|
||||
vPer = (batteryV - BATTERY_LOW_VALUE) / (BATTERY_FULL_VALUE - BATTERY_LOW_VALUE);
|
||||
if (vPer >= 1) vPer = 1;
|
||||
tftPrint(-1, String(vPer * 100, 0), 213, 163, PrimaryColor, PrimaryColorSmooth, FONT16);
|
||||
tftPrint(-1, "%", 230, 163, PrimaryColor, PrimaryColorSmooth, FONT16);
|
||||
|
||||
Reference in New Issue
Block a user