Repository navigation
Fix PPM/CRSF auto detect for RX-as-TX - #3481
Conversation
as the pins are likely used for other things
fd78ae2 to
533279a
Compare
Consistency using the _RX pin definition.
CapnBry
left a comment
There was a problem hiding this comment.
Cripes. Very good time to test (as with everything RX-as-TX)!
Doesn't work on master with an XR1 as TX, does after this. Nomad still works (not using U0TXD_GPIO_NUM/U0RXD_GPIO_NUM), TX16S still works as well (is using UART0's RX/TX). DEBUG_LOG also still working in Nomad using the USB port (tied to UART0)
I also experimented with other possible ways of doing this and I think your solution is the best. Excellent work dealing with the high level and low! 🤩
|
Yeah, I spent about a day and half figuring out the best solution. I didn't want a workaround in tx_main that we would forget about in future. |
mha1
left a comment
There was a problem hiding this comment.
I don't have a PPM module to test but tested this PR with a BayckRC DB 100mW Gemini RX to check CRSF works. The BayckRC receiver is working fine as TX on my NV14. The Lua script, channel data and telemetry communication with EdgeTX work fine with all external module baudrates. Bind and connection with a receiver also works great.
|
Easiest way to test is put EdgeTX into PPM mode and connect pin 1 (CRSF pin) of a module to pin 5 of the module. |
When the code to call
Serial.end()in the startup of the TX module, it completely disconnects the pin from the GPIO matrix and it appears that this also makes the pin inoperable for RMT.This change detects if the one of the default UART pins is being used for the single-wire RCSIGNAL and if one is then do not call
Serial.end()allowing the pin to be used for RMT auto-detection and PPM input or CRSF input if detected.As part of this I also disabled using the USBSerial for C3 devices (RX-as-TX) as these pins are most likely used for other purposes and enabling USBSerial would break those usages.
Fixes #3478