mirror of
https://github.com/opentx/opentx.git
synced 2025-07-21 23:35:17 +03:00
Popup in module information screen
This commit is contained in:
parent
64c3164ed4
commit
33e320a581
3 changed files with 13 additions and 5 deletions
|
@ -124,6 +124,14 @@ bool menuRadioModulesVersion(event_t event)
|
||||||
if (variant < DIM(variants)) {
|
if (variant < DIM(variants)) {
|
||||||
lcdDrawText(lcdNextPos + 1, y, variants[variant]);
|
lcdDrawText(lcdNextPos + 1, y, variants[variant]);
|
||||||
}
|
}
|
||||||
|
if (!globalData.upgradeModulePopup &&
|
||||||
|
reusableBuffer.hardwareAndSettings.modules[module].information.modelID == PXX2_MODULE_ISRM_S_X10S &&
|
||||||
|
reusableBuffer.hardwareAndSettings.modules[module].information.swVersion.major == 0 &&
|
||||||
|
reusableBuffer.hardwareAndSettings.modules[module].information.swVersion.minor == 1 &&
|
||||||
|
reusableBuffer.hardwareAndSettings.modules[module].information.swVersion.revision < 5) {
|
||||||
|
globalData.upgradeModulePopup = 0;
|
||||||
|
POPUP_WARNING(STR_MODULE_UPGRADE);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
y += FH;
|
y += FH;
|
||||||
|
|
|
@ -571,7 +571,7 @@ PACK(struct GlobalData {
|
||||||
uint8_t unexpectedShutdown:1;
|
uint8_t unexpectedShutdown:1;
|
||||||
uint8_t externalAntennaEnabled:1;
|
uint8_t externalAntennaEnabled:1;
|
||||||
uint8_t authenticationCount:2;
|
uint8_t authenticationCount:2;
|
||||||
uint8_t authenticationPopup:1;
|
uint8_t upgradeModulePopup:1;
|
||||||
uint8_t spare:3;
|
uint8_t spare:3;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
@ -204,8 +204,8 @@ void processAuthenticationFrame(uint8_t module, const uint8_t * frame)
|
||||||
uint8_t messageDigest[16] = {0};
|
uint8_t messageDigest[16] = {0};
|
||||||
|
|
||||||
if (frame[0] == 4 && PXX2_AUTH_REFUSED_FLAG == frame[4]) {
|
if (frame[0] == 4 && PXX2_AUTH_REFUSED_FLAG == frame[4]) {
|
||||||
if (!globalData.authenticationPopup) {
|
if (!globalData.upgradeModulePopup) {
|
||||||
globalData.authenticationPopup = 1;
|
globalData.upgradeModulePopup = 1;
|
||||||
POPUP_INFORMATION(STR_AUTH_FAILURE);
|
POPUP_INFORMATION(STR_AUTH_FAILURE);
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
|
@ -219,9 +219,9 @@ void processAuthenticationFrame(uint8_t module, const uint8_t * frame)
|
||||||
// we remain in AUTHENTICATION mode to avoid a CHANNELS frame is sent at the end of the mixing process
|
// we remain in AUTHENTICATION mode to avoid a CHANNELS frame is sent at the end of the mixing process
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!globalData.authenticationPopup) {
|
if (!globalData.upgradeModulePopup) {
|
||||||
if (globalData.authenticationCount >= 2) {
|
if (globalData.authenticationCount >= 2) {
|
||||||
globalData.authenticationPopup = 1;
|
globalData.upgradeModulePopup = 1;
|
||||||
POPUP_WARNING(STR_MODULE_UPGRADE);
|
POPUP_WARNING(STR_MODULE_UPGRADE);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue