Commit Graph

1751 Commits

Author SHA1 Message Date
Jonas Bark
79480a4e9d support ERG mode 2026-04-23 12:47:39 +02:00
Jonas Bark
6b1b041a99 fix(bridge): pause advertising only on trial over, keep transport alive 2026-04-23 12:35:56 +02:00
Jonas Bark
b5b91e09ec fix(bridge): defer emulator.stop microtask + block start when trial is over 2026-04-23 12:29:25 +02:00
Jonas Bark
58e043d96c feat(bridge): alert + push notification when 20-min trial expires 2026-04-23 12:22:02 +02:00
Jonas Bark
cc187cbf42 fix(proxy-device): stop only transporters on Bridge budget exhaust 2026-04-23 12:19:44 +02:00
Jonas Bark
3799fa99cc chore: bump prop for SIM-params gear-driven behaviour 2026-04-23 12:11:13 +02:00
Jonas Bark
924138d1aa ui adjustments 2026-04-23 12:02:18 +02:00
Jonas Bark
31ec5ad84d feat(trainer-feedback): warn on missing FTMS + dump non-standard services as freetext 2026-04-23 11:18:50 +02:00
Jonas Bark
a51ce50b8a chore: bump prop for bluetooth isConnected fix 2026-04-23 11:06:00 +02:00
Jonas Bark
3b8b379c12 ui adjustments 2026-04-23 10:59:21 +02:00
Jonas Bark
d6d6b77b36 feat(connection-card): grey out unsupported connect mode cards 2026-04-23 10:58:51 +02:00
Jonas Bark
ac39583bbe feat(proxy-details): show remaining Bridge minutes in Go Pro banner 2026-04-23 10:57:09 +02:00
Jonas Bark
b6996c937b feat(trainer-actions): consolidate shift/erg into mode-aware up/down + switchMode 2026-04-23 10:18:40 +02:00
Jonas Bark
944ca184e1 fix(iap): guard isProEnabledForCurrentDevice against uninitialised state 2026-04-23 10:06:56 +02:00
Jonas Bark
501daaebff fix(vs): use isProEnabledForCurrentDevice for virtual-shifting gating 2026-04-23 10:05:19 +02:00
Jonas Bark
e4e8626813 feat(overview): fold Smart Trainers into Controllers card with Connect button 2026-04-23 09:59:15 +02:00
Jonas Bark
ee7b1326b7 feat(bridge): advertise 'BikeControl - 20 min trial' when non-Pro 2026-04-23 09:51:53 +02:00
Jonas Bark
8766a908e4 fix(proxy-details): gate Pro notice on FitnessBikeDefinition, move IAP safety to IAPManager 2026-04-23 09:47:40 +02:00
Jonas Bark
406e87be16 feat(proxy-details): show virtual-shifting Pro notice + Go Pro button 2026-04-23 09:41:39 +02:00
Jonas Bark
c2646e41cb feat(proxy-device): auto-stop Bridge after 20 min for non-Pro users 2026-04-23 09:33:30 +02:00
Jonas Bark
8fe1cb5af5 chore: bump prop for BridgeUsageTracker hardening 2026-04-23 09:29:35 +02:00
Jonas Bark
a1f3939aff chore: bump prop for BridgeUsageTracker 2026-04-23 09:22:48 +02:00
Jonas Bark
fe0b148b2d feat(connection-card): disable unsupported connection modes per trainer app 2026-04-23 09:17:09 +02:00
Jonas Bark
03e1727d6a feat(supported-app): add per-app trainer connection types 2026-04-23 08:52:09 +02:00
Jonas Bark
9cabbf0925 Merge branch 'patchit' into feat/proxy-device-details-page
# Conflicts:
#	.github/workflows/patch.yml
2026-04-22 18:51:31 +02:00
Jonas Bark
6a366517c7 fix potential leak, cleanup 2026-04-22 18:26:43 +02:00
Jonas Bark
fa6a26686a Android: broadcast a custom Intent on button press - connect your controller to automation apps like MacroDroid or Tasker to turn your phone into a ringbell, trigger Shortcuts, toggle lights, and more (Pro) 2026-04-22 10:48:42 +02:00
Jonas Bark
00ddbb7ea7 patch adjustments 2026-04-22 09:41:32 +02:00
Jonas Bark
b19b23d8f2 improve VS feel 2026-04-22 09:39:01 +02:00
Jonas Bark
6e309f0908 FTMS changes 2026-04-22 09:12:29 +02:00
Jonas Bark
c6a9c2e5ec fix target logic 2026-04-22 09:05:16 +02:00
Jonas Bark
a4728bc543 ui adjustments 2026-04-22 07:40:33 +02:00
Jonas Bark
8693a71f18 Merge branch 'main' into feat/proxy-device-details-page 2026-04-21 21:07:43 +02:00
Jonas Bark
99b928aa6c patch it 2026-04-21 21:07:08 +02:00
Jonas Bark
624f871c5d patch it 2026-04-21 21:04:19 +02:00
Jonas Bark
396fbefb87 Merge branch 'main' of github.com:OpenBikeControl/bikecontrol 2026-04-21 20:55:15 +02:00
Jonas Bark
60f4ef938b UI + logic adjustments 2026-04-21 11:46:58 +02:00
Jonas Bark
56545d7771 refactor(proxy): own auto-connect logic inside ProxyDevice.connect()
Move the persisted-flag check from Connection._handleConnectionQueue
into ProxyDevice.connect() itself. connect() was an intentionally-empty
override (so the upstream BLE connect doesn't fire automatically); it's
the natural place to honour "user already said yes, keep reconnecting"
since _connect() in the connection queue awaits it anyway.

Net effect is identical to before, but the ProxyDevice class now
encapsulates its own reconnection policy instead of the connection
manager having to special-case it.
2026-04-21 11:08:37 +02:00
Jonas Bark
ddfc44ce24 feat(proxy): remember intent to connect; auto-start on next scan
Persist a per-trainer auto_connect_<trainerKey> flag via Settings. Set
to true whenever the user explicitly starts the emulator (tap in the
Trainer & Accessories list, or the Connect button on the disconnected
card). Clear to false when they tap Disconnect (or Disconnect & forget).

In Connection._handleConnectionQueue's proxy branch, after the shared
listener setup finishes, check the flag for the scanned ProxyDevice —
if set and nothing else is in flight, pick up the saved retrofit mode
and fire startProxy() so the emulator is ready by the time the user
opens the details page (or without opening it at all).
2026-04-21 10:55:33 +02:00
Jonas Bark
76bbb2e069 fix(connection-card): decide picker form once at mount, not on every mode change
Capture `_useAccordion` in initState based on the starting retrofit
mode: Proxy stays expanded (diagnostic-friendly default), anything
else mounts collapsed. Live switches no longer flip the picker's form
mid-interaction — if it started expanded it stays expanded for the
life of the page, and vice versa. The user only gets the accordion
layout on the next time they open ProxyDeviceDetailsPage.
2026-04-21 10:39:19 +02:00
Jonas Bark
08f5ef148f feat(connection-card): collapse mode picker into an accordion in non-Proxy modes
Proxy is the default / diagnostic-friendly mode where the picker should
stay one tap away. Virtual Shifting (WiFi or Bluetooth) is the "normal"
riding state and takes up valuable vertical space above the more
important Gear Hero / metrics / settings below. Wrap the live picker in
a collapsed Accordion whose trigger reads "Connect mode: {mode label}"
with the mode icon, so the user still sees what's active at a glance
and can expand to change it.
2026-04-21 10:36:26 +02:00
Jonas Bark
9d1de57c15 fix(proxy): seed FitnessBikeDefinition synchronously on creation
Register the emulator's onFitnessBikeDefinitionCreated hook in the
ProxyDevice constructor so every freshly-instantiated definition —
whether on first connect or mid-session mode swap — is seeded from
the active ShiftingConfig before the transporter starts or any
notifier fires. Eliminates the default-value flash that appeared
between retrofitMode flipping and the post-await seeding call.

applyTrainerSettings now delegates to the same _seedFitnessBikeDefinition
helper used by the hook, so the two paths can't drift apart.

Drop the redundant applyTrainerSettings() call in ConnectionCard's
mode-picker onChanged — the hook already handles it synchronously.
2026-04-21 10:32:22 +02:00
Jonas Bark
eb6285323c chore(prop): bump submodule for onFitnessBikeDefinitionCreated hook 2026-04-21 10:31:20 +02:00
Jonas Bark
fa6d9b6f1c fix(connection-card): re-seed active ShiftingConfig after mode switch
switchRetrofitMode disposes the old FitnessBikeDefinition and creates
a fresh one with stock defaults (bike=5kg, rider=75kg, maxGear=24,
gradeSmoothing=true, mode=targetPower). Without re-applying the user's
active ShiftingConfig, the new def boots with those defaults regardless
of what was configured. Call device.applyTrainerSettings() right after
the await so the new def is seeded before the notifiers settle.
2026-04-21 10:23:09 +02:00
Jonas Bark
99af72c10e fix(proxy-details): rebuild when retrofit mode changes
The details page's _gearSection and _settingsSection gate on
`def is FitnessBikeDefinition`, which flips to false in Proxy mode
(activeDefinition becomes ProxyBikeDefinition). Without a listener on
emulator.retrofitMode, switching to Proxy left the VS cards stale on
screen. Hook the notifier into _onEmulatorStateChanged so setState
fires on every mode swap.
2026-04-21 09:59:53 +02:00
Jonas Bark
47a8832913 refactor(proxy-details): drop status banner; move ShiftingConfigPicker into Trainer Settings
ConnectionCard's connected-state view is now just the mode picker —
the large coloured "Proxy/WiFi/Bluetooth active" banner (and the bridge
row with device-name / IP) is removed. Dead _bridgeRow and _dot helpers
dropped.

ShiftingConfigPicker no longer sits between the connection card and the
gear section; it's now the first entry inside TrainerSettingsSection,
grouping config-scoped controls (picker, VS mode, gear settings, bike
weight, rider weight).
2026-04-21 09:57:43 +02:00
Jonas Bark
1754f4f4a8 feat(proxy): open details immediately; restore mode-picker subtitles
ProxyPage no longer awaits startProxy — the details page opens the
moment the user taps a device and the BLE connect runs in the
background. ProxyDevice exposes an isStarting ValueNotifier that flips
true across super.connect(), so ConnectionCard can render a
"Connecting in {mode} mode…" row (with a small progress indicator)
between the tap and the first successful start.

Also restore the per-mode hint subtitles on the live picker — they
were load-bearing ("Mirrors your trainer over WiFi…" etc.) and I'd
trimmed them to fit a compact row. Layout now matches the disconnected
picker (vertical list, icon + label + subtitle, CONNECT MODE header).
2026-04-21 09:49:52 +02:00
Jonas Bark
c1ca163902 feat(connection-card): always-visible mode picker with live switchRetrofitMode
The disconnected picker now persists the chosen mode on selection and on
the Connect button. When the emulator is running, a compact picker row
sits above the status banner; changing it persists the choice and calls
emulator.switchRetrofitMode so the upstream BLE link stays connected
while the transport swaps.
2026-04-21 09:43:45 +02:00
Jonas Bark
b2c42b50b8 refactor(proxy-list): separate auto-start from navigation branches for clarity 2026-04-21 09:42:24 +02:00
Jonas Bark
4bbaae858a feat(proxy-list): tap auto-starts emulator with the saved retrofit mode 2026-04-21 09:41:42 +02:00