-
-
Notifications
You must be signed in to change notification settings - Fork 3.3k
[4.5.1] Fixes #13664 - Smartaudio don't work with Softserial (#13715) #13734
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
haslinghuis
commented
Jun 27, 2024
- Cherry-pick of Fixes #13664 - Smartaudio don't work with Softserial #13715
…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.
Do you want to test this code? You can flash it directly from Betaflight Configurator:
WARNING: It may be unstable. Use only for testing! |
@@ -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; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don’t believe you need SERIAL_BIDIR_PP_PD
. See
const uint8_t pinConfig = (softSerial->port.options & SERIAL_BIDIR_NOPULL) ? IOCFG_AF_PP : IOCFG_AF_PP_PD; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You don't need it for softserial. But UART drivers use it to select GPIO_MODE_AF_PP / GPIO_MODE_AF_OD and smartaudio won't work with OD
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do I need to drop commit 2 or is it okay @ledvinap
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think that it won't work on UART without SERIAL_BIDIR_PP_PD. In this PR, I'd return it, to keep changes to minimum (UART driver does not test SERIAL_BIDIR_NOPULL)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agree - dropped commit 2 - this is a cherry-pick after all