From 9193604aff16e0d6dd3bcf643cdd989f4b444707 Mon Sep 17 00:00:00 2001 From: 3djc Date: Sun, 23 Apr 2017 12:38:50 +0200 Subject: [PATCH] X7 : fix calibration interuption (#4835) * Fix 4833 * Less worse fix ? * Trying something else --- radio/src/gui/128x64/navigation.cpp | 6 +++--- radio/src/gui/128x64/radio_calibration.cpp | 9 ++++----- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/radio/src/gui/128x64/navigation.cpp b/radio/src/gui/128x64/navigation.cpp index a9d40ad65..16fd60f5b 100644 --- a/radio/src/gui/128x64/navigation.cpp +++ b/radio/src/gui/128x64/navigation.cpp @@ -575,7 +575,7 @@ void check(event_t event, uint8_t curr, const MenuHandlerFunc * menuTab, uint8_t } break; #endif - + case EVT_KEY_LONG(KEY_PAGE): if (curr > 0) cc = curr - 1; @@ -833,7 +833,7 @@ void check(event_t event, uint8_t curr, const MenuHandlerFunc *menuTab, uint8_t if (menuTab) { uint8_t attr = 0; - + if (l_posVert==0 && !menuCalibrationState) { attr = INVERS; @@ -1007,7 +1007,7 @@ void check(event_t event, uint8_t curr, const MenuHandlerFunc *menuTab, uint8_t INC(l_posHorz, 0, maxcol); break; #endif - + #if !defined(PCBX7) case EVT_KEY_REPT(KEY_DOWN): if (!IS_ROTARY_RIGHT(event) && l_posVert==maxrow) break; diff --git a/radio/src/gui/128x64/radio_calibration.cpp b/radio/src/gui/128x64/radio_calibration.cpp index 0029c5887..88d543055 100644 --- a/radio/src/gui/128x64/radio_calibration.cpp +++ b/radio/src/gui/128x64/radio_calibration.cpp @@ -2,7 +2,7 @@ * Copyright (C) OpenTX * * 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 * gruvin9x - http://code.google.com/p/gruvin9x * @@ -49,6 +49,7 @@ void menuCommonCalib(event_t event) switch (event) { case EVT_ENTRY: + case EVT_KEY_BREAK(KEY_EXIT): reusableBuffer.calib.state = CALIB_START; break; @@ -111,13 +112,11 @@ void menuCommonCalib(event_t event) void menuRadioCalibration(event_t event) { check_simple(event, MENU_RADIO_CALIBRATION, menuTabGeneral, DIM(menuTabGeneral), 0); - + TITLE(STR_MENUCALIBRATION); + menuCommonCalib(READ_ONLY() ? 0 : event); if (menuEvent) { menuCalibrationState = CALIB_START; } - - TITLE(STR_MENUCALIBRATION); - menuCommonCalib(READ_ONLY() ? 0 : event); } void menuFirstCalib(event_t event)