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

Fix SmartAudio (STM32F4) (#13797)

* resubmit after rebase

* Add define for SA without PD

* Move logic to smartaudio
This commit is contained in:
Mark Haslinghuis 2024-10-24 23:04:36 +02:00 committed by GitHub
parent 2cc63b63a3
commit 3e7cbb53ad
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -710,7 +710,13 @@ bool vtxSmartAudioInit(void)
const serialPortConfig_t *portConfig = findSerialPortConfig(FUNCTION_VTX_SMARTAUDIO);
if (portConfig) {
portOptions_e portOptions = SERIAL_STOPBITS_2 | SERIAL_BIDIR | SERIAL_BIDIR_PP_PD | SERIAL_BIDIR_NOPULL;
#ifdef USE_SMARTAUDIO_NOPULLDOWN
// softserial hack (#13797)
if (smartAudioSerialPort->identifier == SERIAL_PORT_SOFTSERIAL1 || smartAudioSerialPort->identifier == SERIAL_PORT_SOFTSERIAL2) {
portOptions &= ~SERIAL_BIDIR_PP_PD;
portOptions |= SERIAL_BIDIR_PP;
}
#endif
smartAudioSerialPort = openSerialPort(portConfig->identifier, FUNCTION_VTX_SMARTAUDIO, NULL, NULL, 4800, MODE_RXTX, portOptions);
}