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
Trainer: allow Master/SBUS Module mode on S.Port pin #4668
Conversation
thanks @mha1 for this PR, as i understand, it will allow to store a basic RX with SBUS output into the back of a TX16S and use it as a Trainer source ? As i understand it's actually not possible even on the AUX1 because of signal inversion ? From your point of view does a RX with this kind of SBUS output will work then ? (The goal is to use a super cheap Microzone TX with their RX SBUS as a cheap wireless trainer) Last note: I currently tested this receiver on AUX1 with Master/Serial but it seems to not work. |
@Moumouls Yes, this will allow to run a receiver with true SBUS output as a trainer source connected to the JR Bay GND/VCC/S.Port pins. By true SBUS I mean SBUS as Futaba defined it. Idle low/active high bus levels. You are right, true SBUS can't be decoded on AUX1/AUX2 because the UARTs behind AUX1/AUX2 expect the usual idle high/active low bus levels. Some receivers like the ExpressLRS ones can output both, true SBUS and Inverted SBUS (which inverts the true SBUS levels). Any ExpressLRS receiver set to output Inverted SBUS will work on AUX1/AUX2. If your receiver outputs true SBUS it'll work with this PR. It looks like your RX does that because there is a transistor inverting the SBUS signal for the MCU's standard UART (which can't decode true SBUS). Also the fact your RX doesn't work on AUX1/AUX2 points to the fact it is actually outputting true SBUS. Your RX should work in the module bay with this PR. But be careful with VCC. Most of the radios output the transmitters battery voltage (up to 8.4V) on VCC. Make sure your receiver can handle 8.4V. If not a 5V voltage regulator is required. |
@pfeerick Thanks a lot Peter |
thank you, it's ok with TX16s, firmware 2.10.0-rc3, multimodule 1.3.4.0. |
a little remarque: |
ETX_MOD_DIR_RX); | ||
const etx_module_port_t *port = nullptr; | ||
|
||
#if defined(TRAINER_MODULE_SBUS_USART) |
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.
Are you sure this is needed? You could avoid the #if defined()
IMHO.
For EdgeTX there is no way of knowing if the trainer radio is off or not. The only thing that EdgeTX sees is a valid SBUS data stream or invalid/no SBUS data stream. It all comes down to how your trainer radio and receiver handle a loss of communication between the two. Appropriate failsafe settings in your receiver, e.g. setting failsafe to "no pulses" are required. If your receiver goes to failsafe when turning off the trainer radio and failsafe is set to "no pulses", the master radio (EdgeTX) will properly recognize the loss of communication with the slave radio and will also announce the loss of the trainer radio. Tested with TX16 as master (Master/SBUS) and ELRS receiver RM ER6 set to SBUS output using the default failsafe setting "no pulses" wired to the S.Port pin of the JR module bay. |
You need to set your receiver failsafe to "no pulse" |
ok i understand: |
... for radios supporting S.Port SBUS input
Fixes #3678
Summary of changes:
Tested on NV14 and TX16s