Skip to content
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

Handle USART TX pulldown #12929

Merged
merged 1 commit into from Jul 2, 2023
Merged

Conversation

SteveCEvans
Copy link
Member

@SteveCEvans SteveCEvans commented Jun 26, 2023

#12760 would stall transmission if the TX line was pulled down, but SmartAudio uses a pulldown, do don't use this behaviour under such circumstances.

Also, always configure SmartAudio to be bi-directional.

@github-actions
Copy link

Do you want to test this code? You can flash it directly from Betaflight Configurator:

  • Simply put #12929 (this pull request number) in the Select commit field of the Configurator firmware flasher tab (you need to Enable expert mode, Show release candidates and Development).

WARNING: It may be unstable. Use only for testing!

@blckmn
Copy link
Member

blckmn commented Jun 26, 2023

AUTOMERGE: (FAIL)

  • github identifies PR as mergeable -> FAIL
  • assigned to a milestone -> PASS
  • cooling off period lapsed -> PASS
  • commit count less or equal to three -> PASS
  • Don't merge label NOT found -> PASS
  • at least one RN: label found -> PASS
  • Tested label found -> FAIL
  • assigned to an approver -> PASS
  • approver count at least three -> FAIL

@@ -315,7 +315,7 @@ uartPort_t *serialUART(UARTDevice_e device, uint32_t baudRate, portMode_e mode,
if ((mode & MODE_TX) && txIO) {
IOInit(txIO, OWNER_SERIAL_TX, RESOURCE_INDEX(device));

if ((options & SERIAL_INVERTED) == SERIAL_NOT_INVERTED) {
if (((options & SERIAL_INVERTED) == SERIAL_NOT_INVERTED) && !(options & SERIAL_BIDIR_PP_PD)) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It may be better to add new bit to options, signaling that uartTxMonitor shall be used

@freasy
Copy link
Member

freasy commented Jun 28, 2023

Tramp VTX confirmed working

@robhaswell
Copy link

MSP VTX on BETAFPVF435 with an Avatar 1S VTX confirmed working. Many thanks!

SA is always unidirectional
Only switch AT32 TX line to input when transmission is complete
@SteveCEvans
Copy link
Member Author

SteveCEvans commented Jul 1, 2023

Tested with S.Bus using Futaba T8FG TX and Redcon FT4X clone FASST S.Bus RX using Revo Nano.

Copy link
Member

@freasy freasy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

GPS working
ELRS RX working
Tramp VTX working
SA VTX working

@haslinghuis haslinghuis merged commit 1333771 into betaflight:master Jul 2, 2023
22 checks passed
freasy pushed a commit to freasy/betaflight that referenced this pull request Jul 19, 2023
SA is always unidirectional
Only switch AT32 TX line to input when transmission is complete
davidbitton pushed a commit to davidbitton/betaflight that referenced this pull request Feb 5, 2024
SA is always unidirectional
Only switch AT32 TX line to input when transmission is complete
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: COMPLETED
Development

Successfully merging this pull request may close these issues.

None yet

7 participants