fix: RTC warning not being shown (#5209)

This commit is contained in:
Peter Feerick
2024-06-23 18:46:53 +10:00
committed by GitHub
parent 0d6d35ef02
commit 22114a67fa
4 changed files with 13 additions and 9 deletions
+6 -4
View File
@@ -61,6 +61,8 @@ RadioHardwarePage::RadioHardwarePage() :
enableVBatBridge();
}
void RadioHardwarePage::checkEvents() { enableVBatBridge(); }
void RadioHardwarePage::cleanup()
{
disableVBatBridge();
@@ -134,11 +136,11 @@ static SetupLineDef setupLines[] = {
GET_SET_INVERTED(g_eeGeneral.disableRtcWarning));
// RTC Batt display
std::string s(STR_VALUE);
s += " ";
new DynamicNumber<uint16_t>(
parent, {x + ToggleSwitch::TOGGLE_W + PAD_SMALL, y + PAD_SMALL + 1, 0, 0}, [] { return getRTCBatteryVoltage(); },
COLOR_THEME_PRIMARY1 | PREC2, s.c_str(), "V");
parent,
{x + ToggleSwitch::TOGGLE_W + PAD_LARGE, y + PAD_SMALL + 1, 0, 0},
[] { return getRTCBatteryVoltage(); }, COLOR_THEME_PRIMARY1 | PREC2,
"", "V");
}
},
{
+2
View File
@@ -25,6 +25,8 @@
class RadioHardwarePage : public PageTab
{
void checkEvents() override;
public:
RadioHardwarePage();
+4 -4
View File
@@ -624,7 +624,7 @@ static void checkFailsafe()
#endif
#if defined(GUI)
void checkAll()
void checkAll(bool isBootCheck)
{
#if defined(EEPROM_RLC) && !defined(SDCARD_RAW) && !defined(SDCARD_YAML)
checkLowEEPROM();
@@ -640,9 +640,9 @@ void checkAll()
checkSwitches();
checkFailsafe();
if (isVBatBridgeEnabled() && !g_eeGeneral.disableRtcWarning) {
if (isBootCheck && !g_eeGeneral.disableRtcWarning) {
// only done once at board start
enableVBatBridge();
checkRTCBattery();
}
disableVBatBridge();
@@ -1533,7 +1533,7 @@ void edgeTxInit()
}
else if (!(startOptions & OPENTX_START_NO_CHECKS)) {
checkAlarm();
checkAll();
checkAll(true);
PLAY_MODEL_NAME();
}
#endif // defined(GUI)
+1 -1
View File
@@ -355,7 +355,7 @@ void checkLowEEPROM();
void checkThrottleStick();
void checkSwitches();
void checkAlarm();
void checkAll();
void checkAll(bool isBootCheck = false);
void getADC();