fix(radio): Don't allow negative values for V2 on LS functions '|x|>y', '|x|<y' and '|dx|>=y' (#4239)

This commit is contained in:
philmoz
2023-11-13 09:41:56 +10:00
committed by GitHub
parent 0e7fe7f143
commit c8111452cb
3 changed files with 14 additions and 5 deletions
@@ -173,6 +173,8 @@ void menuModelLogicalSwitches(event_t event)
}
LcdFlags lf = attr2 | LEFT;
getMixSrcRange(v1_val, v2_min, v2_max, &lf);
if ((cs->func == LS_FUNC_APOS) || (cs->func == LS_FUNC_ANEG) || (cs->func == LS_FUNC_ADIFFEGREATER))
v2_min = 0;
drawSourceCustomValue(CSW_3RD_COLUMN, y, v1_val, (v1_val <= MIXSRC_LAST_CH ? calc100toRESX(cs->v2) : cs->v2), lf);
}