Wire carries stick-up as negative; Invert Y opts back to physical

The old Invert joystick Y box (checked by default) is now the wire's
native convention: full up = -80 in AnalogReply with the flag off.
Checking the renamed Invert Y sends the physical direction (up = +80).

Control strip cleanup: test-mode buttons and the firmware selector are
gone (the device still reports 4.2), Keyboard/Gamepad/Invert Y share
one line, the help text drops the bindings sentence, and the wire log
gets the reclaimed height.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
Cyd
2026-07-07 09:47:25 -05:00
co-authored by Claude Fable 5
parent 391c53f294
commit 007d15e668
3 changed files with 48 additions and 44 deletions
+9 -6
View File
@@ -58,9 +58,11 @@ public sealed class VRioDevice
public byte VersionMinor { get; set; } = 2;
/// <summary>
/// Negate joystick Y in AnalogReply. Only the host sees the flip — local
/// state (<see cref="GetAxis"/>, the panel's dot and readout) keeps the
/// physical stick direction.
/// The wire natively carries stick-up as negative (full up = 80 in
/// AnalogReply); set this to send the physical direction (up = positive)
/// instead. Only the host sees the difference — local state
/// (<see cref="GetAxis"/>, the panel's dot) keeps the physical stick
/// direction either way.
/// </summary>
public bool InvertJoystickY { get; set; }
@@ -110,7 +112,8 @@ public sealed class VRioDevice
/// <summary>
/// Axis value as the next AnalogReply will carry it — same as
/// <see cref="GetAxis"/> except for the <see cref="InvertJoystickY"/> flip.
/// <see cref="GetAxis"/> except joystick Y follows the wire convention
/// (see <see cref="InvertJoystickY"/>).
/// </summary>
public short GetWireAxis(RioAxis axis)
{
@@ -119,8 +122,8 @@ public sealed class VRioDevice
}
private short WireY(short y) => InvertJoystickY
? (short)Math.Min(AnalogCodec.Max, -y) // clamp: -Min (8192) is one past the 14-bit Max
: y;
? y
: (short)Math.Min(AnalogCodec.Max, -y); // clamp: -Min (8192) is one past the 14-bit Max
/// <summary>
/// Move an axis. Values are clamped to the 14-bit signed range the wire