From 4ea6a4210e637b2fa33590576407f82225a366dd Mon Sep 17 00:00:00 2001 From: Raphael Coeffic Date: Wed, 15 Nov 2023 23:20:36 +0100 Subject: [PATCH] fix: External module power for SBUS trainer for some transmitters (#4326) --- radio/src/targets/common/arm/stm32/trainer_driver.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/radio/src/targets/common/arm/stm32/trainer_driver.cpp b/radio/src/targets/common/arm/stm32/trainer_driver.cpp index 02210f16aec..df8a10b7f9e 100644 --- a/radio/src/targets/common/arm/stm32/trainer_driver.cpp +++ b/radio/src/targets/common/arm/stm32/trainer_driver.cpp @@ -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; }