Skip to content

Conversation

IamPete1
Copy link
Member

@IamPete1 IamPete1 commented Aug 22, 2025

This adds a script which uses a serial port to control a Traxxas Velineon ESC and receive ESC telem. The protocol is not documented, this is based on snooping on a receiver with a logic analyser. Its likely possible to get other data, but I only needed RPM.

This is a half duplex protocol, I could not get native half duplex working (possibly due to the input protection on the CubeOrange which I know can cause issues with the FrSky protocols). The work around is to just connect the RX and TX together and filter out our own messages in the script.

There is a bit of a annoying handshake to kick the ESC output of normal PWM mode, to get this working smoothly I added a binding for set_unbuffered_writes so the port sends immediately.

I also found that the esc_telem:update_rpm method was left as a uint16 binding when the underlying method was changed to float in #21499. That means if you hit more than 65,535 RPM you get a out of range error and your script dies.

Luacheck was being annoying so I have found out how to globally ignore unused arguments that start with a underscore. mpeterv/luacheck#11 (comment)

Tested with a VXL4.

@IamPete1 IamPete1 force-pushed the Venlineon branch 2 times, most recently from e21ad85 to 289909d Compare August 23, 2025 00:39
Copy link
Contributor

@tpwrules tpwrules left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, would love a world where we could have one serial setup func instead of a bunch of bindings.

Script is probably fine, did not look at it closely but it's an example and passes checks.

@tpwrules tpwrules merged commit a0452ba into ArduPilot:master Sep 15, 2025
109 of 110 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants