NexusX(R) swap rx/tx pins for port A, B, C if configured as CRSF receiver#11423
NexusX(R) swap rx/tx pins for port A, B, C if configured as CRSF receiver#11423wimalopaan wants to merge 3 commits intoiNavFlight:masterfrom
Conversation
Branch Targeting SuggestionYou've targeted the
If This is an automated suggestion to help route contributions to the appropriate branch. |
|
The PR is only compatible with RM PWM-ELRS receivers on the NEXUS-X. Why would you do that? The NEXUS-X has 9 PWM ports. Furthermore, the current pinout works perfectly if you plan to use simple ELRS receivers and RM ERS sensors. |
Do you know the Radiomaster RP3-H? This receiver fits perfectly to the NexusX(R) because it has also a JST-GH jack. So, this pair is a perfect one. And this thing doesn't affect ERS sensors: Only CRSF receiver ports. |
|
Instead of writing a PR that renders all existing installations obsolete, I’d prefer a swap option in the receiver settings when ELRS is enabled. THEN it would work for everyone... |
Sure, maybe I extend this PR ... |
|
Agreed, a setting that could be used by anyone who wants to swap any uart pins on any FC could be useful. That could replace the existing defines: Forcing the pins to swap (suddenly become wrong) on one specific target so that it happens to match one specific receiver doesn't make sense to me. |
first step towards dynamic rx/tx swap for CRSF RX serial
|
I saw your intermediate commit, which I understand isn't done yet. Is there any reason to restrict it to only work when the port is configured for CRSF, rather than allowing anyone to swap the pins on any UART, similar to the existing options? USE_UART1_PIN_SWAP In other words, use the existing code - just replace # ifdef with "if (theSetting)" Any reason to artificially restrict the functionality to only one specific use case, rather than allowing it to be more flexible and more simple by using the existing code? |
Well, in the beginning my use case was connecting CRSF receivers via JST-GH. Therefore the limiting. But of course, we can generalize that for all UARTs on plattforms that can do that. |
This is for NexusX(R) target only.
The NexusX(R) has three JST-GH ports labeled A, B, C.
These ports have the same pinout (tx, rx, Vcc, Gnd) as the ELRS receivers. If one connects the receiver with a 1:1 JST-GH cable (that Radiomaster used to include in the package), this cannot work. Instead a cable with tx/rx crossed is needed. This is very annoying.
This PR swaps the rx/tx pins of ports A, B, C if they are configured as Serial RX using CRSF. Therefore, users can use the standard 1:1 JST-GH cable that most vendors include in the shipping (if the receiver as a JST-GH port).