1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-20 14:55:21 +03:00

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

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 .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 .ioTag = IO_TAG_NONE
); );
for (unsigned i = 0; i < TIMER_CHANNEL_COUNT; i++) { transponderConfig->ioTag = timerioTagGetByUsage(TIM_USE_TRANSPONDER, 0);
if (TIMER_HARDWARE[i].usageFlags & TIM_USE_TRANSPONDER) {
transponderConfig->ioTag = TIMER_HARDWARE[i].tag;
break;
}
}
} }
static bool transponderInitialised = false; static bool transponderInitialised = false;