RTC bridge fix (#360)
* RTC bridge fix Merged code by @bsongis from https://github.com/opentx/opentx/pull/8577
This commit is contained in:
@@ -694,11 +694,9 @@ void checkMultiLowPower()
|
||||
#if defined(STM32)
|
||||
static void checkRTCBattery()
|
||||
{
|
||||
if (isVBatBridgeEnabled()) {
|
||||
if (getRTCBatteryVoltage() < 200) {
|
||||
ALERT(STR_BATTERY, STR_WARN_RTC_BATTERY_LOW, AU_ERROR);
|
||||
}
|
||||
disableVBatBridge();
|
||||
GET_ADC_IF_MIXER_NOT_RUNNING();
|
||||
if (getRTCBatteryVoltage() < 200) {
|
||||
ALERT(STR_BATTERY, STR_WARN_RTC_BATTERY_LOW, AU_ERROR);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
@@ -752,8 +750,11 @@ void checkAll()
|
||||
#endif
|
||||
|
||||
#if defined(STM32)
|
||||
if (!g_eeGeneral.disableRtcWarning)
|
||||
if (isVBatBridgeEnabled() && !g_eeGeneral.disableRtcWarning) {
|
||||
// only done once at board start
|
||||
checkRTCBattery();
|
||||
}
|
||||
disableVBatBridge();
|
||||
#endif
|
||||
|
||||
#if defined(COLORLCD)
|
||||
|
||||
Reference in New Issue
Block a user