From fae5686258ce3b171a9c308d13d0943244d60e8b Mon Sep 17 00:00:00 2001 From: Andre Bernet Date: Wed, 2 Apr 2014 18:27:39 +0200 Subject: [PATCH] Fix #917 --- radio/src/gui/menu_model.cpp | 2 +- radio/src/opentx.cpp | 11 ++++++----- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/radio/src/gui/menu_model.cpp b/radio/src/gui/menu_model.cpp index e74bc9da5..80eb621b3 100644 --- a/radio/src/gui/menu_model.cpp +++ b/radio/src/gui/menu_model.cpp @@ -1252,7 +1252,7 @@ void menuModelSetup(uint8_t event) case EVT_KEY_LONG(KEY_ENTER): killEvents(event); if(potMode == 1) { - g_model.potPosition[m_posHorz-1] = getValue(MIXSRC_FIRST_POT+m_posHorz-1) >> 3; + g_model.potPosition[m_posHorz-1] = getValue(MIXSRC_FIRST_POT+m_posHorz-1) >> 4; AUDIO_WARNING1(); eeDirty(EE_MODEL); } diff --git a/radio/src/opentx.cpp b/radio/src/opentx.cpp index 357a2f65d..1d9edbb40 100644 --- a/radio/src/opentx.cpp +++ b/radio/src/opentx.cpp @@ -2460,7 +2460,7 @@ void checkSwitches() perOut(e_perout_mode_normal, 0); bad_pots = 0; for (uint8_t i=0; i> 3)) > 2)) { + if (!(g_model.nPotsToWarn & (1 << i)) && (abs(g_model.potPosition[i] - (getValue(MIXSRC_FIRST_POT+i) >> 4)) > 1)) { warn = true; bad_pots |= (1<> 3)) > 2) { + if (abs(g_model.potPosition[i] - (getValue(MIXSRC_FIRST_POT+i) >> 4)) > 1) { switch (i) { case 0: case 1: - lcd_putc(60+i*(5*FW)+2*FW+2, 6*FH-2, g_model.potPosition[i] > (getValue(MIXSRC_FIRST_POT+i) >> 3) ? 126 : 127); + case 2: + lcd_putc(60+i*(5*FW)+2*FW+2, 6*FH-2, g_model.potPosition[i] > (getValue(MIXSRC_FIRST_POT+i) >> 4) ? 126 : 127); break; - case 2: case 3: - lcd_putc(60+i*(5*FW)+2*FW+2, 6*FH-2, g_model.potPosition[i] > (getValue(MIXSRC_FIRST_POT+i) >> 3) ? '\300' : '\301'); + case 4: + lcd_putc(60+i*(5*FW)+2*FW+2, 6*FH-2, g_model.potPosition[i] > (getValue(MIXSRC_FIRST_POT+i) >> 4) ? '\300' : '\301'); break; } flags = INVERS;