From 9c5e8881fc4d56767768dc38149d67fdcbc7ab18 Mon Sep 17 00:00:00 2001 From: Andre Bernet Date: Wed, 4 Dec 2013 12:04:52 +0100 Subject: [PATCH] Reorder pot warning modes to simplify potential stock board implementation Might be good to make an enum too. --- radio/src/gui/menu_model.cpp | 10 ++++++---- radio/src/opentx.cpp | 2 +- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/radio/src/gui/menu_model.cpp b/radio/src/gui/menu_model.cpp index b44b6b92d..ededa6ad9 100644 --- a/radio/src/gui/menu_model.cpp +++ b/radio/src/gui/menu_model.cpp @@ -1234,9 +1234,11 @@ void menuModelSetup(uint8_t event) switch(event) { case EVT_KEY_LONG(KEY_ENTER): killEvents(event); - g_model.potPosition[m_posHorz-1] = getValue(MIXSRC_FIRST_POT+m_posHorz-1) >> 3; - AUDIO_WARNING1(); - eeDirty(EE_MODEL); + if(potMode == 1) { + g_model.potPosition[m_posHorz-1] = getValue(MIXSRC_FIRST_POT+m_posHorz-1) >> 3; + AUDIO_WARNING1(); + eeDirty(EE_MODEL); + } break; case EVT_KEY_BREAK(KEY_ENTER): g_model.nPotsToWarn ^= (1 << (m_posHorz-1)); @@ -1246,7 +1248,7 @@ void menuModelSetup(uint8_t event) } } - lcd_putsiAtt(MODEL_SETUP_2ND_COLUMN, y, PSTR("\004""Off\0""Auto""Man\0"), potMode, attr & ((m_posHorz == 0) ? attr : !INVERS)); + lcd_putsiAtt(MODEL_SETUP_2ND_COLUMN, y, PSTR("\004""Off\0""Man""Auto\0"), potMode, attr & ((m_posHorz == 0) ? attr : !INVERS)); if (potMode) for (uint8_t i=0; i> 6) == 1) { + if((g_model.nPotsToWarn >> 6) == 2) { for (uint8_t i=0; i> 3;