Commit Graph

5 Commits

Author SHA1 Message Date
Jonas Bark
d985e6d2b5 feat(accessory): name the actions an accessory obeys, and where to assign them
An accessory's settings page had nothing to say about what the device can
actually do: its actions live on a controller's buttons, and the page that
would have shown them (button mapping) is hidden here because a fan has no
buttons of its own.

It now lists them — the six Headwind speed/HR actions, the four incline
ones — straight off the device via a new BaseDevice.assignableActions, and
hands over to the controller that can carry them: the connected one, since
that is the one a rider can test a mapping on right away. With no
controller around it says so rather than offering a dead link.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-11 16:23:28 +02:00
Jonas Bark
fc83374306 refactor(incline): drive dispatch/sink-selection/UI off any incline device
- connection.dart: add inclineDevices getter (ManualInclineDevice) and
  generalize sinkProvider to pick any connected InclineSink, not just
  WahooKickrClimb; relay fallback unchanged
- base_actions.dart: dispatch incline actions to inclineDevices, not
  climbAccessories; error message now says "No incline device connected"
- button_edit.dart: gate incline card on inclineDevices, title uses
  inclineActions l10n key (generic "Incline")
- keymap.dart: hasActiveAction incline clause gates on inclineDevices
- incline_controller.dart: reset _lastWritten on manual hold so returning
  to auto re-asserts the grade even when grade equals last auto-written value
- incline_controller_test.dart: add re-asserts-after-manual-hold test

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-01 23:40:41 +02:00
Jonas Bark
1b10dee7f1 refactor(incline): generic incline in-game actions + labels
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-01 23:34:57 +02:00
Jonas Bark
b2b63ea84a refactor(incline): extract ManualInclineDevice mixin shared by incline devices
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-01 23:30:48 +02:00
Jonas Bark
8bd23d7385 refactor(incline): rename Climb incline pipeline to device-agnostic Incline*
ClimbInclineSink → InclineSink, ClimbController → InclineController,
ClimbManualState → InclineManualState, ClimbMode → InclineMode.
Moves lib/bluetooth/climb/{climb_incline_sink,climb_manual_state,climb_controller}.dart
→ lib/bluetooth/incline/{incline_sink,incline_manual_state,incline_controller}.dart
and corresponding tests. Decouples InclineManualState from wahoo_climb.dart
constants (own kInclineManualMinGrade001/kInclineManualMaxGrade001, same values).
WahooKickrClimb and _ClimbRelaySink stay Climb-named; no behavior changes.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-01 23:27:58 +02:00