Fix: Battery value show up on wrong screen.
Should not be seen on RDS & AF screen
This commit is contained in:
+2
-1
@@ -5085,13 +5085,13 @@ void ShowBattery() {
|
|||||||
batteryold = battery;
|
batteryold = battery;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!advancedRDS && !afscreen) {
|
||||||
if (batteryoptions > BATTERY_NONE) {
|
if (batteryoptions > BATTERY_NONE) {
|
||||||
batteryV = ((float)v / 4095.0) * 2.0 * 3.3 * (vref / 1000.0);
|
batteryV = ((float)v / 4095.0) * 2.0 * 3.3 * (vref / 1000.0);
|
||||||
if (batteryoptions == BATTERY_VALUE){
|
if (batteryoptions == BATTERY_VALUE){
|
||||||
if (batteryV < BATTERY_LOW_VALUE) return;
|
if (batteryV < BATTERY_LOW_VALUE) return;
|
||||||
|
|
||||||
tftPrint(-1, String(batteryVold,1), 213, 163, BackgroundColor, BackgroundColor, FONT16);
|
tftPrint(-1, String(batteryVold,1), 213, 163, BackgroundColor, BackgroundColor, FONT16);
|
||||||
|
|
||||||
tftPrint(-1, String(batteryV,1), 213, 163, PrimaryColor, PrimaryColorSmooth, FONT16);
|
tftPrint(-1, String(batteryV,1), 213, 163, PrimaryColor, PrimaryColorSmooth, FONT16);
|
||||||
tftPrint(-1, "V", 232, 163, PrimaryColor, PrimaryColorSmooth, FONT16);
|
tftPrint(-1, "V", 232, 163, PrimaryColor, PrimaryColorSmooth, FONT16);
|
||||||
batteryVold = batteryV;
|
batteryVold = batteryV;
|
||||||
@@ -5109,6 +5109,7 @@ void ShowBattery() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void Communication() {
|
void Communication() {
|
||||||
if (menu == false) {
|
if (menu == false) {
|
||||||
|
|||||||
Reference in New Issue
Block a user