testing for external battery block

This commit is contained in:
richonguzman 2024-08-19 10:41:46 -04:00
parent 9cc26ccdae
commit bd672857f4
3 changed files with 26 additions and 22 deletions

View File

@ -210,9 +210,11 @@ namespace BATTERY_Utils {
shouldSleepLowVoltage = true;
}
#endif
#ifndef HELTEC_WP
if (Config.battery.monitorExternalVoltage && checkExternalVoltage() < Config.battery.externalSleepVoltage + 0.1) {
shouldSleepLowVoltage = true;
}
#endif
if (shouldSleepLowVoltage) {
Utils::checkSleepByLowBatteryVoltage(0);
}

View File

@ -152,6 +152,7 @@ namespace Utils {
}
#endif
#ifndef HELTEC_WP
if (Config.battery.sendExternalVoltage || Config.battery.monitorExternalVoltage) {
float externalVoltage = BATTERY_Utils::checkExternalVoltage();
String externalVoltageInfo = String(externalVoltage,2) + "V";
@ -170,6 +171,7 @@ namespace Utils {
shouldSleepLowVoltage = true;
}
}
#endif
if (Config.aprs_is.active && Config.beacon.sendViaAPRSIS && !backUpDigiMode) {
displayShow(firstLine, secondLine, thirdLine, fourthLine, fifthLine, sixthLine, "SENDING IGATE BEACON", 0);