[Taranis] Logical switch not saved when only v2 parameter modified
This commit is contained in:
@@ -248,14 +248,16 @@ void menuModelLogicalSwitches(uint8_t event)
|
||||
cs->v1 = CHECK_INCDEC_PARAM(event, v1_val, v1_min, v1_max);
|
||||
break;
|
||||
case LS_FIELD_V2:
|
||||
if (v1_val >= MIXSRC_FIRST_TIMER)
|
||||
INCDEC_SET_FLAG(INCDEC_REP10 | NO_INCDEC_MARKS);
|
||||
if (v1_val >= MIXSRC_FIRST_TIMER) {
|
||||
INCDEC_SET_FLAG(EE_MODEL | INCDEC_REP10 | NO_INCDEC_MARKS);
|
||||
}
|
||||
cs->v2 = CHECK_INCDEC_PARAM(event, cs->v2, v2_min, v2_max);
|
||||
if (cstate==LS_FAMILY_OFS && cs->v1!=0 && event==EVT_KEY_LONG(KEY_ENTER)) {
|
||||
killEvents(event);
|
||||
getvalue_t x = getValue(v1_val);
|
||||
if (v1_val <= MIXSRC_LAST_CH)
|
||||
if (v1_val <= MIXSRC_LAST_CH) {
|
||||
cs->v2 = calcRESXto100(x);
|
||||
}
|
||||
eeDirty(EE_MODEL);
|
||||
}
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user