-
Notifications
You must be signed in to change notification settings - Fork 14.6k
Support swapping RX/TX pins for ESC telemetry #24706
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
Conversation
🔎 FLASH Analysispx4_fmu-v5x [Total VM Diff: 176 byte (0.01 %)]
px4_fmu-v6x [Total VM Diff: 184 byte (0.01 %)]
Updated: 2025-05-27T08:32:56 |
On the IMXRT we don't support I do happen to have a board that needs this feature since you're doing the PR, would be able to add |
Sure, absolutely. Maybe |
Good point, i think using |
6e8d78c
to
82aed5c
Compare
|
82aed5c
to
53ae4c1
Compare
b9c990e
to
d37b637
Compare
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.
LGTM, don't have the hardware right now, but i'll test it when I have.
11cc593
to
0b05536
Compare
b2ae00d
to
0424d9c
Compare
0424d9c
to
9334893
Compare
9334893
to
f927540
Compare
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.
Nice 👍
Solved Problem
For the FMUv6s target, we only had one UART TX pin left, so we need to swap the pins internally to receive ESC telemetry data.
Solution
Adds a
-x
command line flag to thedshot telemetry
command. It is intended to be set in the board config, iedshot telemetry -d /dev/ttyS5 -x
in our case. On targets that don't support pin swapping, this selects the half-duplex single-wire mode on the TX pin, so that it can also receive.Unfortunately I couldn't quite get this to be backward compatible since the previous implementation did not use a command line argument for the device name. But I updated all calls for it in the repo.
Changelog Entry
For release notes:
Alternatives
We could also add a parameter for the inversion? However, I kinda doubt that a generic serial port will have their pins inverted. This setting is only useful for boards with hardwired ESC telemetry pins.
Test coverage
dshot telemetry /dev/ttyX
todshot telemetry -d /dev/ttyX