Commit Graph

4179 Commits

Author SHA1 Message Date
Jonas Bark
0d612ce032 Re-attach connection listeners on in-place reconnect
After an in-place "No connection" disconnect, selecting Virtual Shifting
again reconnected the BLE upstream but the connect never completed:
device.isConnected stayed false and the card hung on "connecting".

The listener that flips isConnected (and drives the handshake to
completion) is created only in _connect(), which runs once via the
auto-connect queue at app start. The first manual connect reuses that
listener; disconnect cancels it (so a BLE drop doesn't fire
auto-reconnect); the second manual connect via startProxy() had no
listener and never re-ran _connect.

Route the in-place reconnect through a new Connection.connectDevice()
wrapper over _connect, re-attaching the action / connection-state
listeners — the same path the working auto-connect uses — instead of
calling ProxyDevice.startProxy() directly.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-10 14:39:10 +02:00
Jonas Bark
0db8cf0c31 Keep the device registered on in-place "No connection" disconnect
The "No connection" picker entry disconnects without leaving the details
page, but Connection.disconnect(forget: false) removed the ProxyDevice
from the registry (isResetting is false). The open page kept the now
orphaned object: rediscovery built a *new* ProxyDevice while the page
still pointed at the old one, so selecting Virtual Shifting again
reconnected a device absent from bluetoothDevices — its BLE notifications
were rejected ("Device not found") and the connection was force-dropped.

Add a keepInList flag to disconnect; the in-place "No connection" path
passes it so the same device object stays registered (and its scan
result is retained to avoid a churned duplicate) and remains
reconnectable on the same card. The Disconnect buttons, which pop the
page, keep the default removing behaviour.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-10 14:14:48 +02:00
Jonas Bark
60817dabee Smart Trainer card: stable keys, reconnect rebinding, awaited mDNS stop, No-connection UX
- ConnectionCard: "No connection" shows "Not connected" instead of the
  bridge connect instruction; switching modes keeps the bridge accordion
  mounted with inline progress (drops the "Connecting in ... mode"
  placeholder card).
- proxy_device_details: stable keys on ConnectionCard / LiveMetricsSection
  / MiniWorkoutCard. On (dis)connect, conditional siblings toggle both
  above (FTMS warning) and below (gear/settings/VS-notice) these widgets,
  trapping the unkeyed ones in Flutter's reconciliation middle and
  remounting them — which collapsed the accordion and rebuilt the page.
- ProxyDevice: re-establish the emulator-state bindings on every
  (re)connect (_rebindEmulatorState in startProxy). The in-place
  "No connection" disconnect detaches them on a reused ProxyDevice, so
  reconnecting Virtual Shifting left the UI stuck on "connecting" while
  the emulator was actually connected.
- ProxyDevice.disconnect/switchRetrofitMode/handleServices: await the
  emulator stops so mDNS/TCP is torn down before reporting disconnected,
  and log the previously swallowed detach errors.
- connection.dart: log the discovered device name instead of its runtime
  type.
- Bump prop for the awaited mDNS teardown.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-10 14:06:12 +02:00
Jonas Bark
46cdc2396d mywhoosh fix 2026-06-10 13:02:53 +02:00
Jonas Bark
df18e4ff2f advertisement fix 2026-06-10 11:09:35 +02:00
Jonas Bark
0573c2544c update modules 2026-06-10 09:35:23 +02:00
Jonas Bark
a60a1384e3 Merge origin/universal-ble-2-peripheral: universal_ble 2.0.0 peripheral mode
Brings the BLE peripheral-mode migration to universal_ble 2.0.0 into the
WiFi DirCon trainer-discovery branch and bumps universal_ble to the latest
fork commit (ref: changes, 2.0.0).

Conflict resolutions:
- prop submodule: merged the universal_ble 2.0 transporter migration with
  the WiFi DirCon TrainerTransport refactor; kept the '0x' short-UUID
  normalisation on startAdvertising. Updated BleCharacteristic call sites
  to the new 3-arg (uuid, properties, descriptors) constructor.
- obc_ble_emulator.dart: took the PeripheralServer / universal_ble 2.0
  write-handler migration; kept the richer Error(button:) context on
  sendAction (using _currentDeviceId, the migrated connection tracker).
- unlock.dart: kept the main.dart import.
- pubspec.yaml: kept version 6.0.0+135; took ref: changes for universal_ble.

