Overflow in timer switch
This commit is contained in:
@@ -410,10 +410,12 @@ void menuModelSetup(event_t event)
|
|||||||
switch (menuHorizontalPosition) {
|
switch (menuHorizontalPosition) {
|
||||||
case 0:
|
case 0:
|
||||||
{
|
{
|
||||||
int8_t timerMode = timer->mode;
|
swsrc_t timerMode = timer->mode;
|
||||||
if (timerMode < 0) timerMode -= TMRMODE_COUNT-1;
|
if (timerMode < 0)
|
||||||
|
timerMode -= TMRMODE_COUNT-1;
|
||||||
CHECK_INCDEC_MODELVAR_CHECK(event, timerMode, -TMRMODE_COUNT-SWSRC_LAST+1, TMRMODE_COUNT+SWSRC_LAST-1, isSwitchAvailableInTimers);
|
CHECK_INCDEC_MODELVAR_CHECK(event, timerMode, -TMRMODE_COUNT-SWSRC_LAST+1, TMRMODE_COUNT+SWSRC_LAST-1, isSwitchAvailableInTimers);
|
||||||
if (timerMode < 0) timerMode += TMRMODE_COUNT-1;
|
if (timerMode < 0)
|
||||||
|
timerMode += TMRMODE_COUNT-1;
|
||||||
timer->mode = timerMode;
|
timer->mode = timerMode;
|
||||||
#if defined(AUTOSWITCH)
|
#if defined(AUTOSWITCH)
|
||||||
if (s_editMode>0) {
|
if (s_editMode>0) {
|
||||||
|
|||||||
Reference in New Issue
Block a user