Commit Graph

51 Commits

Author SHA1 Message Date
Jonas Acker
47d1b4211f Headwind page: one speed numeral, Manual/Heart rate/Power picker, only the chosen mode's controls
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-19 11:33:44 +01:00
Jonas Acker
49da9e6727 Headwind: fall back to the fan's own HR mode, unclipped speed buttons, tidier current row
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-19 10:27:35 +01:00
Jonas Acker
33d7cf6f91 Rizer: not a controller, no calibrating while disconnected
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-19 10:03:22 +01:00
Jonas Acker
76b9ab1df5 Headwind: follow heart rate in BikeControl, adjustable ramps, live readout
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-19 09:09:19 +01:00
Jonas Acker
82bda8b1a1 Headwind: follow the trainer's power
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-18 18:40:55 +01:00
Jonas Acker
08214ecffd Rizer: show the incline it reports; a refused incline write counts as failed
The incline readout now shows where the Rizer says it is (its incline
characteristic, byte 1 = 100 + 2 x percent) instead of only what it was
last told. An incline write now waits up to 1 s for the Rizer's status
reply; a refusal (e.g. "command not accessible") is logged and no longer
recorded as applied. No reply still counts as written.

Checked against a Rizer on firmware 33: 0/5/10% commands moved it and
the reported incline tracked them.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-18 18:22:57 +01:00
Jonas Acker
639d176d55 Rizer listed under accessories; Headwind fan controllable from its page
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-18 18:04:21 +01:00
Jonas Acker
038684384e Incline devices: show and set the incline; pedalling simulation rides a hilly route
The Elite Rizer and KICKR Climb pages get an Incline section: the incline last
sent and why (following the trainer app, waiting for a gradient, held by hand),
a Follow the gradient switch and -/0%/+ buttons. The Ride card shows a one-line
incline readout. Stepping out of auto now starts from the current incline.

Debug: the pedalling simulation also rides a hilly route (about -4% to +10%,
0.5% steps), which drives incline devices while no trainer app is connected.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-18 16:41:52 +01:00
Jonas Acker
fe2815d599 feat(button-edit): group the action picker by intent, bottom sheet on phones
The picker listed actions per connection (trainer direct, OpenBikeControl,
MyWhoosh Link, Zwift emulator), so the same action showed up twice and long
lists were hard to scan. Actions now sit under Gears / Trainer / Workout /
Riding / Navigate / View / Controller buttons, each once, in a two-column
grid with tinted group heads. OpenBikeControl actions use their translated
names, the head says what the trigger does now, and below 600 px the picker
opens as a bottom sheet instead of a side drawer.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-11 20:42:32 +01:00
Jonas Acker
9bd4be3b8e fix(ride): badge on the outline, no empty SRAM card, short locked label
- The setup warning badge is pinned to the controller outline's own
  top-right corner (ControllerCanvas.cornerBadge), not the card's, so it
  stays on the contour at phone, tablet and desktop widths; the outline
  fades under it via ControllerCanvas.dimmed.
- A controller that needs its setup but has nothing to draw yet (a SRAM
  AXS before its guided setup has heard its paddles) gets no Ride card:
  the banner already lists the step and the setup opens by itself. With
  only such controllers the section is left out instead of claiming
  there is no controller. The card returns once it has buttons.
- The locked warning row reads a short new rideControllerLocked
  (all six locales) instead of the long unlock_deviceIsCurrentlyLocked.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-13 23:25:00 +02:00
Jonas Acker
08089c5a86 fix(steering): phone steering reads the bars at 50 Hz about the true up axis, and the compass learns the mount
- sensors_plus delivered 5 Hz unless asked, while the estimator capped every
  step at 50 ms: a steer and back left a residual of a few degrees. Samples
  now come at game rate, are timed by the sensor's own timestamps, and a step
  integrates its whole duration.
- The gyroscope is projected onto gravity's axis, so a mount that tilts the
  phone towards the rider reads the full steering angle. The bias is learned
  on all three axes and seeded from the whole still window at calibration.
- Magnetometer mode no longer swaps the gyroscope for a raw compass heading.
  The raw field carries the phone's and the mount's own magnetic offset, far
  larger than the Earth's, which made both turn directions read the same way.
  The compass now fits that offset against the gyro angle while the bars turn
  (a circle fit, linear in the unknowns), and once it holds, a slow PI loop
  pulls the angle and the gyro bias towards the drift-free compass yaw.
