X7 : fix calibration interuption (#4835)

* Fix 4833

* Less worse fix ?

* Trying something else
This commit is contained in:
3djc
2017-04-23 12:38:50 +02:00
committed by Bertrand Songis
parent 1ad8769fff
commit 9193604aff
2 changed files with 7 additions and 8 deletions
+3 -3
View File
@@ -575,7 +575,7 @@ void check(event_t event, uint8_t curr, const MenuHandlerFunc * menuTab, uint8_t
} }
break; break;
#endif #endif
case EVT_KEY_LONG(KEY_PAGE): case EVT_KEY_LONG(KEY_PAGE):
if (curr > 0) if (curr > 0)
cc = curr - 1; cc = curr - 1;
@@ -833,7 +833,7 @@ void check(event_t event, uint8_t curr, const MenuHandlerFunc *menuTab, uint8_t
if (menuTab) { if (menuTab) {
uint8_t attr = 0; uint8_t attr = 0;
if (l_posVert==0 && !menuCalibrationState) { if (l_posVert==0 && !menuCalibrationState) {
attr = INVERS; attr = INVERS;
@@ -1007,7 +1007,7 @@ void check(event_t event, uint8_t curr, const MenuHandlerFunc *menuTab, uint8_t
INC(l_posHorz, 0, maxcol); INC(l_posHorz, 0, maxcol);
break; break;
#endif #endif
#if !defined(PCBX7) #if !defined(PCBX7)
case EVT_KEY_REPT(KEY_DOWN): case EVT_KEY_REPT(KEY_DOWN):
if (!IS_ROTARY_RIGHT(event) && l_posVert==maxrow) break; if (!IS_ROTARY_RIGHT(event) && l_posVert==maxrow) break;
+4 -5
View File
@@ -2,7 +2,7 @@
* Copyright (C) OpenTX * Copyright (C) OpenTX
* *
* Based on code named * Based on code named
* th9x - http://code.google.com/p/th9x * th9x - http://code.google.com/p/th9x
* er9x - http://code.google.com/p/er9x * er9x - http://code.google.com/p/er9x
* gruvin9x - http://code.google.com/p/gruvin9x * gruvin9x - http://code.google.com/p/gruvin9x
* *
@@ -49,6 +49,7 @@ void menuCommonCalib(event_t event)
switch (event) switch (event)
{ {
case EVT_ENTRY: case EVT_ENTRY:
case EVT_KEY_BREAK(KEY_EXIT):
reusableBuffer.calib.state = CALIB_START; reusableBuffer.calib.state = CALIB_START;
break; break;
@@ -111,13 +112,11 @@ void menuCommonCalib(event_t event)
void menuRadioCalibration(event_t event) void menuRadioCalibration(event_t event)
{ {
check_simple(event, MENU_RADIO_CALIBRATION, menuTabGeneral, DIM(menuTabGeneral), 0); check_simple(event, MENU_RADIO_CALIBRATION, menuTabGeneral, DIM(menuTabGeneral), 0);
TITLE(STR_MENUCALIBRATION);
menuCommonCalib(READ_ONLY() ? 0 : event);
if (menuEvent) { if (menuEvent) {
menuCalibrationState = CALIB_START; menuCalibrationState = CALIB_START;
} }
TITLE(STR_MENUCALIBRATION);
menuCommonCalib(READ_ONLY() ? 0 : event);
} }
void menuFirstCalib(event_t event) void menuFirstCalib(event_t event)