repair OTA for battery devices without battery

This commit is contained in:
cyberman54 2020-12-26 18:15:56 +01:00
parent a243aae5bb
commit ea24958b50

View File

@ -251,10 +251,11 @@ uint8_t read_battlevel(mapFn_t mapFunction) {
bool batt_sufficient() {
#if (defined HAS_PMU || defined BAT_MEASURE_ADC || defined HAS_IP5306)
if (batt_level) // we have a battery voltage
return (batt_level > OTA_MIN_BATT);
#else
return true; // we don't know batt level
else
#endif
return true; // we don't know batt level
}
#ifdef HAS_IP5306