From e785d6eaaec16dbb48e3e2672ad5a6656210d8bb Mon Sep 17 00:00:00 2001 From: mikeller Date: Sat, 15 Feb 2020 14:56:28 +1300 Subject: [PATCH] Removed legacy timer index notation from CLI. --- src/main/cli/cli.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) 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;