diff --git a/apps/ctrlpad/ChangeLog b/apps/ctrlpad/ChangeLog index b0e479108..c2829d1b1 100644 --- a/apps/ctrlpad/ChangeLog +++ b/apps/ctrlpad/ChangeLog @@ -1,5 +1 @@ -0.01: New widget - music control via a swipe -0.02: Improve interactivity - avoid responding to swipes when a menu or - launcher is active. -0.03: Handle errors when sending input over BLE and the special-case of - replacing a single handler +0.01: New app - forked from widhid diff --git a/apps/ctrlpad/README.md b/apps/ctrlpad/README.md index 652a2ed49..93db8d5b6 100644 --- a/apps/ctrlpad/README.md +++ b/apps/ctrlpad/README.md @@ -1,22 +1,16 @@ # Description -A music control widget based on [Swipe Bluetooth Music Controls] (based on [Bluetooth Music Controls]). -By operating as a widget, you can control music without leaving your current app (e.g. on a run, bike ride or just watching the clock). +A control pad app to provide fast access to common functions, such as bluetooth power, HRM and Do Not Disturb. +By dragging from the top of the watch, you have this control without leaving your current app (e.g. on a run, bike ride or just watching the clock). -[Swipe Bluetooth Music Controls]: https://github.com/espruino/BangleApps/tree/master/apps/hidmsicswipe -[Bluetooth Music Controls]: https://github.com/espruino/BangleApps/tree/master/apps/hidmsic - # Usage -Swipe down to enable - note the icon changes from blue to orange, indicating it's listening for your instruction. Then drag up/down for volume, left/right for previous and next and tap for play/pause. - -All other watch interaction is disabled for 3 seconds, to prevent clashing taps/drags - this period is extended as you continue to alter the volume, play/pause and jump between tracks. +Swipe down to enable and observe the overlay being dragged in. Swipe up on the overlay to hide it again. Then tap on a given button to trigger it. Requires espruino firmware > 2v17 to avoid event handler clashes. + # Setup / Technical details -Note that HID must be enabled in settings. Then provided you're paired with your phone/computer, the widget icon will appear and you can control music from your clock face! - -The app disables all other drag and tap handlers while this widget is "active" (in a similar manner to [`backswipe`](https://github.com/espruino/BangleApps/pull/2524#issuecomment-1406230564) and [`lightswitch`](https://github.com/espruino/Espruino/issues/2151#issuecomment-1042423211)). +The control pad disables drag and touch event handlers while active, preventing other apps from interfering. diff --git a/apps/ctrlpad/icon.js b/apps/ctrlpad/icon.js index a8f9cbdb4..1e139312b 100644 --- a/apps/ctrlpad/icon.js +++ b/apps/ctrlpad/icon.js @@ -1 +1 @@ -require("heatshrink").decompress(atob("mEwwkBiIA/AEhtDNSSHGCyIbFGJ0QFAowIA48QE4oGBBAomBHAxXHA4IJED5IXJCAcQIAxGGC4YKEI44HCBAxAGO4wXBB4JYGNRBfHC/6HFB4wXHUA6YIC4oOCGA6YGU4quHJ5LXGdJIXNF65fIC5AQFQorHJXxwXJK5xGJC65GsgJG/Iw4uUfgIuUC4QWTIwIusLq4WBFy50tC1YXBCyoA/ADw=")) +require("heatshrink").decompress(atob("lcshAzwp9WlgAXldWp8rp5bIq1drwAdq0rFI1XBodXAC4rErorEFIlWLAOCAC2IxGCFY9WA4VWCAQAbJgavBlanCqwodFYpWBp4pCKbwACQYVQfoJUUruBD4dXBQeBBQZWCQIIqBq9dFSNXD4eBFQldDwgqBq4qDP4xEBqwKHFS6qFwVWQ4OsAgYqhAoOtAAYsBFUAbBFImI1uBDIgqQq4qJqwpEwIGCKwgqEroKEFQhsBFRNPwIACVIIECp4qHq16CAKATCAIACqwFEFQxIB6/XRoZVQABwqHLgQqiQAWAQBAqeD4IEDVaLRBABAqJq4qJq5VdwIqKQDwqWQBtXqoUDFQmBCAI2DKq+BvXX6wxCFQb6B6/XEAYqXrurD4N6CoIqDwOBBQIDBQCY1FJQOs1hVIBQgqLwQAFKwwgBVZAKFQDAlCCYYqEBQoqaq4qJrtdFTzJCFX4qoS4gqmCwYqewQqFQIIqhq9XEoNPp4qCQKOBCQeCPQgKEKAdWlYEBrpWSABtWKgNelcAQIdXFbxQBEYQqBgErrpXDq+CADBIBKYRUCAAKCBFYQsCADAoDrzTBFQRWBlZfCADp9BFIgACp4tCq4AYqxMCFAwAEBhgAWA==")) diff --git a/apps/ctrlpad/icon.js.png b/apps/ctrlpad/icon.js.png new file mode 100644 index 000000000..295b31f81 Binary files /dev/null and b/apps/ctrlpad/icon.js.png differ diff --git a/apps/ctrlpad/icon.png b/apps/ctrlpad/icon.png index 2ccc88883..39634ea4d 100644 Binary files a/apps/ctrlpad/icon.png and b/apps/ctrlpad/icon.png differ diff --git a/apps/ctrlpad/wid.js b/apps/ctrlpad/main.js similarity index 100% rename from apps/ctrlpad/wid.js rename to apps/ctrlpad/main.js diff --git a/apps/ctrlpad/wid.ts b/apps/ctrlpad/main.ts similarity index 100% rename from apps/ctrlpad/wid.ts rename to apps/ctrlpad/main.ts diff --git a/apps/ctrlpad/metadata.json b/apps/ctrlpad/metadata.json index b819c9b64..b7ece7d61 100644 --- a/apps/ctrlpad/metadata.json +++ b/apps/ctrlpad/metadata.json @@ -1,16 +1,16 @@ { - "id": "widhid", - "name": "Bluetooth Music Swipe Control Widget", - "shortName": "BLE Swipe Widget", - "version": "0.03", - "description": "Based on Swipe Bluetooth Music Controls (based on Bluetooth Music Controls). Swipe down to enable, then swipe up/down for volume, left/right for previous and next and tap for play/pause. Enable HID in settings, pair with your phone/computer, then use this widget to control music from your watch!", + "id": "ctrlpad", + "name": "Control Panel", + "shortName": "ctrlpad", + "version": "0.01", + "description": "Fast access (via a downward swipe) to common functions, such as bluetooth/HRM power and Do Not Disturb", "icon": "icon.png", "readme": "README.md", - "type": "widget", - "tags": "widget,bluetooth,music", + "type": "bootloader", + "tags": "bluetooth", "supports": ["BANGLEJS2"], "storage": [ - {"name":"widhid.wid.js","url":"wid.js"}, - {"name":"widhid.img","url":"icon.js","evaluate":true} + {"name":"ctrlpad.boot.js","url":"main.js"}, + {"name":"ctrlpad.img","url":"icon.js","evaluate":true} ] } diff --git a/apps/ctrlpad/widget-active.png b/apps/ctrlpad/widget-active.png deleted file mode 100644 index 74ce4b2a0..000000000 Binary files a/apps/ctrlpad/widget-active.png and /dev/null differ diff --git a/apps/ctrlpad/widget.png b/apps/ctrlpad/widget.png deleted file mode 100644 index dfb108060..000000000 Binary files a/apps/ctrlpad/widget.png and /dev/null differ