fix: Use keysGetMaxTrims() instead of MAX_TRIMS (#3860)
* fix: use keysGetMaxTrims() instead of MAX_TRIMS * feat: add support for virtual trims This is necessary for radios like X-lite where half of the trims are simulated
This commit is contained in:
@@ -808,7 +808,7 @@ void menuModelSetup(event_t event)
|
||||
case ITEM_MODEL_SETUP_THROTTLE_TRIM_SWITCH:
|
||||
lcdDrawTextAlignedLeft(y, STR_TTRIM_SW);
|
||||
if (attr)
|
||||
CHECK_INCDEC_MODELVAR_ZERO(event, g_model.thrTrimSw, MAX_TRIMS - 1);
|
||||
CHECK_INCDEC_MODELVAR_ZERO(event, g_model.thrTrimSw, keysGetMaxTrims() - 1);
|
||||
drawSource(MODEL_SETUP_2ND_COLUMN, y, g_model.getThrottleStickTrimSource(), attr);
|
||||
break;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user