Commit Graph

35 Commits

Author SHA1 Message Date
Jonas Bark
ff9671bfc5 fix: no crash on button press when no keymap is set
The keymap ('app') and the trainer app ('trainer_app') are independent
prefs. When the keymap one is missing while a trainer app is selected,
actionHandler.supportedApp stays null — every button press then threw
"Null check operator used on a null value" and the device registered no
buttons at all, so the SRAM edit screen came up empty.

- RemoteActions/DesktopActions/AndroidActions no longer dereference
  supportedApp (or getKeyPair) with `!`; they return the same
  noKeymapSet / noActionAssigned Error BaseActions already produces.
- Fall back to the selected trainer app when the keymap pref can't be
  resolved (initializeActions, Settings.init, deleteCustomAppProfile).
- BaseDevice.getOrAddButton keeps the created button in availableButtons
  even without a keymap, so the device still renders its buttons.
- The OBC BLE/mDNS emulators evaluated connectedApp.value! before the
  null guard that follows, making the guard dead code — reordered.
- handleButtonsClicked now forwards through recordError, which is why
  this never showed up in crash reporting.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-17 13:14:09 +02:00
Jonas Bark
c957817fb5 fix logic 2026-06-09 22:13:17 +02:00
Jonas Bark
a68b68a1b4 fix button mapping popup 2026-06-01 11:53:55 +02:00
Jonas Bark
33c6346865 fallback when multiple triggers are defined 2026-02-25 19:13:51 +01:00
Jonas Bark
f4b9a349d0 individual actions for single, double, long press 2026-02-25 11:20:18 +01:00
Jonas Bark
5c057f9bd4 enable shortcuts on iOS as well 2026-02-24 10:56:23 +01:00
Jonas Bark
34fade442e shortcuts only available on macOS 2026-02-22 18:43:12 +01:00
Jonas Bark
403ee4e9f9 macOS: open specific shortcut 2026-02-22 18:40:58 +01:00
Jonas Bark
6686278457 add new remote keyboard connection method 2026-02-05 17:22:21 +01:00
Jonas Bark
26b24716b9 cleanup streams on exit 2026-02-01 10:08:31 +01:00
Jonas Bark
5a67f2ee76 remove remains of swift_control 2025-12-14 16:22:07 +01:00
Jonas Bark
cdd4a69716 control your trainer manually without requiring a controller - just like a Companion app 2025-12-10 18:57:08 +01:00
Jonas Bark
18317f3421 refactoring 2025-12-06 15:06:12 +01:00
Jonas Bark
f9e8859a83 refactoring 2025-12-06 11:46:18 +01:00
Jonas Bark
59090fdf79 keydown / key up handling for direct connections 2025-12-04 21:17:43 +00:00
Jonas Bark
f5387718f4 ui, fixes 2025-12-04 20:59:07 +00:00
Jonas Bark
eb3996a288 openbikeprotocol Bluetooth emulator 2025-11-29 17:10:23 +00:00
Jonas Bark
9c2a62bd94 less god objects 2025-11-29 13:12:09 +00:00
Jonas Bark
faa5fe92f1 better error handling 2025-11-23 08:56:30 +00:00
Jonas Bark
f42caaa27b show action results in the UI 2025-11-23 08:33:19 +00:00
Jonas Bark
6da4ee8b76 small refactoring 2025-11-17 12:49:09 +01:00
Jonas Bark
7d0079feea integration #1 2025-10-28 17:58:44 +01:00
Jonas Bark
78cb4c3fb6 cleanup, fixes 2025-10-27 13:43:18 +01:00
Jonas Bark
ff2c77bf2f implement MyWhoosh link in the editor 2025-10-27 12:14:41 +01:00
Jonas Bark
86beb71897 restart scanning when bluetooth turned on, cleanup when turned off
remove Sterzo from Readme until confirmed working
2025-10-19 12:44:44 +02:00
Jonas Bark
62097ec7ea - improve iOS reactivity by delaying button events for a few milliseconds
- use correct icon for shift down buttons
- add more troubleshooting for iOS devices
2025-10-15 16:32:13 +02:00
Jonas Bark
92379bfb41 fix issue #101 2025-10-14 09:15:37 +02:00
Jonas Bark
eed07457a9 refactor device handling to support more devices #2 2025-10-13 11:09:18 +02:00
Jonas Bark
02fbfdc78f refactor device handling to support more devices #1 2025-10-13 10:59:12 +02:00
Jonas Bark
9f37246601 make the UI look nicer 2025-10-10 14:23:14 +02:00
Jonas Bark
d04e77c183 UI changes and fixes 2025-10-10 11:06:16 +02:00
Jonas Bark
8dfe52244a zommable customize keymap screen 2025-10-09 14:53:54 +02:00
Jonas Bark
1b005a7287 rebuild 2025-10-09 13:34:58 +02:00
Jonas Bark
d9cecc52fa android works okish 2025-10-08 11:10:26 +02:00
Jonas Bark
8e3646f90f refactoring to allow remote handling on non iOS devices 2025-10-08 10:34:53 +02:00