- The compass switch is remembered across launches; its row says what it
  does, asks for one left-and-right turn, then reports that it is correcting.

Tests drive the estimator with a simulated phone on a tilted, magnetic mount
with noisy sensors, and the device with scripted sensor streams.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-10-08 14:37:32 +02:00
Jonas Acker
734b265667 fix(steering): phone steering has a name in your language, a Steering section, and one-line actions
The device showed as "Phone Steering" in every language; it's now "Handy-Lenkung"
and so on. On the Ride tab a steering sensor alone sits under "Steering", not
"Your buttons". The two actions under the gauge stay on one line, shrinking a
little where both don't fit at full size.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-08 13:53:00 +02:00
Jonas Acker
8f85cd1344 feat(steering): phone steering reads as a steering sensor, not a pair of buttons
On Ride, phone steering (and an Elite Sterzo or Rizer) no longer says "Tap a
button to change what it does" or shows "Just pressed Gyro Left Steer". Its
card says "Turn your handlebar to steer.", shows the live angle in degrees
over the gauge, and names the action each direction sends, lit while the bars
are past the dead zone. Phone steering recalibrates from the card in one tap,
and the section link reads "Adjust" instead of "Edit buttons".

Its page is now a steering page: what it does, its state (Calibrating / Ready)
and the large live gauge; "In the trainer app" with Handlebar left / right and
their actions (tapping one opens the action picker straight away, with no
single / double / long press to choose); the exact angle when the connected
app takes it; then the dead zone (±3° to ±12°), magnetometer mode and
Recalibrate as plain rows. Phone steering turns off from its own page instead
of offering to "disconnect and forget" the phone.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-08 12:54:04 +02:00
Jonas Acker
5a4c0de74c fix(buttons): Replace names the action it removes
Without Pro, giving a button a second action asked about "trigger types"
and Replace then deleted the button's other action without saying which.
The dialog now says it plainly (each button does one thing without Pro)
and lists what goes, e.g. "Single Click: Shift up will be removed".
Gating is unchanged.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-06 11:52:24 +02:00
Jonas Acker
07c2936dd2 feat(mapping): warn when steering sits on a click, move it to long press
Steering and push-to-talk only act while the button is held; on a single
or double click the press and release go out back to back, so they do
next to nothing. InGameAction.requiresHold marks them and
KeyPair.holdActionOnClick finds them on a click.

- Action picker (drawer and wide detail pane): an inline warning under the
  picked action with "Assign to Long Press", which moves the action to the
  button's long press and clears the click. Without Pro, another trigger
  staying beside it asks Go Pro / replace first; a long press that does
  something else is replaced only after confirming. Built-in mappings are
  copied first.
- Mapping rows, trigger rows, trigger cards, the trigger popup and the
  Ride last-press strip mark an existing hold action on a click.
- Built-in mappings: two shipped steering on a single click; they now use
  long press (a short tap still sends a press and release). One mapping
  sent "steer left" for the right navigation button; it now steers right.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-04 18:03:12 +02:00
Jonas Acker
ed4e5296a3 fix(ui): pages and widgets take their colours from the theme
Metric icons are neutral instead of a hue per quantity, source dots and
onboarding success/warning marks use the status palette, the help center
tiles and trainer app picker headers use theme roles and the plain group
header, and a guard test keeps literal colours out of lib/pages.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-09-29 14:36:19 +02:00
Jonas Acker
6e8d580989 fix(ui): second design review fixes
- Ride's activity preview (840-1199) renders the same ActivityRow as the
  Activity tab and the activity column, error fix links included.
- Connection methods under the "Recommended" header no longer repeat a
  Recommended pill, so the title gets the row beside the switch. The
  protocol announcement is a card in the new card language; its en/it/pl
  copy uses a proper dash.
- Pod buttons read "P", "SB", a power or zap icon instead of arrow
  initials like "P→"; a single right pod is framed on the art and its
  buttons so the picture sits centred in its card.
- The last-press strip keeps the action whole: it follows "Just pressed
  X →" on the same line when it fits, else on the next.
- Snapshot harness captures a beta controller in the light theme.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-09-29 12:43:45 +02:00
Jonas Acker
22eb24fbf0 feat(ui): Ride tab with virtual shifting card and your buttons
Ride now shows what the rider rides with instead of the setup chain:

