Skip to content

Commit

Permalink
fix: External module power for SBUS trainer for some transmitters (Ed…
Browse files Browse the repository at this point in the history
  • Loading branch information
raphaelcoeffic authored and MRC3742 committed Dec 22, 2023
1 parent d1a3afc commit 60be313
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions radio/src/targets/common/arm/stm32/trainer_driver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -417,12 +417,14 @@ static void* _sbus_trainer_ctx = nullptr;

void init_trainer_module_sbus()
{
modulePortSetPower(EXTERNAL_MODULE, true);
_sbus_trainer_ctx = STM32SerialDriver.init(REF_STM32_SERIAL_PORT(SbusTrainer),
&sbusTrainerParams);
}

void stop_trainer_module_sbus()
{
modulePortSetPower(EXTERNAL_MODULE, false);
STM32SerialDriver.deinit(_sbus_trainer_ctx);
_sbus_trainer_ctx = nullptr;
}
Expand Down

0 comments on commit 60be313

Please sign in to comment.