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

feat(radio): discover SBUS trainer availability #4266

Merged
merged 11 commits into from
Jan 5, 2024
Merged

feat(radio): discover SBUS trainer availability #4266

merged 11 commits into from
Jan 5, 2024

Conversation

raphaelcoeffic
Copy link
Member

@raphaelcoeffic raphaelcoeffic commented Oct 30, 2023

This PR allows for discovering on runtime if a serial port is available to allow for SBUS trainer on the external module bay.

Summary of changes:

  • SBUS trainer is now based on availability of a UART on HB pin.
  • CPPM trainer is now based on availability of a timer on HB pin.
  • more generic trainer code.

This PR adds SBUS/CPPM trainer capability to to the X10 Express and CPPM trainer to the X10 / X12S. Radios that have been modded with a UART on PPM/HB (aka. "External ACCESS mod") will profit from this as well, even if configured dynamically by assigning AUX1 to the external module.

@raphaelcoeffic
Copy link
Member Author

raphaelcoeffic commented Oct 30, 2023

Notes to myself: mid-term, we should have the trainer timers / USART defined on external available in module ports, and make use of the dir_flags when matching ports. done

@pfeerick pfeerick added the enhancement ✨ New feature or request label Oct 30, 2023
@raphaelcoeffic raphaelcoeffic force-pushed the sbus-trainer branch 7 times, most recently from 59193a3 to e31f94a Compare October 31, 2023 10:04
@sande005
Copy link

See new issue #4324 to see if it has any bearing on this. #4167 may not have resolved power issue in Trainer option.

@raphaelcoeffic
Copy link
Member Author

See new issue #4324 to see if it has any bearing on this. #4167 may not have resolved power issue in Trainer option.

The relevant code has been fairly re-written in this PR, so that might change things.

@raphaelcoeffic raphaelcoeffic marked this pull request as ready for review November 19, 2023 15:00
@raphaelcoeffic raphaelcoeffic added this to the 2.10 milestone Nov 19, 2023
@pfeerick pfeerick self-requested a review December 7, 2023 02:33
@pfeerick pfeerick merged commit fa12b27 into main Jan 5, 2024
39 checks passed
@pfeerick pfeerick deleted the sbus-trainer branch January 5, 2024 01:48
@mha1
Copy link
Contributor

mha1 commented Jan 5, 2024

tested ok on NV14 with ELRS nano RX on 3.3.1 configured to output SBUS

@sande005
Copy link

sande005 commented May 7, 2024

Frsky Horus X10S Express (ACCESS), using a Frsky FWTM module (same as #4324). EdgeTX 2.10 rc4

When selecting Master-SBUS under Model/Trainer, module now powers up and allows binding to buddy box using ACCESS or ACCST. But, no SBUS control signals passed back from module to act as Sources on the Master. This does work using a Taranis X9d (OTX 2.3.15) as master with this module.
Workaround has to be: Configure Internal Module as SBUS. Configure Trainer as Master-Jack. Bind buddy box to module. Use a jumper to pass jack ppm from module to input jack on the radio. Was hoping that this update would eliminate the need for an external jumper cable by using the module bay pins instead!

@mha1
Copy link
Contributor

mha1 commented May 7, 2024

x9d expects SBUS trainer input on the HB pin, whilst most other radios expect it on the S.Port pin. Does the module work on the x10s under otx?

@sande005
Copy link

sande005 commented May 7, 2024

No, it did not - according to Frsky and Mike Blandford, the pin configuration was changed on the first X10's, killing the sbus input capability. BUT on the X10S-E (my version) it WAS restored, but OTX never reimplemented. Prior discussions about this in RC Groups and in GitHub indicated that Edge would be adding the sbus detection to allow this in all radios that had the capability in 2.10. Seems like it isn't quite fully functional....(or I've been misled by Frsky and Mike Blandford).

@mha1
Copy link
Contributor

mha1 commented May 7, 2024

use any of your receivers, set them to SBUS output and wire it to the JR bay GND/VCC/S.Port and try Master/SBUS again

@sande005
Copy link

sande005 commented May 7, 2024

Now that is interesting....using an old x8r connected as you noted works just fine. Guess I can do that instead of the fancy module. Wonder why it works in the Taranis, and not in the X10S?
Finally, a non-bluetooth wireless trainer solution for my radio, which I haven't had since the days of "The Linker" for the Taranis!

Thank you!

I did try connecting the SB sig to the HB pin (pin #2) in the x8r test, but no joy. But it did work once the SB sig went to the S.Port pin (Pin #5).

@mha1
Copy link
Contributor

mha1 commented May 9, 2024

The x9d is one of the few radios that have a functional HB input and expects SBUS on the HB pin. As the module was designed to work with those radios it outputs SBUS on the HB pin. The X10s expects SBUSin on the SPort pin. I'm sure the module will work if you feed the modules HB pin to the X10s SPort pin.

The use case for Master/SBUS is to allow connecting receivers via SBUSout of the receivers. Depending on the radio you need to feed SBUS to the right pin. This is mainly the SPort pin, only fir Taranis radios it's the HB pin. If in doubt try SPort first and if that doesn't work try the HB pin.

@sande005
Copy link

sande005 commented May 9, 2024

Thank you for the extended explanation! And thanks to all that worked on this to get it up and running on Edge!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement ✨ New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants