Skip to content

Commit c285fdc

Browse files
fix: external module power for SBUS trainer
When no external module USART is present Fixes #4324
1 parent ce4ea50 commit c285fdc

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

radio/src/targets/common/arm/stm32/trainer_driver.cpp

+2
Original file line numberDiff line numberDiff line change
@@ -417,12 +417,14 @@ static void* _sbus_trainer_ctx = nullptr;
417417

418418
void init_trainer_module_sbus()
419419
{
420+
modulePortSetPower(EXTERNAL_MODULE, true);
420421
_sbus_trainer_ctx = STM32SerialDriver.init(REF_STM32_SERIAL_PORT(SbusTrainer),
421422
&sbusTrainerParams);
422423
}
423424

424425
void stop_trainer_module_sbus()
425426
{
427+
modulePortSetPower(EXTERNAL_MODULE, false);
426428
STM32SerialDriver.deinit(_sbus_trainer_ctx);
427429
_sbus_trainer_ctx = nullptr;
428430
}

0 commit comments

Comments
 (0)