1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-15 20:35:33 +03:00

Fixed feedback when changing timer from 'NONE' in CLI. (#8165)

Fixed feedback when changing timer from 'NONE' in CLI.
This commit is contained in:
Michael Keller 2019-05-05 22:39:05 +12:00 committed by GitHub
commit bb04f542cf
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -5295,7 +5295,7 @@ static void cliTimer(char *cmdline)
}
}
uint8_t oldTimerIndex = isExistingTimerOpt ? timerIOConfig(timerIOIndex)->index - 1 : 0;
int oldTimerIndex = isExistingTimerOpt ? timerIOConfig(timerIOIndex)->index - 1 : -1;
timerIOConfigMutable(timerIOIndex)->ioTag = timerIndex == TIMER_INDEX_UNDEFINED ? IO_TAG_NONE : ioTag;
timerIOConfigMutable(timerIOIndex)->index = timerIndex + 1;
timerIOConfigMutable(timerIOIndex)->dmaopt = DMA_OPT_UNUSED;