1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-12 19:10:32 +03:00

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.
This commit is contained in:
Hochmueller 2024-06-27 17:53:13 +02:00 committed by GitHub
parent a1e5292946
commit 2ff71b0a1f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

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