mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-19 14:25:20 +03:00
Made the timerioTagGetByUsage zero based, as it is not used by users.
This commit is contained in:
parent
aad6efdf03
commit
88ed243d32
4 changed files with 5 additions and 5 deletions
|
@ -60,10 +60,10 @@ const timerHardware_t *timerGetByTag(ioTag_t ioTag)
|
|||
|
||||
ioTag_t timerioTagGetByUsage(timerUsageFlag_e usageFlag, uint8_t index)
|
||||
{
|
||||
uint8_t currentIndex = 1;
|
||||
uint8_t currentIndex = 0;
|
||||
for (int i = 0; i < (int)USABLE_TIMER_CHANNEL_COUNT; i++) {
|
||||
if ((timerHardware[i].usageFlags & usageFlag) == usageFlag) {
|
||||
if (currentIndex == index || index == 0) {
|
||||
if (currentIndex == index) {
|
||||
return timerHardware[i].tag;
|
||||
}
|
||||
currentIndex++;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue