Skip to content

feat(tx16smk3): add PC-controlled RGB ring feedback - #7745

Closed
szokezoltan95 wants to merge 3 commits into
EdgeTX:mainfrom
szokezoltan95:tx16smk3-pc-led-control
Closed

szokezoltan95 wants to merge 3 commits into
EdgeTX:mainfrom
szokezoltan95:tx16smk3-pc-led-control

Conversation

@szokezoltan95

@szokezoltan95 szokezoltan95 commented Sep 2, 2026 •

Copy link
Copy Markdown

Summary of changes:

Adds host-to-radio RGB feedback for the RadioMaster TX16S MK3 through the existing Advanced USB Joystick HID interface.

  • Adds an 8-byte vendor-defined HID Feature Report to Advanced Joystick mode on the TX16S MK3.
  • Supports setting one color across all 20 gimbal-ring LEDs, explicitly releasing PC control, and refreshing the override with a keepalive.
  • Individual ring-LED control is not included.
  • Automatically releases the PC override after five seconds without a valid set-color or keepalive command.
  • Immediately releases the override when USB Joystick mode disconnects.
  • Applies the PC color as a front-buffer overlay, allowing EdgeTX and Lua to continue updating their normal back-buffer state.
  • Leaves the six customizable function-switch LEDs under EdgeTX control.
  • Restores the current EdgeTX-controlled ring color immediately when the override is released.
  • Keeps the Classic Joystick report descriptor unchanged.
  • Limits the increased HID descriptor allocation to the TX16S MK3.

Motivation

Allow PC simulators and desktop applications to provide visual status feedback through the TX16S MK3's built-in gimbal-ring LEDs while using the radio as a USB joystick, without requiring separate LED hardware.

Feature Report payload

Byte Meaning
0 Protocol version (1)
1 Command
2 Target (0 = all gimbal-ring LEDs)
3 Red
4 Green
5 Blue
6–7 Reserved

Commands

Value Command
1 Set color and refresh the timeout
2 Release the override
3 Keepalive; refresh an active override without changing its color

Testing

  • Built successfully for PCB=TX16SMK3 using the EdgeTX Docker development image.
  • Flashed and tested on a RadioMaster TX16S MK3.
  • Verified simultaneous Advanced Joystick axis/button input and RGB updates.
  • Verified operation while the EdgeTX RGB LED special function is enabled, without color flickering.
  • Verified explicit release restores the current EdgeTX color.
  • Verified inactivity restores EdgeTX control after approximately five seconds.
  • Verified USB disconnection restores EdgeTX control.
  • Verified repeated delayed keepalives maintain the override.
  • Verified the radio boots and operates normally after flashing.

Final local firmware build SHA-256:

abf0c64d300e40c9db5046df29f4d61d2c467de3a41dd589c333dcbc9da7ccaa

@philmoz

philmoz commented Sep 2, 2026

Copy link
Copy Markdown
Collaborator

Why?

@szokezoltan95

szokezoltan95 commented Sep 2, 2026 •

Copy link
Copy Markdown
Author

The goal is to let a PC simulator or other desktop application provide visual feedback through the radio's built-in gimbal-ring LEDs while the TX16S MK3 continues operating as a USB joystick.

For example, a simulator could use the rings to indicate an aircraft or vehicle state, warning, mode, or other application-defined status without requiring separate external LED hardware. EdgeTX and Lua can currently control these LEDs locally, but the PC has no corresponding feedback path through the joystick connection.

I kept this initial implementation deliberately narrow: Advanced Joystick mode only, one color across the gimbal-ring LEDs, no change to Classic mode, and automatic release on timeout or USB disconnection. The six function-switch LEDs remain controlled by EdgeTX.

I built this primarily for my own simulator setup, but submitted it in case the capability is useful to others. I am open to changing the architecture or scope if a more general host-feedback interface would fit EdgeTX better.

@3djc

3djc commented Sep 2, 2026

Copy link
Copy Markdown
Collaborator

One radio, a single user use case, should stay in its own fork imho

@szokezoltan95

Copy link
Copy Markdown
Author

Understood. The gimbal-ring hardware itself appears to be specific to the TX16S MK3, although EdgeTX already contains the generic RGB infrastructure needed to operate it locally.

Would a generic host-feedback interface still be of interest, or is PC-driven control outside the intended scope of EdgeTX? If it is out of scope, I am happy to maintain this in my fork.

@gagarinlg

gagarinlg commented Sep 2, 2026 •

Copy link
Copy Markdown
Member

Understood. The gimbal-ring hardware itself appears to be specific to the TX16S MK3, although EdgeTX already contains the generic RGB infrastructure needed to operate it locally.

That's not true. A couple of radios already support and have controllable LEDs, like the Flysky ST16, PA01, TX15, ...

@szokezoltan95

Copy link
Copy Markdown
Author

That's not true. A couple of radios already support and have controllable LEDs, like the Flysky ST16, PA01, TX15, ...

Thank you for the info, I am just working with what I have physically available.

@pfeerick

pfeerick commented Sep 4, 2026

Copy link
Copy Markdown
Member

is PC-driven control outside the intended scope of EdgeTX

To be honest, I think so... it's primary scope is actual control / flight, PC simulator secondary... and even then, not niche cases. i.e. if one or more mainstream simulators actually supported / wanted to support this, then there would be reason to support it in the version of edgetx that everyone uses.

@pfeerick pfeerick closed this Sep 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants