From 1dc0842557722c35ebf3652efe9ee862c1c0a857 Mon Sep 17 00:00:00 2001 From: AJ Christensen Date: Mon, 25 Mar 2019 23:48:00 +1300 Subject: [PATCH] Revert "SmartAudio Lite compatibility: Send 0x00 bit(s) (always) even with Soft Serial." --- src/main/io/vtx_smartaudio.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/main/io/vtx_smartaudio.c b/src/main/io/vtx_smartaudio.c index 08b0b3681..803801ab0 100644 --- a/src/main/io/vtx_smartaudio.c +++ b/src/main/io/vtx_smartaudio.c @@ -450,7 +450,14 @@ static void saReceiveFrame(uint8_t c) static void saSendFrame(uint8_t *buf, int len) { if (!IS_RC_MODE_ACTIVE(BOXVTXCONTROLDISABLE)) { - serialWrite(smartAudioSerialPort, 0x00); // Ensure line is low regardless of hardware pull-down capabilities. + switch (smartAudioSerialPort->identifier) { + case SERIAL_PORT_SOFTSERIAL1: + case SERIAL_PORT_SOFTSERIAL2: + break; + default: + serialWrite(smartAudioSerialPort, 0x00); // Generate 1st start bit + break; + } for (int i = 0 ; i < len ; i++) { serialWrite(smartAudioSerialPort, buf[i]); @@ -461,7 +468,6 @@ static void saSendFrame(uint8_t *buf, int len) sa_outstanding = SA_CMD_NONE; } - serialWrite(smartAudioSerialPort, 0x00); // Pull the line low again after sending frame. sa_lastTransmissionMs = millis(); }