Phase 4: axis calibration + plasma display (RioJoy.Core)
Port the analog calibration math and the plasma/VFD command set: - Calibration/: AxisCalibrator ports UpdateThrottle/UpdatePadal/UpdateJoystick (riovjoy2.cpp#L1504+) — throttle deadzone + ratchet field, pedal deadzones, joystick X/Y auto-ranging from observed min/max, rudder mixing (enableZR), and the per-axis invert flags. Stateful (start positions, last outputs, observed extremes) like the legacy globals, with the RIOcmd axis resets. Final outputs clamp to the documented 0..32766 range (also guards a legacy compounding quirk). AxisOutputs carries the six values; IJoystickSink gains SetAxis(JoyAxis,value) so calibrated axes reach the HID feeder. - Plasma/: PlasmaCommands builds the CPlasma ESC sequences (clear/cursor/font/ attr/box draw+fill/text) + GetFontSize + the PlasmaPosText auto-fit/centering; PlasmaDisplay writes them over the secondary COM transport. - tests: 21 new xUnit tests (105 total) for throttle proportional/saturation/ invert, pedal ZR mix vs. direct, joystick centering/direction/invert/reset, the output clamp, and plasma byte sequences/font sizes/auto-fit positioning. Hardware verification of axis feel + plasma output remains; the game-specific PlasmaScoreDraw layout is deferred to profile content (Phase 5/7). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
+14
-3
@@ -149,9 +149,20 @@ Implemented in `src/RioJoy.Core/Mapping` + `Output`, covered by the
|
||||
driver exists. The legacy default map / `RIO.ini` becomes an importable profile
|
||||
(Phase 5/7).
|
||||
|
||||
### Phase 4 — Axis calibration + plasma display
|
||||
- Port `UpdateJoystick/Throttle/Padal` math (deadzones, ratchet, rudder).
|
||||
- Port the `CPlasma` ESC command set on the secondary COM port.
|
||||
### Phase 4 — Axis calibration + plasma display — code-complete ✅
|
||||
Implemented in `src/RioJoy.Core/Calibration` + `Plasma` (105 xUnit tests total):
|
||||
- `AxisCalibrator` ports `UpdateThrottle`/`UpdatePadal`/`UpdateJoystick`: throttle
|
||||
deadzone + ratchet field, pedal deadzones, X/Y auto-ranging from observed
|
||||
min/max, rudder mixing (`enableZR`), and all per-axis invert flags. Stateful
|
||||
(start positions, last outputs) like the legacy globals, with the RIOcmd axis
|
||||
resets. Outputs clamp to the documented `0..32766` range.
|
||||
- `IJoystickSink` gains `SetAxis(JoyAxis, value)` so calibrated axes reach the HID
|
||||
feeder; `AxisOutputs` carries the six values.
|
||||
- `PlasmaCommands` ports the `CPlasma` ESC command set (clear/cursor/font/attr/box
|
||||
draw+fill/text) + `GetFontSize` + the `PlasmaPosText` auto-fit/centering;
|
||||
`PlasmaDisplay` writes them over the secondary COM transport.
|
||||
- ⏳ **Remaining:** hardware verification of axis feel + plasma output; the
|
||||
game-specific `PlasmaScoreDraw` layout is profile content (Phase 5/7).
|
||||
|
||||
### Phase 5 — Tray app + profiles
|
||||
- NotifyIcon + menu mirroring the legacy console menu (reset/recalibrate axes,
|
||||
|
||||
Reference in New Issue
Block a user