fix(radio): YAML timer handling (#3949)

* fix: YAML timer handling

* chore: improve YAML set timer handling

* chore: improve timer handling

* feat: only offer defined timer for set and reset functions

* feat: only offer defined timer for set and reset functions (bw)

* chore: cosmetics
This commit is contained in:
3djc
2023-08-28 20:02:03 +10:00
committed by GitHub
parent e56cffafa9
commit 78aa381464
19 changed files with 61 additions and 82 deletions
+1 -1
View File
@@ -714,7 +714,7 @@ void drawSource(coord_t x, coord_t y, uint32_t idx, LcdFlags att)
lcdDrawSizedText(x, y, g_model.timers[idx].name, LEN_TIMER_NAME, att);
}
else {
drawStringWithIndex(x, y, STR_SRC_TIMER, idx, att);
drawStringWithIndex(x, y, STR_SRC_TIMER, idx + 1, att);
}
}
else {
@@ -239,7 +239,7 @@ void menuSpecialFunctions(event_t event, CustomFunctionData * functions, CustomF
else if (func == FUNC_SET_TIMER) {
maxParam = TIMERS-1;
drawStringWithIndex(lcdNextPos, y, STR_TIMER, CFN_TIMER_INDEX(cfn)+1, attr);
if (active) CFN_TIMER_INDEX(cfn) = checkIncDec(event, CFN_TIMER_INDEX(cfn), 0, maxParam, eeFlags);
if (active) CFN_TIMER_INDEX(cfn) = checkIncDec(event, CFN_TIMER_INDEX(cfn), 0, maxParam, eeFlags, isTimerSourceAvailable);
break;
}
else if (attr) {