fix(trainer): allow Master/SBUS Module mode on S.Port pin (#4668)

This commit is contained in:
Michael
2024-02-26 10:26:14 +10:00
committed by GitHub
parent 21e610028f
commit ba319a7bce
3 changed files with 27 additions and 8 deletions
+8
View File
@@ -180,8 +180,16 @@ static void trainer_init_module_sbus()
{
if (sbus_trainer_mod_st) return;
#if defined(TRAINER_MODULE_SBUS_USART)
// check if UART with inverter on heartbeat pin is required and available for SBUS (some Taranis radios)
sbus_trainer_mod_st = modulePortInitSerial(EXTERNAL_MODULE, ETX_MOD_PORT_UART,
&sbusTrainerParams, false);
#else
// check if UART with inverter on S.Port pin is available for SBUS (e.g. TX16s, NV14)
if(sbus_trainer_mod_st == nullptr)
sbus_trainer_mod_st = modulePortInitSerial(EXTERNAL_MODULE, ETX_MOD_PORT_SPORT,
&sbusTrainerParams, false);
#endif
if (sbus_trainer_mod_st) {
modulePortSetPower(EXTERNAL_MODULE,true);