Reset ISRM upgrade moduel counter reset when mode is changed (#7425)

Reset authentication counter on ISRM mode change
This commit is contained in:
3djc
2020-03-07 10:47:10 +01:00
committed by GitHub
parent ec56892de6
commit 6b5f6bc817
3 changed files with 14 additions and 1 deletions
@@ -50,6 +50,10 @@ bool menuRadioPowerMeter(event_t event)
lcdDrawCenteredText(LCD_H/2, STR_STOPPING);
lcdRefresh();
moduleState[g_moduleIdx].readModuleInformation(&reusableBuffer.moduleSetup.pxx2.moduleInformation, PXX2_HW_INFO_TX_ID, PXX2_HW_INFO_TX_ID);
#if defined(ACCESS_LIB)
// the module will reset on mode switch, we need to reset the authentication counter
globalData.authenticationCount = 0;
#endif
/* wait 1s to resume normal operation before leaving */
watchdogSuspend(500 /*5s*/);
RTOS_WAIT_MS(1000);