Skip to content

Commit

Permalink
Fixes betaflight#13664 - Smartaudio don't work with Softserial (betaf…
Browse files Browse the repository at this point in the history
…light#13715)

Fixing issue betaflight#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.
  • Loading branch information
Hochmueller authored Jun 27, 2024
1 parent a1e5292 commit 2ff71b0
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/main/io/vtx_smartaudio.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down Expand Up @@ -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);
}
Expand Down

0 comments on commit 2ff71b0

Please sign in to comment.