The +15 field log showed the probe auto-arming and the pod RESPONDING to
each candidate — but the response logged as empty. Cause: we subscribed
to 6e400002 only, so a reply on the second Nordic-UART slot (6e400003)
was never delivered, and the empty frames were artifacts on the write
slot. Subscribe to every notify/indicate characteristic (pressed-set
dedup absorbs any duplicated button event), and log each unexpected frame
with its slot and byte length so an empty artifact is distinguishable
from a real reply. Next field log will show which slot the pod answers on
and the actual bytes.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
TX pods drop the link after three unanswered 1 Hz status frames; the
derailleur's reply is unknown and undocumented anywhere public. When the
user opts in (device page > Preferences), each reconnect cycle writes
the next reply candidate (type-echo, ack, 3-byte XOR shapes, bare ACK —
on 6e400003 first, then other writable NUS slots) once after subscribe
and again per status frame, and logs the connection lifetime per
candidate. A lifetime past 5 s marks the likely answer; unexpected
frames are logged loudly as potential pod responses. Worst case per
attempt is the disconnect that already happens.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Once a Wheeltop shifter gives up (backoff), each 90s cooldown round was
still emitting a "Connecting to:" toast and a "...disconnected" WARNING +
OS notification, defeating the "one clear alert, then quiet" goal. Add
Connection._isInBackoff and gate both the auto-connect queue's notify
toast and the connection-state listener's disconnected toast/OS
notification on it.
The cooldown timer scheduled by _recordConnectFailure was anonymous and
shared _suppressedAutoReconnect with the battery saver, so a stale timer
from an earlier round could lift a later (even unrelated) suppression
early. Track timers per device id, cancel-and-replace on each new round,
cancel on Retry, and cancel all on disconnectAll().
Also correct a comment in _connect's catch block that described only the
fake platform's failure ordering (throw before the disconnected event) —
real Android delivers the event before or after the exception depending
on the device, and both orderings depend on _connectionSubscriptions
staying attached.
Extend the "successful connect resets the failure counter" integration
test to also cover Retry clearing the counter and the give-up alert
firing only once per session across a second suppression round.
Post-threshold rounds no longer toast, so tests now count attempts via a
new FakePeripheral.connectAttempts platform-level counter where needed.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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>
Gesture engine: a repeat of the SAME lever inside the 90ms combo window
can't be a combo, so flush the pending click instead of overwriting it —
rapid double-taps now deliver both shifts. The old press-swallowing was
accidentally doing multishift suppression, so bring back the explicit §7
guard (forward the first two rapid triggers, drop the 3rd+ within 350ms)
that the discrete-click rework removed.
Test fixes for the rest of the failing suite:
- review_prompt_service_test: derive seeds from sessionThreshold /
snoozeSessions instead of hardcoding the old threshold of 3
- controller_settings_signal_change_test: persist a session key and run
handleServices so the device is bonded and the Restore branch renders
- emulated SRAM AXS profile: send real 1-byte 0xFF edges (0x01 is now
filtered as a read-response echo), expect the generic 'SRAM Button'
name, and wait for the app's trigger subscription before tapping so
the press can't land mid-connect and get wiped by the gesture reset
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Brings SRAM AXS shifter support, beta-access/Shorebird track, and the
battery-saver timeout fix into 6.3. Merged the prop submodule (83f4bf9) so the
SRAM parser/button-tables and the Climb protocol coexist. Resolved: CHANGELOG
(SRAM AXS folded into 6.3.0), the prop pointer, and repointed the SRAM
integration test to the fake-BLE harness that 6.3 promoted into lib/.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Adds the last emulation profile batch and finalizes allEmulationProfiles
(controllers, then steering, then accessories). Test assertions deviate from
the brief where verified behavior required it: Cycplus/ThinkRider buttons
compare by name (allowMultiple: true makes BluetoothDevice copy the static
button with a per-session sourceDeviceId, which ControllerButton equality
includes); the Di2 test sets a CustomApp so getOrAddButton actually registers
its dynamically-created channel buttons; setUp seeds packageInfoValue so
OpenBikeControlDevice's app-info write doesn't null-check crash.
Adds three emulation profiles for Task 9: Kickr Bike Shift (3-byte
button frames with rolling dedupe sequence), Kickr Climb (request-
control on connect + incline writes decoded/logged), and Headwind
(manual-mode + speed writes logged, status echo keeps the app's mode
tracking consistent with real hardware).
Adds buildZwiftController + zwiftPlayNotification encoder plus five
new EmulationProfiles (Play L/R, Play FW2, Click V2 L/R) built on
Task 3's rideMaskInputs. Wires them into allEmulationProfiles.
TDD: emulation_zwift_profiles_test.dart written first (RED: profiles
undefined), then implemented to GREEN (5/5). The test's setUp also
initializes prop's global `propPrefs` directly — IntegrationEnv's
harness never wires it up (only production Settings.init() does),
and ZwiftClickV2's handleButtonsClicked reads it on every click, so
Click V2 side tests hit a LateInitializationError without it. This is
the first integration test to exercise a ZwiftClickV2 button press
end-to-end, which is why the gap wasn't hit before.
Adds the EmulationProfile/EmulatedInput model, EmulationManager +
EmulationSession, removePeripheral on the fake BLE platform, the first two
device profiles (Zwift Click + Ride) with an allEmulationProfiles registry,
core.emulation, and the debug-only RoutingBlePlatform install in main().