[Horus] Fixes #4177

This commit is contained in:
Bertrand Songis
2017-01-04 09:27:57 +01:00
parent bdf3d17652
commit b77332e75a
3 changed files with 5 additions and 7 deletions
+3 -5
View File
@@ -210,7 +210,6 @@ int getSwitchWarningsCount()
bool menuModelSetup(event_t event)
{
int l_posHorz = menuHorizontalPosition;
bool CURSOR_ON_CELL = (menuHorizontalPosition >= 0);
// Switch to external antenna confirmation
@@ -451,9 +450,6 @@ bool menuModelSetup(event_t event)
unsigned int newStates = 0;
for (int i=0, current=0; i<NUM_SWITCHES; i++) {
if (SWITCH_WARNING_ALLOWED(i)) {
if (!READ_ONLY() && attr && l_posHorz==current) {
storageDirty(EE_MODEL);
}
unsigned int state = ((g_model.switchWarningState >> (3*i)) & 0x07);
LcdFlags color = (state > 0 ? TEXT_COLOR : TEXT_DISABLE_COLOR);
if (attr && menuHorizontalPosition < 0) {
@@ -464,7 +460,9 @@ bool menuModelSetup(event_t event)
s[1] = "x\300-\301"[state];
s[2] = '\0';
lcdDrawText(MODEL_SETUP_2ND_COLUMN+i*25, y, s, color|(menuHorizontalPosition==current ? attr : 0));
if (attr && menuHorizontalPosition==current) CHECK_INCDEC_MODELVAR_ZERO_CHECK(event, state, 3, IS_3POS(i) ? 0 : isSwitchWarningStateAvailable);
if (!READ_ONLY() && attr && menuHorizontalPosition==current) {
CHECK_INCDEC_MODELVAR_ZERO_CHECK(event, state, 3, IS_CONFIG_3POS(i) ? NULL : isSwitch2POSWarningStateAvailable);
}
newStates |= (state << (3*i));
++current;
}
+1 -1
View File
@@ -73,7 +73,7 @@ bool modelHasNotes();
#endif
#if defined(COLORLCD)
bool isSwitchWarningStateAvailable(int state);
bool isSwitch2POSWarningStateAvailable(int state);
#endif
#if defined(GUI)
+1 -1
View File
@@ -375,7 +375,7 @@ bool isSwitchAvailableInMixes(int swtch)
}
#if defined(COLORLCD)
bool isSwitchWarningStateAvailable(int state)
bool isSwitch2POSWarningStateAvailable(int state)
{
return (state != 2); // two pos switch - middle state not available
}