Transponder - update PG initialisation code to use `timerioTagG… (#8483)

Transponder - update PG initialisation code to use `timerioTagGetByUsage`
This commit is contained in:
Michael Keller 2019-06-28 09:35:36 +12:00 committed by GitHub
commit 16ee340649
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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;