Transponder - update PG initialisation code to use

`timerioTagGetByUsage`
This commit is contained in:
Dominic Clifton 2019-06-11 22:34:43 +02:00
parent 2a6e94d030
commit 5dd67d767b
1 changed files with 1 additions and 6 deletions

View File

@ -52,12 +52,7 @@ void pgResetFn_transponderConfig(transponderConfig_t *transponderConfig)
.data = { 0x12, 0x34, 0x56, 0x78, 0x9A, 0xBC, 0x0, 0x0, 0x0 }, // Note, this is NOT a valid transponder code, it's just for testing production hardware
.ioTag = IO_TAG_NONE
);
for (unsigned i = 0; i < TIMER_CHANNEL_COUNT; i++) {
if (TIMER_HARDWARE[i].usageFlags & TIM_USE_TRANSPONDER) {
transponderConfig->ioTag = TIMER_HARDWARE[i].tag;
break;
}
}
transponderConfig->ioTag = timerioTagGetByUsage(TIM_USE_TRANSPONDER, 0);
}
static bool transponderInitialised = false;