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)
|
#if defined(STM32)
|
||||||
static void checkRTCBattery()
|
static void checkRTCBattery()
|
||||||
{
|
{
|
||||||
if (isVBatBridgeEnabled()) {
|
GET_ADC_IF_MIXER_NOT_RUNNING();
|
||||||
if (getRTCBatteryVoltage() < 200) {
|
if (getRTCBatteryVoltage() < 200) {
|
||||||
ALERT(STR_BATTERY, STR_WARN_RTC_BATTERY_LOW, AU_ERROR);
|
ALERT(STR_BATTERY, STR_WARN_RTC_BATTERY_LOW, AU_ERROR);
|
||||||
}
|
|
||||||
disableVBatBridge();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
@@ -752,8 +750,11 @@ void checkAll()
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(STM32)
|
#if defined(STM32)
|
||||||
if (!g_eeGeneral.disableRtcWarning)
|
if (isVBatBridgeEnabled() && !g_eeGeneral.disableRtcWarning) {
|
||||||
|
// only done once at board start
|
||||||
checkRTCBattery();
|
checkRTCBattery();
|
||||||
|
}
|
||||||
|
disableVBatBridge();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(COLORLCD)
|
#if defined(COLORLCD)
|
||||||
|
|||||||
Reference in New Issue
Block a user