Skip to content

Commit

Permalink
Fix SmartAudio (STM32F4) (betaflight#13797)
Browse files Browse the repository at this point in the history
* resubmit after rebase

* Add define for SA without PD

* Move logic to smartaudio
  • Loading branch information
haslinghuis authored Oct 24, 2024
1 parent 2cc63b6 commit 3e7cbb5
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/main/io/vtx_smartaudio.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand Down

0 comments on commit 3e7cbb5

Please sign in to comment.