Switches warning: limited display to first 5 wrong switches

This commit is contained in:
Damjan Adamic
2015-07-09 22:46:13 +02:00
parent 9133558bed
commit 449829ea70
+4 -5
View File
@@ -686,16 +686,15 @@ void checkSwitches()
swarnstate_t mask = ((swarnstate_t)0x03 << (i*2)); swarnstate_t mask = ((swarnstate_t)0x03 << (i*2));
uint8_t attr = ((states & mask) == (switches_states & mask)) ? 0 : INVERS; uint8_t attr = ((states & mask) == (switches_states & mask)) ? 0 : INVERS;
if (attr) { if (attr) {
if (++numWarnings < 7) { if (++numWarnings > 5) {
lcd_putsAtt(x, y, "...", 0);
break;
}
char c = "\300-\301"[(states & mask) >> (i*2)]; char c = "\300-\301"[(states & mask) >> (i*2)];
putsMixerSource(x, y, MIXSRC_FIRST_SWITCH+i, attr); putsMixerSource(x, y, MIXSRC_FIRST_SWITCH+i, attr);
lcd_putcAtt(lcdNextPos, y, c, attr); lcd_putcAtt(lcdNextPos, y, c, attr);
x = lcdNextPos + 3; x = lcdNextPos + 3;
} }
else if (numWarnings == 7) {
lcd_putsAtt(x, y, "...", 0);
}
}
} }
} }
if (g_model.potsWarnMode) { if (g_model.potsWarnMode) {