From 2ff71b0a1f97ebc75f24bd73d0c4d63177d14f35 Mon Sep 17 00:00:00 2001 From: Hochmueller Date: Thu, 27 Jun 2024 17:53:13 +0200 Subject: [PATCH] Fixes #13664 - Smartaudio don't work with Softserial (#13715) Fixing issue #13664 Softserial port option has changed from 4.4.x to 4.5.0. By this the Smartaudio line is in an unknown voltage state while not TX is running - this violates the Smartaudio standard. vtx_softserial_alt should be set to OFF to use Smartaudio. --- src/main/io/vtx_smartaudio.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/io/vtx_smartaudio.c b/src/main/io/vtx_smartaudio.c index 8d2ce1af32..12f378276c 100644 --- a/src/main/io/vtx_smartaudio.c +++ b/src/main/io/vtx_smartaudio.c @@ -501,11 +501,11 @@ static void saSendFrame(uint8_t *buf, int len) case SERIAL_PORT_SOFTSERIAL1: case SERIAL_PORT_SOFTSERIAL2: if (vtxSettingsConfig()->softserialAlt) { - serialWrite(smartAudioSerialPort, 0x00); // Generate 1st start bit + serialWrite(smartAudioSerialPort, 0x00); // Generate 1st start byte } break; default: - serialWrite(smartAudioSerialPort, 0x00); // Generate 1st start bit + serialWrite(smartAudioSerialPort, 0x00); // Generate 1st start byte break; } @@ -707,7 +707,7 @@ bool vtxSmartAudioInit(void) // the SA protocol instead requires pulldowns, and therefore uses SERIAL_BIDIR_PP_PD instead of SERIAL_BIDIR_PP const serialPortConfig_t *portConfig = findSerialPortConfig(FUNCTION_VTX_SMARTAUDIO); if (portConfig) { - portOptions_e portOptions = SERIAL_STOPBITS_2 | SERIAL_BIDIR | SERIAL_BIDIR_PP_PD; + portOptions_e portOptions = SERIAL_STOPBITS_2 | SERIAL_BIDIR | SERIAL_BIDIR_PP_PD | SERIAL_BIDIR_NOPULL; smartAudioSerialPort = openSerialPort(portConfig->identifier, FUNCTION_VTX_SMARTAUDIO, NULL, NULL, 4800, MODE_RXTX, portOptions); }