diff --git a/src/model_menus.cpp b/src/model_menus.cpp index ee4c24f75..fe8cd259e 100644 --- a/src/model_menus.cpp +++ b/src/model_menus.cpp @@ -2192,7 +2192,7 @@ void menuProcFunctionSwitches(uint8_t event) } else if (sd->func <= FUNC_SAFETY_CH16) { int8_t value = ((int8_t)sd->param >> 1); - lcd_outdezAtt(18*FW, y, value * 2, attr); + lcd_outdezAtt(18*FW, y, limit((int8_t)-125, (int8_t)(value * 2), (int8_t)125), attr); if (active) sd->param = (sd->param & 1) + (checkIncDecModel(event, value, -63, 63) << 1); break; } diff --git a/src/open9x.cpp b/src/open9x.cpp index 035515e58..a2c6ae7f3 100644 --- a/src/open9x.cpp +++ b/src/open9x.cpp @@ -1470,7 +1470,7 @@ void evalFunctions() } if (getSwitch(swtch, 0)) { if (sd->func < FUNC_TRAINER && (sd->param & 1)) { - safetyCh[sd->func] = ((int8_t)sd->param >> 1) * 2; + safetyCh[sd->func] = limit((int8_t)-125, (int8_t)(((int8_t)sd->param >> 1) * 2), (int8_t)125); } if (~active_functions & function_mask) {