Another check done in the main view
This commit is contained in:
@@ -223,6 +223,23 @@ bool menuMainView(event_t event)
|
||||
}
|
||||
}
|
||||
|
||||
#if defined(HARDWARE_INTERNAL_MODULE) && defined(INTERNAL_MODULE_PXX2) && defined(ACCESS_LIB)
|
||||
if (globalData.authenticationCount > 0 && !globalData.upgradeModulePopup) {
|
||||
if (!globalData.internalModuleVersionChecked) {
|
||||
globalData.internalModuleVersionChecked = 1;
|
||||
memclear(&reusableBuffer.viewMain.internalModule, sizeof(reusableBuffer.viewMain.internalModule));
|
||||
moduleState[INTERNAL_MODULE].readModuleInformation(&reusableBuffer.viewMain.internalModule, PXX2_HW_INFO_TX_ID, PXX2_HW_INFO_TX_ID);
|
||||
}
|
||||
else if (reusableBuffer.viewMain.internalModule.information.modelID == PXX2_MODULE_ISRM_S_X10S &&
|
||||
reusableBuffer.viewMain.internalModule.information.swVersion.major == 0 &&
|
||||
reusableBuffer.viewMain.internalModule.information.swVersion.minor == 1 &&
|
||||
reusableBuffer.viewMain.internalModule.information.swVersion.revision < 5) {
|
||||
globalData.upgradeModulePopup = 1;
|
||||
POPUP_WARNING(STR_MODULE_UPGRADE);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
+6
-1
@@ -572,7 +572,8 @@ PACK(struct GlobalData {
|
||||
uint8_t externalAntennaEnabled:1;
|
||||
uint8_t authenticationCount:2;
|
||||
uint8_t upgradeModulePopup:1;
|
||||
uint8_t spare:3;
|
||||
uint8_t internalModuleVersionChecked:1;
|
||||
uint8_t spare:2;
|
||||
});
|
||||
|
||||
extern GlobalData globalData;
|
||||
@@ -1231,6 +1232,10 @@ union ReusableBuffer
|
||||
uint8_t maxNameLen;
|
||||
} modelFailsafe;
|
||||
|
||||
struct {
|
||||
ModuleInformation internalModule;
|
||||
} viewMain;
|
||||
|
||||
#if defined(STM32)
|
||||
// Data for the USB mass storage driver. If USB mass storage runs no menu is not allowed to be displayed
|
||||
uint8_t MSC_BOT_Data[MSC_MEDIA_PACKET];
|
||||
|
||||
Reference in New Issue
Block a user