fix: map throttle to axis 3 (AETR layout)
Verified via hid_discover caps and live data dump. Throttle responds on axis 3 (HID usage 0x33 = Rx), not axis 5 or 6.
This commit is contained in:
@@ -109,8 +109,9 @@ int16_t ry = stk_right_y(&state);
|
||||
int16_t throttle = stk_throttle(&state);
|
||||
int16_t lx = stk_left_x(&state);
|
||||
|
||||
// Raw axes array (indices 0-7, only 1/2/4/5 active)
|
||||
// Raw axes array (indices 0-7, only 1/2/3/4 active)
|
||||
// state.axes[0..7] — values in range STK_AXIS_MIN..MAX (0..2047)
|
||||
// AETR layout: axes 1/2 = right stick, 3 = throttle, 4 = left X (rudder)
|
||||
|
||||
// Button check
|
||||
if (stk_button_pressed(&state, 3)) {
|
||||
@@ -127,10 +128,13 @@ EdgeTX radio (VID:PID 1209:4F54) HID input report:
|
||||
|
||||
| Field | Size | Details |
|
||||
| ------- | ---------- | --------------------------------------------------- |
|
||||
| Axes | 4 x 16-bit | Range 0-2047 (HID usage 0x30-0x37, indices 1/2/4/5) |
|
||||
| Axes | 4 x 16-bit | Range 0-2047 (HID usage 0x30-0x37, indices 1/2/3/4) |
|
||||
| Buttons | 24 bits | Switches, rockers, paddles |
|
||||
| Total | 20 bytes | No report ID |
|
||||
|
||||
Axis 1 = right X (aileron), 2 = right Y (elevator), 3 = throttle,
|
||||
4 = left X (rudder). This matches the AETR stick layout.
|
||||
|
||||
## Current Status
|
||||
|
||||
- [x] Build system (CMake + Ninja)
|
||||
|
||||
Reference in New Issue
Block a user