Pre-existing prop test failures (composite/dircon/fitness serviceUUIDs) are
unchanged by this merge — they fail identically on the pre-merge branch.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-10 09:19:58 +02:00
Jonas Bark
e79edf4809 UI adjustments 2026-06-10 08:53:30 +02:00
Jonas Bark
1ce9ab43c0 fix scanner 2026-06-10 07:23:36 +02:00
Jonas Bark
5563bedf9b chore: bump prop submodule to WiFi DirCon trainer transport work
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-10 07:10:52 +02:00
Jonas Bark
95c717e58d feat: surface mDNS-discovered DirCon trainers in Connection.proxyDevices
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-10 07:10:40 +02:00
Jonas Bark
51747eb4f4 feat: ProxyDevice.wifi — bridge DirCon trainers through TrainerTransport seams
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-10 07:10:40 +02:00
Jonas Bark
d7aef3ff04 feat: add WifiTrainerScanner with mDNS browsing and self-exclusion
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-10 07:10:40 +02:00
Jonas Bark
4e2a922760 feat: use shared BikeControl mDNS marker constants; register obc advertisement
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-10 07:10:40 +02:00
Jonas Bark
c957817fb5 fix logic 2026-06-09 22:13:17 +02:00
Jonas Bark
ad175eff9e Merge branch 'main' into 6.0.0 2026-06-08 16:06:30 +02:00
jonasbark
514c8ef025 Update Windows Store version to 6.0.0 2026-06-07 15:45:36 +02:00
Jonas Bark
7cbedd491e fix logic 2026-06-07 09:21:49 +02:00
Jonas Bark
365893256d UX 2026-06-07 08:32:14 +02:00
Jonas Bark
e3985611cf fix bluetooth parsing - fixes https://github.com/OpenBikeControl/bikecontrol/issues/366 2026-06-06 21:59:13 +02:00
Jonas Bark
6ca4852491 fix mobile UI 2026-06-06 21:33:01 +02:00
Jonas Bark
57f0b707d8 enable trainingpeaks, version++ 2026-06-06 20:31:27 +02:00
Jonas Bark
8310e881dc Fix UX, translation 2026-06-06 20:21:13 +02:00
Jonas Bark
27919882b4 Fix UX, translation 2026-06-06 20:20:29 +02:00
Jonas Bark
8f221245cc new unlock method 2026-06-06 19:54:00 +02:00
jonasbark
625af6a991 Update Windows Store version to 5.6.0 2026-06-04 12:30:53 +02:00
Jonas Bark
c66657bb1a version++ 2026-06-03 16:13:20 +02:00
Jonas Bark
f35ff80b1e fix #3 2026-06-03 16:10:55 +02:00
Jonas Bark
c8a98d6fcd fix #2 2026-06-03 16:00:00 +02:00
Jonas Bark
1045fc4599 fix #1 2026-06-03 15:50:10 +02:00
Jonas Bark
e9772a34a8 add missing Zwift Play button placements 2026-06-03 11:39:13 +02:00
Jonas Bark
ce19e629c2 add missing Zwift Play button placements 2026-06-03 11:35:44 +02:00
Jonas Bark
0ec9943c35 version++ 2026-06-02 22:22:38 +02:00
Jonas Bark
a5e57049c4 Flutter version update 2026-06-02 21:30:37 +02:00
Jonas Bark
846433772e submodule index 2026-06-02 21:19:47 +02:00
Jonas Bark
39a75f9472 fix submodule index 2026-06-02 21:19:20 +02:00
Jonas Bark
594cbec9c7 Merge branch 'draft'
# Conflicts:
#	.github/workflows/build.yml
#	.github/workflows/patch.yml
#	.github/workflows/web.yml
#	.gitignore
#	CHANGELOG.md
#	WINDOWS_STORE_VERSION.txt
#	lib/bluetooth/connection.dart
#	lib/bluetooth/devices/base_device.dart
#	lib/bluetooth/devices/bluetooth_device.dart
#	lib/bluetooth/devices/mywhoosh/link.dart
#	lib/bluetooth/devices/openbikecontrol/obc_ble_emulator.dart
#	lib/bluetooth/devices/openbikecontrol/obc_mdns_emulator.dart
#	lib/bluetooth/devices/proxy/proxy_device.dart
#	lib/bluetooth/devices/shimano/di2_emulator.dart
#	lib/bluetooth/devices/wahoo/wahoo_kickr_headwind.dart
#	lib/bluetooth/devices/zwift/constants.dart
#	lib/bluetooth/devices/zwift/ftms_mdns_emulator.dart
#	lib/bluetooth/devices/zwift/zwift_clickv2.dart
#	lib/bluetooth/devices/zwift/zwift_emulator.dart
#	lib/bluetooth/messages/notification.dart
#	lib/bluetooth/remote_keyboard_pairing.dart
#	lib/bluetooth/remote_pairing.dart
#	lib/i10n/intl_de.arb
#	lib/i10n/intl_en.arb
#	lib/i10n/intl_es.arb
#	lib/i10n/intl_fr.arb
#	lib/i10n/intl_it.arb
#	lib/i10n/intl_pl.arb
#	lib/pages/button_edit.dart
#	lib/pages/configuration.dart
#	lib/pages/navigation.dart
#	lib/pages/overview.dart
#	lib/pages/proxy.dart
#	lib/pages/proxy_device_details.dart
#	lib/pages/proxy_device_details/connection_card.dart
#	lib/pages/proxy_device_details/live_metrics_section.dart
#	lib/pages/proxy_device_details/overlay_settings_section.dart
#	lib/pages/support_chat/support_chat_page.dart
#	lib/pages/unlock.dart
#	lib/services/support_chat_models.dart
#	lib/services/support_chat_service.dart
#	lib/services/telemetry_snapshot.dart
#	lib/services/workout/trainer_metrics.dart
#	lib/utils/actions/android.dart
#	lib/utils/actions/base_actions.dart
#	lib/utils/actions/desktop.dart
#	lib/utils/actions/remote.dart
#	lib/utils/core.dart
#	lib/utils/keymap/apps/rouvy.dart
#	lib/utils/keymap/apps/supported_app.dart
#	lib/utils/settings/settings.dart
#	lib/widgets/apps/zwift_mdns_tile.dart
#	lib/widgets/controller/trigger_assignment_popup.dart
#	lib/widgets/keymap_explanation.dart
#	lib/widgets/menu.dart
#	lib/widgets/ui/animated_button_widget.dart
#	lib/widgets/ui/button_widget.dart
#	lib/widgets/ui/help_button.dart
#	prop
#	pubspec.lock
#	pubspec.yaml
#	test/screenshot_test.dart
#	test/utils/core_logic_preferred_bridge_transport_test.dart
2026-06-02 21:17:27 +02:00
Jonas Bark
b492a4e9a6 update changelog, version 2026-06-02 21:14:34 +02:00
Jonas Bark
6251bd0148 fix misleading warning 2026-06-02 07:55:21 +02:00
Jonas Bark
b0c06a0b70 flag MyWhoosh-over-OBP unsupported actions in button mapping popup
Add a per-card "not well supported by MyWhoosh, yet" note under OBP
actions that MyWhoosh handles poorly (Gear Set, Up/Down, Left/Right,
Select, Back, Menu, Home, Camera View) and float the well-supported
actions (shift / steer) to the top of the list.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-06-01 12:45:37 +02:00
Jonas Bark
3de50a0907 fix button mapping popup 2026-06-01 12:01:31 +02:00
Jonas Bark
a68b68a1b4 fix button mapping popup 2026-06-01 11:53:55 +02:00
Jonas Bark
bd7cb80014 feat: reload emulator advertisement when trainer app changes
- Settings.trainerAppListenable fires from setTrainerApp.
- Connection.initialize listens and restarts ftmsEmulator + each
  ProxyDevice's _proxyEmulator so the new advertisement name (e.g.
  "Zwift Hub" for Rouvy) appears on the wire without reconnect.
- ProxyDevice.restartProxyEmulator no-ops in VS mode (ftmsEmulator
  handles itself).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-31 18:33:33 +02:00
Jonas Bark
f2c8245370 translations 2026-05-31 17:20:25 +02:00
Jonas Bark
e518c47a28 animations 2026-05-31 10:40:28 +02:00
Jonas Bark
0bfd483ba1 Merge branch '5.5.0' into draft
# Conflicts:
#	prop
2026-05-31 10:26:25 +02:00
Jonas Bark
ceda4f1e55 fix submodule index 2026-05-25 21:18:23 +02:00
Jonas Bark
461fe8a420 Zwift Play Firmware 2.0.1 support 2026-05-25 21:14:49 +02:00
Jonas Bark
dd07c6a680 update libs 2026-05-25 20:40:58 +02:00
Jonas Bark
60ba3121c6 animations 2026-05-25 20:13:08 +02:00