1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-24 08:45:36 +03:00

[4.5.1] Fixes #13664 - Smartaudio don't work with Softserial (#13715) (#13734)

This commit is contained in:
Mark Haslinghuis 2024-06-28 23:51:51 +02:00 committed by GitHub
parent d6a26102a4
commit ec8c59b49b
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);
}