[MENU long] on a switch in Function Switches screen converts a screen to his correspondant momentary switch (THR <=> THRm, !THR <=> !THRm)
This commit is contained in:
+17
-1
@@ -120,7 +120,23 @@ int16_t checkIncDec(uint8_t event, int16_t val, int16_t i_min, int16_t i_max, ui
|
||||
#if defined(AUTOSWITCH)
|
||||
if (s_editMode>0 && (i_flags & INCDEC_SWITCH)) {
|
||||
int8_t swtch = getMovedSwitch();
|
||||
if (swtch) newval = swtch;
|
||||
if (swtch) {
|
||||
if (newval == DSW_TRN && swtch == DSW_TRN)
|
||||
newval = -newval;
|
||||
else
|
||||
newval = swtch;
|
||||
}
|
||||
}
|
||||
if (event == EVT_KEY_LONG(KEY_MENU) && i_max > SWITCH_ON) {
|
||||
s_editMode = !s_editMode;
|
||||
if (newval > SWITCH_ON)
|
||||
newval -= (MAX_SWITCH+1);
|
||||
else if (newval > 0)
|
||||
newval += (MAX_SWITCH+1);
|
||||
else if (newval < SWITCH_OFF)
|
||||
newval += (MAX_SWITCH+1);
|
||||
else if (newval < 0)
|
||||
newval -= (MAX_SWITCH+1);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
Reference in New Issue
Block a user