Panel readout shows the wire values while the dot stays physical
With Invert Y checked the readout claimed "Y 80" while the AnalogReply carried -80. The flip is factored into VRioDevice.WireY, shared by the reply builder and the new GetWireAxis accessor; the canvas readout uses a WireAxisProvider fed from it, and toggling the checkbox repaints so the sign flips in place. Dot and gauges keep tracking the stick. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
@@ -77,7 +77,8 @@ public class VRioDeviceTests
|
||||
|
||||
byte[] p = Assert.Single(wire.Packets).Payload;
|
||||
Assert.Equal(-3000, AnalogCodec.Combine(p[6], p[7]));
|
||||
Assert.Equal(3000, device.GetAxis(RioAxis.JoystickY)); // the panel's view is unflipped
|
||||
Assert.Equal(3000, device.GetAxis(RioAxis.JoystickY)); // the panel's dot is unflipped
|
||||
Assert.Equal(-3000, device.GetWireAxis(RioAxis.JoystickY)); // the panel's readout matches the wire
|
||||
|
||||
// Full negative deflection: -Min is one past Max, so it clamps rather than throws.
|
||||
device.SetAxis(RioAxis.JoystickY, AnalogCodec.Min);
|
||||
|
||||
Reference in New Issue
Block a user