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:
@@ -148,6 +148,7 @@ internal sealed class MainForm : Form
|
||||
// Canvas ↔ device wiring.
|
||||
_canvas.LampProvider = _device.GetLamp;
|
||||
_canvas.AxisProvider = _device.GetAxis;
|
||||
_canvas.WireAxisProvider = _device.GetWireAxis;
|
||||
_canvas.AddressPressed += _device.PressAddress;
|
||||
_canvas.AddressReleased += _device.ReleaseAddress;
|
||||
_canvas.AxisMoved += (axis, value) => _device.SetAxis(axis, value);
|
||||
@@ -192,7 +193,11 @@ internal sealed class MainForm : Form
|
||||
if (!_kbInput.Checked)
|
||||
_router.ReleaseAllKeys();
|
||||
};
|
||||
_invertY.CheckedChanged += (_, _) => _device.InvertJoystickY = _invertY.Checked;
|
||||
_invertY.CheckedChanged += (_, _) =>
|
||||
{
|
||||
_device.InvertJoystickY = _invertY.Checked;
|
||||
_canvas.Invalidate(); // the wire readout flips even though the axes didn't move
|
||||
};
|
||||
_device.InvertJoystickY = _invertY.Checked; // the field initializer raises no event
|
||||
_kbLights.CheckedChanged += (_, _) =>
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user