Merge pull request #6810 from opentx/3djc/multi-low-power-warn
Add multi low power warning
This commit is contained in:
@@ -838,6 +838,21 @@ void checkSDVersion()
|
|||||||
}
|
}
|
||||||
#endif
|
#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)
|
#if defined(STM32)
|
||||||
static void checkRTCBattery()
|
static void checkRTCBattery()
|
||||||
{
|
{
|
||||||
@@ -901,6 +916,10 @@ void checkAll()
|
|||||||
readModelNotes();
|
readModelNotes();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if defined(MULTIMODULE)
|
||||||
|
checkMultiLowPower();
|
||||||
|
#endif
|
||||||
|
|
||||||
if (!waitKeysReleased()) {
|
if (!waitKeysReleased()) {
|
||||||
showMessageBox(STR_KEYSTUCK);
|
showMessageBox(STR_KEYSTUCK);
|
||||||
tmr10ms_t tgtime = get_tmr10ms() + 500;
|
tmr10ms_t tgtime = get_tmr10ms() + 500;
|
||||||
|
|||||||
@@ -354,6 +354,7 @@ const char STR_SWITCHWARN[] = TR_SWITCHWARN;
|
|||||||
const char STR_FAILSAFEWARN[] = TR_FAILSAFEWARN;
|
const char STR_FAILSAFEWARN[] = TR_FAILSAFEWARN;
|
||||||
const char STR_WRONG_SDCARDVERSION[] = TR_WRONG_SDCARDVERSION;
|
const char STR_WRONG_SDCARDVERSION[] = TR_WRONG_SDCARDVERSION;
|
||||||
const char STR_WARN_RTC_BATTERY_LOW[] = TR_WARN_RTC_BATTERY_LOW;
|
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_BATTERY[] = TR_BATTERY;
|
||||||
const char STR_WRONG_PCBREV[] = TR_WRONG_PCBREV;
|
const char STR_WRONG_PCBREV[] = TR_WRONG_PCBREV;
|
||||||
const char STR_EMERGENCY_MODE[] = TR_EMERGENCY_MODE;
|
const char STR_EMERGENCY_MODE[] = TR_EMERGENCY_MODE;
|
||||||
|
|||||||
@@ -549,6 +549,7 @@ extern const char STR_NIGHTLY_WARNING[];
|
|||||||
extern const char STR_NIGHTLY_NOTSAFE[];
|
extern const char STR_NIGHTLY_NOTSAFE[];
|
||||||
extern const char STR_WRONG_SDCARDVERSION[];
|
extern const char STR_WRONG_SDCARDVERSION[];
|
||||||
extern const char STR_WARN_RTC_BATTERY_LOW[];
|
extern const char STR_WARN_RTC_BATTERY_LOW[];
|
||||||
|
extern const char STR_WARN_MULTI_LOWPOWER[];
|
||||||
extern const char STR_BATTERY[];
|
extern const char STR_BATTERY[];
|
||||||
extern const char STR_WRONG_PCBREV[];
|
extern const char STR_WRONG_PCBREV[];
|
||||||
extern const char STR_EMERGENCY_MODE[];
|
extern const char STR_EMERGENCY_MODE[];
|
||||||
|
|||||||
@@ -734,6 +734,7 @@
|
|||||||
#define TR_NIGHTLY_NOTSAFE "Verze není bezpečná k létání"
|
#define TR_NIGHTLY_NOTSAFE "Verze není bezpečná k létání"
|
||||||
#define TR_WRONG_SDCARDVERSION "Očekávaná ver.: "
|
#define TR_WRONG_SDCARDVERSION "Očekávaná ver.: "
|
||||||
#define TR_WARN_RTC_BATTERY_LOW "Slabá RTC baterie"
|
#define TR_WARN_RTC_BATTERY_LOW "Slabá RTC baterie"
|
||||||
|
#define TR_WARN_MULTI_LOWPOWER "Low power mode"
|
||||||
#define TR_BATTERY "BATERIE"
|
#define TR_BATTERY "BATERIE"
|
||||||
#define TR_WRONG_PCBREV "Jiná verze PCB/firmware"
|
#define TR_WRONG_PCBREV "Jiná verze PCB/firmware"
|
||||||
#define TR_EMERGENCY_MODE "NOUZOVÝ REŽIM"
|
#define TR_EMERGENCY_MODE "NOUZOVÝ REŽIM"
|
||||||
|
|||||||
@@ -736,6 +736,7 @@
|
|||||||
#define TR_NIGHTLY_NOTSAFE "Nicht für Flug geeignet"
|
#define TR_NIGHTLY_NOTSAFE "Nicht für Flug geeignet"
|
||||||
#define TR_WRONG_SDCARDVERSION TR("Erw. Version: ","Erwartete Version: ")
|
#define TR_WRONG_SDCARDVERSION TR("Erw. Version: ","Erwartete Version: ")
|
||||||
#define TR_WARN_RTC_BATTERY_LOW "RTC Battery low"
|
#define TR_WARN_RTC_BATTERY_LOW "RTC Battery low"
|
||||||
|
#define TR_WARN_MULTI_LOWPOWER "Low power mode"
|
||||||
#define TR_BATTERY "BATTERY"
|
#define TR_BATTERY "BATTERY"
|
||||||
#define TR_WRONG_PCBREV "Falsche PCB erkannt"
|
#define TR_WRONG_PCBREV "Falsche PCB erkannt"
|
||||||
#define TR_EMERGENCY_MODE "NOTFALL MODUS"
|
#define TR_EMERGENCY_MODE "NOTFALL MODUS"
|
||||||
|
|||||||
@@ -736,6 +736,7 @@
|
|||||||
#define TR_NIGHTLY_NOTSAFE "Version not safe to fly"
|
#define TR_NIGHTLY_NOTSAFE "Version not safe to fly"
|
||||||
#define TR_WRONG_SDCARDVERSION TR("Expected ver: ","Expected version: ")
|
#define TR_WRONG_SDCARDVERSION TR("Expected ver: ","Expected version: ")
|
||||||
#define TR_WARN_RTC_BATTERY_LOW "RTC Battery low"
|
#define TR_WARN_RTC_BATTERY_LOW "RTC Battery low"
|
||||||
|
#define TR_WARN_MULTI_LOWPOWER "Low power mode"
|
||||||
#define TR_BATTERY "BATTERY"
|
#define TR_BATTERY "BATTERY"
|
||||||
#define TR_WRONG_PCBREV "Wrong PCB detected"
|
#define TR_WRONG_PCBREV "Wrong PCB detected"
|
||||||
#define TR_EMERGENCY_MODE "EMERGENCY MODE"
|
#define TR_EMERGENCY_MODE "EMERGENCY MODE"
|
||||||
|
|||||||
@@ -759,6 +759,7 @@
|
|||||||
#define TR_NIGHTLY_NOTSAFE "Version not safe to fly"
|
#define TR_NIGHTLY_NOTSAFE "Version not safe to fly"
|
||||||
#define TR_WRONG_SDCARDVERSION TR("Expected ver: ","Expected version: ")
|
#define TR_WRONG_SDCARDVERSION TR("Expected ver: ","Expected version: ")
|
||||||
#define TR_WARN_RTC_BATTERY_LOW "RTC Battery low"
|
#define TR_WARN_RTC_BATTERY_LOW "RTC Battery low"
|
||||||
|
#define TR_WARN_MULTI_LOWPOWER "Low power mode"
|
||||||
#define TR_BATTERY "BATTERY"
|
#define TR_BATTERY "BATTERY"
|
||||||
#define TR_WRONG_PCBREV "Wrong PCB detected"
|
#define TR_WRONG_PCBREV "Wrong PCB detected"
|
||||||
#define TR_EMERGENCY_MODE "EMERGENCY MODE"
|
#define TR_EMERGENCY_MODE "EMERGENCY MODE"
|
||||||
|
|||||||
@@ -753,6 +753,7 @@
|
|||||||
#define TR_NIGHTLY_NOTSAFE "Version not safe to fly"
|
#define TR_NIGHTLY_NOTSAFE "Version not safe to fly"
|
||||||
#define TR_WRONG_SDCARDVERSION TR("Expected ver: ","Expected version: ")
|
#define TR_WRONG_SDCARDVERSION TR("Expected ver: ","Expected version: ")
|
||||||
#define TR_WARN_RTC_BATTERY_LOW "RTC Battery low"
|
#define TR_WARN_RTC_BATTERY_LOW "RTC Battery low"
|
||||||
|
#define TR_WARN_MULTI_LOWPOWER "Low power mode"
|
||||||
#define TR_BATTERY "BATTERY"
|
#define TR_BATTERY "BATTERY"
|
||||||
#define TR_WRONG_PCBREV "Wrong PCB detected"
|
#define TR_WRONG_PCBREV "Wrong PCB detected"
|
||||||
#define TR_EMERGENCY_MODE "EMERGENCY MODE"
|
#define TR_EMERGENCY_MODE "EMERGENCY MODE"
|
||||||
|
|||||||
@@ -756,6 +756,7 @@
|
|||||||
#define TR_NIGHTLY_NOTSAFE "Version de test uniq."
|
#define TR_NIGHTLY_NOTSAFE "Version de test uniq."
|
||||||
#define TR_WRONG_SDCARDVERSION "Version requise: "
|
#define TR_WRONG_SDCARDVERSION "Version requise: "
|
||||||
#define TR_WARN_RTC_BATTERY_LOW "RTC Battery low"
|
#define TR_WARN_RTC_BATTERY_LOW "RTC Battery low"
|
||||||
|
#define TR_WARN_MULTI_LOWPOWER "Low power mode"
|
||||||
#define TR_BATTERY "BATTERY"
|
#define TR_BATTERY "BATTERY"
|
||||||
#define TR_WRONG_PCBREV "PCB incorrect détecté"
|
#define TR_WRONG_PCBREV "PCB incorrect détecté"
|
||||||
#define TR_EMERGENCY_MODE "MODE SECOURS"
|
#define TR_EMERGENCY_MODE "MODE SECOURS"
|
||||||
|
|||||||
@@ -754,6 +754,7 @@
|
|||||||
#define TR_NIGHTLY_NOTSAFE "Version not safe to fly"
|
#define TR_NIGHTLY_NOTSAFE "Version not safe to fly"
|
||||||
#define TR_WRONG_SDCARDVERSION TR("Expected ver: ","Expected version: ")
|
#define TR_WRONG_SDCARDVERSION TR("Expected ver: ","Expected version: ")
|
||||||
#define TR_WARN_RTC_BATTERY_LOW "RTC Battery low"
|
#define TR_WARN_RTC_BATTERY_LOW "RTC Battery low"
|
||||||
|
#define TR_WARN_MULTI_LOWPOWER "Low power mode"
|
||||||
#define TR_BATTERY "BATTERY"
|
#define TR_BATTERY "BATTERY"
|
||||||
#define TR_WRONG_PCBREV "Wrong PCB detected"
|
#define TR_WRONG_PCBREV "Wrong PCB detected"
|
||||||
#define TR_EMERGENCY_MODE "EMERGENCY MODE"
|
#define TR_EMERGENCY_MODE "EMERGENCY MODE"
|
||||||
|
|||||||
@@ -742,6 +742,7 @@ TR_GYR_VSRCRAW
|
|||||||
#define TR_NIGHTLY_NOTSAFE "Version not safe to fly"
|
#define TR_NIGHTLY_NOTSAFE "Version not safe to fly"
|
||||||
#define TR_WRONG_SDCARDVERSION TR("Verwachte ver: ","Verwachte versie: ")
|
#define TR_WRONG_SDCARDVERSION TR("Verwachte ver: ","Verwachte versie: ")
|
||||||
#define TR_WARN_RTC_BATTERY_LOW "RTC Battery low"
|
#define TR_WARN_RTC_BATTERY_LOW "RTC Battery low"
|
||||||
|
#define TR_WARN_MULTI_LOWPOWER "Low power mode"
|
||||||
#define TR_BATTERY "BATTERY"
|
#define TR_BATTERY "BATTERY"
|
||||||
#define TR_WRONG_PCBREV "Verkeerde PCB gedetecteerd"
|
#define TR_WRONG_PCBREV "Verkeerde PCB gedetecteerd"
|
||||||
#define TR_EMERGENCY_MODE "EMERGENCY MODE"
|
#define TR_EMERGENCY_MODE "EMERGENCY MODE"
|
||||||
|
|||||||
@@ -754,6 +754,7 @@
|
|||||||
#define TR_NIGHTLY_NOTSAFE "Version not safe to fly"
|
#define TR_NIGHTLY_NOTSAFE "Version not safe to fly"
|
||||||
#define TR_WRONG_SDCARDVERSION TR("Expected ver: ","Expected version: ")
|
#define TR_WRONG_SDCARDVERSION TR("Expected ver: ","Expected version: ")
|
||||||
#define TR_WARN_RTC_BATTERY_LOW "RTC Battery low"
|
#define TR_WARN_RTC_BATTERY_LOW "RTC Battery low"
|
||||||
|
#define TR_WARN_MULTI_LOWPOWER "Low power mode"
|
||||||
#define TR_BATTERY "BATTERY"
|
#define TR_BATTERY "BATTERY"
|
||||||
#define TR_WRONG_PCBREV "Wrong PCB detected"
|
#define TR_WRONG_PCBREV "Wrong PCB detected"
|
||||||
#define TR_EMERGENCY_MODE "EMERGENCY MODE"
|
#define TR_EMERGENCY_MODE "EMERGENCY MODE"
|
||||||
|
|||||||
@@ -744,6 +744,7 @@
|
|||||||
#define TR_NIGHTLY_NOTSAFE "Version not safe to fly"
|
#define TR_NIGHTLY_NOTSAFE "Version not safe to fly"
|
||||||
#define TR_WRONG_SDCARDVERSION TR("Expected ver: ","Expected version: ")
|
#define TR_WRONG_SDCARDVERSION TR("Expected ver: ","Expected version: ")
|
||||||
#define TR_WARN_RTC_BATTERY_LOW "RTC Battery low"
|
#define TR_WARN_RTC_BATTERY_LOW "RTC Battery low"
|
||||||
|
#define TR_WARN_MULTI_LOWPOWER "Low power mode"
|
||||||
#define TR_BATTERY "BATTERY"
|
#define TR_BATTERY "BATTERY"
|
||||||
#define TR_WRONG_PCBREV "Wrong PCB detected"
|
#define TR_WRONG_PCBREV "Wrong PCB detected"
|
||||||
#define TR_EMERGENCY_MODE "EMERGENCY MODE"
|
#define TR_EMERGENCY_MODE "EMERGENCY MODE"
|
||||||
|
|||||||
@@ -754,6 +754,7 @@
|
|||||||
#define TR_SDCARDVERSIONWARN "SD Card Check"
|
#define TR_SDCARDVERSIONWARN "SD Card Check"
|
||||||
#define TR_WRONG_SDCARDVERSION TR("Expected ver: ","Expected version: ")
|
#define TR_WRONG_SDCARDVERSION TR("Expected ver: ","Expected version: ")
|
||||||
#define TR_WARN_RTC_BATTERY_LOW "RTC Battery low"
|
#define TR_WARN_RTC_BATTERY_LOW "RTC Battery low"
|
||||||
|
#define TR_WARN_MULTI_LOWPOWER "Low power mode"
|
||||||
#define TR_BATTERY "BATTERY"
|
#define TR_BATTERY "BATTERY"
|
||||||
#define TR_WRONG_PCBREV "Wrong PCB detected"
|
#define TR_WRONG_PCBREV "Wrong PCB detected"
|
||||||
#define TR_EMERGENCY_MODE "EMERGENCY MODE"
|
#define TR_EMERGENCY_MODE "EMERGENCY MODE"
|
||||||
|
|||||||
Reference in New Issue
Block a user