Issue with function "Trainer Chans" (#7104)

TRAINER(Channels) had a 50% weight
This commit is contained in:
Bertrand Songis
2019-11-20 21:10:30 +01:00
committed by GitHub
parent 4ffd859b05
commit c0a94505b6
18 changed files with 52 additions and 33 deletions
@@ -216,15 +216,17 @@ void menuSpecialFunctions(event_t event, CustomFunctionData * functions, CustomF
if (func == FUNC_TRAINER) {
maxParam = NUM_STICKS + 1;
uint8_t param = CFN_CH_INDEX(cfn);
if (param == NUM_STICKS + 1)
lcdDrawText(lcdNextPos, y, "Chans", attr);
if (param == 0)
lcdDrawText(MODEL_SPECIAL_FUNC_3RD_COLUMN, y, STR_STICKS, attr);
else if (param == NUM_STICKS + 1)
lcdDrawText(MODEL_SPECIAL_FUNC_3RD_COLUMN, y, STR_CHANS, attr);
else
drawSource(lcdNextPos, y, CFN_CH_INDEX(cfn)==0 ? 0 : MIXSRC_Rud+CFN_CH_INDEX(cfn)-1, attr);
drawSource(MODEL_SPECIAL_FUNC_3RD_COLUMN, y, MIXSRC_Rud + param - 1, attr);
}
#if defined(GVARS)
else if (func == FUNC_ADJUST_GVAR) {
maxParam = MAX_GVARS-1;
drawStringWithIndex(lcdNextPos, y, STR_GV, CFN_GVAR_INDEX(cfn)+1, attr);
drawStringWithIndex(lcdNextPos + 2, y, STR_GV, CFN_GVAR_INDEX(cfn)+1, attr);
if (active) CFN_GVAR_INDEX(cfn) = checkIncDec(event, CFN_GVAR_INDEX(cfn), 0, maxParam, eeFlags);
break;
}