Add low power warning

This commit is contained in:
3djc
2019-09-21 08:54:15 +02:00
parent 70914e4615
commit 0afa5ab2e6
14 changed files with 32 additions and 0 deletions
+19
View File
@@ -838,6 +838,21 @@ void checkSDVersion()
}
#endif
#if defined(MULTIMODULE)
void checkMultiLowPower()
{
if(isModuleMultimodule(EXTERNAL_MODULE) && g_model.moduleData[EXTERNAL_MODULE].multi.lowPowerMode) {
ALERT("MULTI", STR_WARN_MULTI_LOWPOWER, AU_ERROR);
return;
}
#if defined(INTERNAL_MODULE_MULTI)
if(isModuleMultimodule(INTERNAL_MODULE) && g_model.moduleData[INTERNAL_MODULE].multi.lowPowerMode) {
ALERT("MULTI", STR_WARN_MULTI_LOWPOWER, AU_ERROR);
}
#endif
}
#endif
#if defined(STM32)
static void checkRTCBattery()
{
@@ -901,6 +916,10 @@ void checkAll()
readModelNotes();
}
#if defined(MULTIMODULE)
checkMultiLowPower();
#endif
if (!waitKeysReleased()) {
showMessageBox(STR_KEYSTUCK);
tmr10ms_t tgtime = get_tmr10ms() + 500;
+1
View File
@@ -354,6 +354,7 @@ const char STR_SWITCHWARN[] = TR_SWITCHWARN;
const char STR_FAILSAFEWARN[] = TR_FAILSAFEWARN;
const char STR_WRONG_SDCARDVERSION[] = TR_WRONG_SDCARDVERSION;
const char STR_WARN_RTC_BATTERY_LOW[] = TR_WARN_RTC_BATTERY_LOW;
const char STR_WARN_MULTI_LOWPOWER[] = TR_WARN_MULTI_LOWPOWER;
const char STR_BATTERY[] = TR_BATTERY;
const char STR_WRONG_PCBREV[] = TR_WRONG_PCBREV;
const char STR_EMERGENCY_MODE[] = TR_EMERGENCY_MODE;
+1
View File
@@ -549,6 +549,7 @@ extern const char STR_NIGHTLY_WARNING[];
extern const char STR_NIGHTLY_NOTSAFE[];
extern const char STR_WRONG_SDCARDVERSION[];
extern const char STR_WARN_RTC_BATTERY_LOW[];
extern const char STR_WARN_MULTI_LOWPOWER[];
extern const char STR_BATTERY[];
extern const char STR_WRONG_PCBREV[];
extern const char STR_EMERGENCY_MODE[];
+1
View File
@@ -734,6 +734,7 @@
#define TR_NIGHTLY_NOTSAFE "Verze není bezpečná k létání"
#define TR_WRONG_SDCARDVERSION "Očekávaná ver.: "
#define TR_WARN_RTC_BATTERY_LOW "Slabá RTC baterie"
#define TR_WARN_MULTI_LOWPOWER "Low Power mode"
#define TR_BATTERY "BATERIE"
#define TR_WRONG_PCBREV "Jiná verze PCB/firmware"
#define TR_EMERGENCY_MODE "NOUZOVÝ REŽIM"
+1
View File
@@ -736,6 +736,7 @@
#define TR_NIGHTLY_NOTSAFE "Nicht für Flug geeignet"
#define TR_WRONG_SDCARDVERSION TR("Erw. Version: ","Erwartete Version: ")
#define TR_WARN_RTC_BATTERY_LOW "RTC Battery low"
#define TR_WARN_MULTI_LOWPOWER "Low Power mode"
#define TR_BATTERY "BATTERY"
#define TR_WRONG_PCBREV "Falsche PCB erkannt"
#define TR_EMERGENCY_MODE "NOTFALL MODUS"
+1
View File
@@ -736,6 +736,7 @@
#define TR_NIGHTLY_NOTSAFE "Version not safe to fly"
#define TR_WRONG_SDCARDVERSION TR("Expected ver: ","Expected version: ")
#define TR_WARN_RTC_BATTERY_LOW "RTC Battery low"
#define TR_WARN_MULTI_LOWPOWER "Low Power mode"
#define TR_BATTERY "BATTERY"
#define TR_WRONG_PCBREV "Wrong PCB detected"
#define TR_EMERGENCY_MODE "EMERGENCY MODE"
+1
View File
@@ -759,6 +759,7 @@
#define TR_NIGHTLY_NOTSAFE "Version not safe to fly"
#define TR_WRONG_SDCARDVERSION TR("Expected ver: ","Expected version: ")
#define TR_WARN_RTC_BATTERY_LOW "RTC Battery low"
#define TR_WARN_MULTI_LOWPOWER "Low Power mode"
#define TR_BATTERY "BATTERY"
#define TR_WRONG_PCBREV "Wrong PCB detected"
#define TR_EMERGENCY_MODE "EMERGENCY MODE"
+1
View File
@@ -753,6 +753,7 @@
#define TR_NIGHTLY_NOTSAFE "Version not safe to fly"
#define TR_WRONG_SDCARDVERSION TR("Expected ver: ","Expected version: ")
#define TR_WARN_RTC_BATTERY_LOW "RTC Battery low"
#define TR_WARN_MULTI_LOWPOWER "Low Power mode"
#define TR_BATTERY "BATTERY"
#define TR_WRONG_PCBREV "Wrong PCB detected"
#define TR_EMERGENCY_MODE "EMERGENCY MODE"
+1
View File
@@ -756,6 +756,7 @@
#define TR_NIGHTLY_NOTSAFE "Version de test uniq."
#define TR_WRONG_SDCARDVERSION "Version requise: "
#define TR_WARN_RTC_BATTERY_LOW "RTC Battery low"
#define TR_WARN_MULTI_LOWPOWER "Low Power mode"
#define TR_BATTERY "BATTERY"
#define TR_WRONG_PCBREV "PCB incorrect détecté"
#define TR_EMERGENCY_MODE "MODE SECOURS"
+1
View File
@@ -754,6 +754,7 @@
#define TR_NIGHTLY_NOTSAFE "Version not safe to fly"
#define TR_WRONG_SDCARDVERSION TR("Expected ver: ","Expected version: ")
#define TR_WARN_RTC_BATTERY_LOW "RTC Battery low"
#define TR_WARN_MULTI_LOWPOWER "Low Power mode"
#define TR_BATTERY "BATTERY"
#define TR_WRONG_PCBREV "Wrong PCB detected"
#define TR_EMERGENCY_MODE "EMERGENCY MODE"
+1
View File
@@ -742,6 +742,7 @@ TR_GYR_VSRCRAW
#define TR_NIGHTLY_NOTSAFE "Version not safe to fly"
#define TR_WRONG_SDCARDVERSION TR("Verwachte ver: ","Verwachte versie: ")
#define TR_WARN_RTC_BATTERY_LOW "RTC Battery low"
#define TR_WARN_MULTI_LOWPOWER "Low Power mode"
#define TR_BATTERY "BATTERY"
#define TR_WRONG_PCBREV "Verkeerde PCB gedetecteerd"
#define TR_EMERGENCY_MODE "EMERGENCY MODE"
+1
View File
@@ -754,6 +754,7 @@
#define TR_NIGHTLY_NOTSAFE "Version not safe to fly"
#define TR_WRONG_SDCARDVERSION TR("Expected ver: ","Expected version: ")
#define TR_WARN_RTC_BATTERY_LOW "RTC Battery low"
#define TR_WARN_MULTI_LOWPOWER "Low Power mode"
#define TR_BATTERY "BATTERY"
#define TR_WRONG_PCBREV "Wrong PCB detected"
#define TR_EMERGENCY_MODE "EMERGENCY MODE"
+1
View File
@@ -744,6 +744,7 @@
#define TR_NIGHTLY_NOTSAFE "Version not safe to fly"
#define TR_WRONG_SDCARDVERSION TR("Expected ver: ","Expected version: ")
#define TR_WARN_RTC_BATTERY_LOW "RTC Battery low"
#define TR_WARN_MULTI_LOWPOWER "Low Power mode"
#define TR_BATTERY "BATTERY"
#define TR_WRONG_PCBREV "Wrong PCB detected"
#define TR_EMERGENCY_MODE "EMERGENCY MODE"
+1
View File
@@ -754,6 +754,7 @@
#define TR_SDCARDVERSIONWARN "SD Card Check"
#define TR_WRONG_SDCARDVERSION TR("Expected ver: ","Expected version: ")
#define TR_WARN_RTC_BATTERY_LOW "RTC Battery low"
#define TR_WARN_MULTI_LOWPOWER "Low Power mode"
#define TR_BATTERY "BATTERY"
#define TR_WRONG_PCBREV "Wrong PCB detected"
#define TR_EMERGENCY_MODE "EMERGENCY MODE"