- The ready banner as a card: a green tick, "Ready to ride" and who is
  receiving; trouble keeps its wash, outline and Fix / Show. With one step
  left Show opens its fix; with several it switches to Devices and makes
  those cards jump out there (ChainRevealController). The pending subtitle
  no longer says "below".
- Trial, VS budget, Pro-unregistered and health-ride banners as before,
  without their neutral outlines.
- Virtual shifting: title and trainer (opens the trainer page), a SIM / ERG
  indicator that only reports the mode, the drivetrain, the gear numeral
  with "of 24", − / + (48 dp, labelled, same shiftUp / shiftDown), and
  power / cadence / ratio. In ERG the numeral is the target power and − / +
  step it; the drivetrain dims. The front ring toggle is shared with the
  trainer page. Without a live trainer: Connecting…, a lost trainer with
  Connect, one line when the trainer app handles shifting, or an invitation
  to connect one; nothing in sensors-only mode.
- Your buttons: the controller picture with its action badges (tap to
  reassign), "Edit buttons", the hint, and "Just pressed X -> action ·
  Change" fed by the existing press notifier, so a press still rebuilds
  only the strip and the button. Several controllers get a block each with
  name, battery and Edit; none gets an invitation to pair one.
- From 840 up to the activity column Ride is two columns (shifting left,
  buttons and the latest activity right); one-column wide windows list each
  button's action beside the picture and drop the strip where the activity
  column already shows every press.

