diff --git a/src/main/cli/cli.c b/src/main/cli/cli.c index 1042f48d42..05d69f3b26 100644 --- a/src/main/cli/cli.c +++ b/src/main/cli/cli.c @@ -5724,15 +5724,9 @@ static void cliTimer(char *cmdline) return; } } else if (strcasecmp(pch, "none") != 0) { - timerIndex = atoi(pch); + cliPrintErrorLinef("INVALID TIMER OPTION FOR %c%02d: '%s'", IO_GPIOPortIdxByTag(ioTag) + 'A', IO_GPIOPinIdxByTag(ioTag), pch); - const timerHardware_t *timer = timerGetByTagAndIndex(ioTag, timerIndex + 1); - - if (!timer) { - cliPrintErrorLinef("INVALID TIMER OPTION FOR %c%02d: '%s'", IO_GPIOPortIdxByTag(ioTag) + 'A', IO_GPIOPinIdxByTag(ioTag), pch); - - return; - } + return; } int oldTimerIndex = isExistingTimerOpt ? timerIOConfig(timerIOIndex)->index - 1 : -1;