1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-13 19:40:31 +03:00

Merge pull request #9484 from mikeller/remove_legacy_timer_index

Removed legacy timer index notation from CLI.
This commit is contained in:
Michael Keller 2020-02-17 08:11:03 +13:00 committed by GitHub
commit 82ed38a5dc
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -5752,15 +5752,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;