mirror of
https://github.com/jonasbark/swiftcontrol.git
synced 2026-11-29 09:11:17 +01:00
ERG (review findings on the ±5W change):
- New ErgPowerStepping extension is the single home for the 5W step and
500W manual cap, replacing 7 inline copies (physical buttons, hero-card
buttons/slider, three overlay controllers).
- Boundaries are guards, not clamps: up at >=500W is a no-op like the
disabled UI button (a 600W FTMS target is no longer slashed to 500),
down from >500W steps relative, and an unknown baseline (hub-commanded
ERG reports no target) is a no-op with a new localized message instead
of slamming the trainer to ~150W.
- ERG shift-up Success carries the button again so +5W presses show
activity feedback (missed conversion from 843f7985).
SRAM gesture:
- Same-lever repeats inside the 90ms combo window coalesce as duplicates:
a finger can't re-press in 90ms, but iOS re-delivers a colliding read
response of the 0xFF edge through the notify callback — it must not
actuate twice (nor break a combo when it misdecodes to the other lever).
- The §7 multishift guard only runs while shifting is enabled — the one
state where a held paddle actually bursts (per c94b87f0's --observe
capture). Bonded rapid tapping and both-lever combos are never
throttled. Timer-driven instead of DateTime.now() (deterministic under
fakeAsync) and cleared by _resetGesture on (re)connect.
- The "set up SRAM control" warning fires once per connection, not on
every undecoded press.
Harness:
- EmulationSession.notify drops notifications for removed peripherals so
delayed notifies (SRAM double-tap) can't land after teardown.
- The 0xFF press edge is SramAxsConstants.triggerEdge at all call sites;
the emulation test waits on the named TRIGGER_UUID constant.
- New coverage: guard behavior through processCharacteristic in both
states, burst suppression while unbonded, all-taps-delivered once
bonded, ERG boundary/game-set-target cases.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>