The chain cards (controllers, trainer or sensors, trainer app) move to the
top of Devices, unchanged. Offstage sections turn heroes off so the two
copies of a controller's buttons don't collide.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-09-29 10:00:13 +02:00
Jonas Acker
b54f79fe14 refactor(icons): one icon set - Lucide everywhere
Replace ~250 Material, 19 Bootstrap and 11 Radix icons across 65 files
with their LucideIcons equivalents (e.g. more_vert -> ellipsisVertical,
add/remove -> plus/minus, workspace_premium -> crown, patchPlus/Minus ->
badgePlus/Minus, GitHub/Facebook -> Lucide's own logos). The only glyph
left outside Lucide is the Reddit logo, which Lucide doesn't have. A
source guard test fails on any new non-Lucide icon outside that
allowlist.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-09-28 09:27:11 +02:00
Jonas Acker
dc3f77fad2 fix(a11y): custom tappables become focusable, labelled buttons
GestureDetector (+MouseRegion) tap areas move to BkTappable, which adds
button semantics, keyboard focus with a focus ring, and the click cursor:

- controller button pictures and the steering gauge halves (labelled
  "Change what <button> does")
- network check rows (a disclosure reporting its expanded state)
- instruction video cards

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-09-28 08:36:35 +02:00
Jonas Acker
ba1a785890 fix(steering): read a centred bar as 0°, not -0°
The gauge printed the tilt with toStringAsFixed(0), which keeps the sign
of a negative zero. An Elite Sterzo reports a centred bar as -0 (its
angle is negated for the gauge), and any tilt a hair right of centre
rounds to -0 too, so a bar at rest read "-0°". The readout now rounds
to a whole number first.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-09-24 23:13:58 +02:00
Jonas Bark
bd12ff2117 test(docs): snapshot the controller-configuration flow for the tutorial
Nine captures behind the "Configure Your Controller" tutorial on the website:
the main-page controller card with its tappable contour, the trigger popup a
tap opens, the Controller Settings page, the mapping table's three tiles per
button, the Pro conflict dialog, the button editor per trigger, the long-press
repeat card, and the toggle-mode fallback for a controller that never reports
a release.

Rendered as a Click V2 with OpenBikeControl and Local both on, which is what a
MyWhoosh rider has — with Local alone, every button MyWhoosh only exposes over
the protocol renders as "Not assigned", which is true and says nothing. And
deliberately as a NON-Pro rider: the PRO badge on a second trigger and the
"Go Pro" button are half of what the post is about, and both vanish for a
subscriber.

Two extractions so the test shoots the real widgets rather than hand-built
copies of them: buildTriggerAssignmentMenu out of showTriggerAssignmentPopup,
and buildTriggerConflictDialog out of showTriggerConflictDialog, the latter
returning its resolution through a callback instead of an inline Navigator.pop.
Behaviour is unchanged on both.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-21 12:33:44 +02:00
Jonas Bark
8b19b2ad3f refactor(phone-steering): replace steering-wheel gauge with compact horizontal gauge
Renames SteeringWheelGauge → SteeringGauge and rewrites the painter as a
horizontal bar with a sliding knob and glowing end zones, saving vertical space
on the device card footer. Updates the overview.dart usage and snapshot tests.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-30 11:25:42 +02:00
Jonas Bark
8f1cdaf899 fix(phone-steering): place gauge readout below the wheel; faithful calibrating snapshot
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-30 11:08:40 +02:00
Jonas Bark
7e1bdaa7c9 feat(phone-steering): add calibratePhoneSteering action + steering l10n 2026-06-30 10:44:45 +02:00
Jonas Bark
fb18bfa829 feat(phone-steering): add SteeringWheelGauge widget + steerSideFor helper 2026-06-30 10:38:58 +02:00
Jonas Bark
e518c47a28 animations 2026-05-31 10:40:28 +02:00
Jonas Bark
6c9e2d9fe8 cleanup 2026-05-04 12:06:56 +02:00
Jonas Bark
642fc754a1 UI adjustments, BLE advertisement fix 2026-04-26 09:14:00 +02:00
Jonas Bark
edf6af55f7 UI improvements 2026-04-25 22:36:25 +02:00
Jonas Bark
278ec97e13 use proper visuals for controllers 2026-04-25 10:39:22 +02:00
Jonas Bark
ebae89061f extract trigger conflict dialog for reuse in assignment popup
Moves _showTriggerConflictDialog, _hasActiveTriggerOtherThan, and
_clearOtherTriggerAssignments out of KeymapExplanation into a shared
trigger_conflict_dialog.dart so both the physical-press flow and the
tap-to-assign popup enforce the same non-Pro "replace existing / go Pro"
prompt when assigning an additional trigger to a button.
2026-04-24 14:22:12 +02:00
Jonas Bark
135494819d ui adjustments, DRY fixes 2026-04-24 14:13:05 +02:00
Jonas Bark
4d02126f21 feat(controller): dropBar = Play-left+right silhouettes, Ride reuses Play placements 2026-04-24 12:55:43 +02:00
Jonas Bark
77d6876e39 UI adjustments 2026-04-24 12:41:00 +02:00
Jonas Bark
ef99871096 fix(controller): lighter contour fill + IgnorePointer so it can't swallow taps 2026-04-24 12:30:36 +02:00
Jonas Bark
e895a1f8f8 fix(controller): match button positions by name + fill contour with light gray 2026-04-24 12:25:39 +02:00
Jonas Bark
fdd9983d03 fix(controller): enlarge Click V2 diamond + reposition buttons to fit 2026-04-24 12:21:10 +02:00
Jonas Bark
a30e68e7eb feat(controller): Zwift Click V2 puck body is now a rounded diamond 2026-04-24 12:17:01 +02:00
Jonas Bark
e0deb0cc77 feat(controller): Zwift Click V2 — two pucks, fixed ABYZ order, shifts under down 2026-04-24 12:12:16 +02:00
Jonas Bark
f8981cafb1 fix(controller): top-align the Zwift Play drop with the grip 2026-04-24 12:08:24 +02:00
Jonas Bark
c74bca8580 fix(controller): Zwift Play — grip tallest, drop shorter so shoulder points up 2026-04-24 12:07:13 +02:00
Jonas Bark
b3a9c81364 fix(controller): Zwift Play — narrower drop, single-line unified contour 2026-04-24 12:04:48 +02:00
Jonas Bark
b137506c2d feat(controller): Zwift Play contour + button placement from sketch 2026-04-24 11:56:11 +02:00
Jonas Bark
1c25f83baa feat(controller): trigger popup — inline icon, fixed-width title, taller rows 2026-04-24 11:45:17 +02:00
Jonas Bark
2481c8fffb feat(controller): split trigger popup label into bold title + muted value 2026-04-24 11:41:52 +02:00
Jonas Bark
9060ffebd7 UI adjustments 2026-04-24 11:40:13 +02:00
Jonas Bark
a02231876a feat(controller): ControllerCanvas widget with positioned buttons 2026-04-24 10:54:43 +02:00
Jonas Bark
32c9021756 feat(controller): ControllerLayout + contour painter + BaseDevice.controllerLayout hook 2026-04-24 10:52:57 +02:00
Jonas Bark
ca44bf7843 fix(controller): remove redundant pop + mirror Custom-profile duplicate flow 2026-04-24 10:47:49 +02:00