From 20a9369f2f34ab81f67d99c8b19bdd60d4e01e73 Mon Sep 17 00:00:00 2001 From: "bsongis@gmail.com" Date: Tue, 7 May 2013 13:16:07 +0000 Subject: [PATCH] [all] First calibration screen reworked [all] Default settings for backlight --- src/eeprom_rlc.h | 2 -- src/gui/menu_general.cpp | 47 ++++++++++++++++++++++++++++------------ src/gui/menus.h | 2 ++ src/opentx.cpp | 9 ++++++-- src/opentx.h | 1 + 5 files changed, 43 insertions(+), 18 deletions(-) diff --git a/src/eeprom_rlc.h b/src/eeprom_rlc.h index 9299ecb9c..aa6e70a5e 100644 --- a/src/eeprom_rlc.h +++ b/src/eeprom_rlc.h @@ -228,8 +228,6 @@ inline void eeFlush() { theFile.flush(); } #define DISPLAY_PROGRESS_BAR(x) #endif -uint16_t evalChkSum(); - #define eeDeleteModel(x) EFile::rm(FILE_MODEL(x)) #if defined(CPUARM) diff --git a/src/gui/menu_general.cpp b/src/gui/menu_general.cpp index 0fdbe92b6..e88c60cc6 100644 --- a/src/gui/menu_general.cpp +++ b/src/gui/menu_general.cpp @@ -1049,12 +1049,9 @@ void menuGeneralHardware(uint8_t event) } #endif -void menuGeneralCalib(uint8_t event) + +void menuCommonCalib(uint8_t event) { - SIMPLE_MENU(STR_MENUCALIBRATION, menuTabDiag, e_Calib, 1); - - static uint8_t idxState; - for (uint8_t i=0; i0 && mSwitchDuration[mswitch]=CFN_PRESSLONG_DURATION) ) + (short_long==2 && active && mSwitchDuration[mswitch]==CFN_PRESSLONG_DURATION) ) uint8_t short_long = 0; uint8_t mswitch = 0; @@ -3995,7 +4000,7 @@ void opentxStart() checkAll(); if (g_eeGeneral.chkSum != evalChkSum()) { - pushMenu(menuGeneralCalib); + chainMenu(menuFirstCalib); } } diff --git a/src/opentx.h b/src/opentx.h index dbd259128..1df813aef 100644 --- a/src/opentx.h +++ b/src/opentx.h @@ -1303,6 +1303,7 @@ union ReusableBuffer int16_t midVals[NUM_STICKS+NUM_POTS]; int16_t loVals[NUM_STICKS+NUM_POTS]; int16_t hiVals[NUM_STICKS+NUM_POTS]; + uint8_t state; } calib; #if defined(SDCARD)