diff options
| author | Reiner Herrmann <reiner@reiner-h.de> | 2026-07-17 01:12:18 +0200 |
|---|---|---|
| committer | Reiner Herrmann <reiner@reiner-h.de> | 2026-07-17 01:12:18 +0200 |
| commit | 7b2319b1727dd25d16f12351376cdba75a404fb1 (patch) | |
| tree | c46f480e22dbdb7a345240813d2ab7c5fa083217 /src/pkjs | |
| parent | df2fbf4c9291cce340945a0a71de0200ccae7369 (diff) | |
make settings configurable via phone app
Diffstat (limited to 'src/pkjs')
| -rw-r--r-- | src/pkjs/config.json | 73 | ||||
| -rw-r--r-- | src/pkjs/index.js | 3 |
2 files changed, 76 insertions, 0 deletions
diff --git a/src/pkjs/config.json b/src/pkjs/config.json new file mode 100644 index 0000000..d672ea7 --- /dev/null +++ b/src/pkjs/config.json @@ -0,0 +1,73 @@ +[ + { + "type": "section", + "items": [ + { + "type": "heading", + "defaultValue": "Beats" + }, + { + "type": "slider", + "messageKey": "bpm", + "defaultValue": 90, + "label": "Per Minute", + "min": 1, + "max": 200 + }, + { + "type": "slider", + "messageKey": "beats", + "defaultValue": 4, + "label": "Per Bar", + "min": 1, + "max": 16 + } + ] + }, + { + "type": "section", + "items": [ + { + "type": "heading", + "defaultValue": "Settings" + }, + { + "type": "slider", + "messageKey": "volume", + "label": "Volume", + "defaultValue": 100, + "min": 1, + "max": 100, + "capabilities": [ + "PLATFORM_EMERY" + ] + }, + { + "type": "slider", + "messageKey": "volume", + "label": "Volume", + "defaultValue": 100, + "min": 1, + "max": 100, + "capabilities": [ + "PLATFORM_FLINT" + ] + }, + { + "type": "checkboxgroup", + "messageKey": "beat_indicators", + "label": "Beat indicators", + "defaultValue": [true, true, true], + "options": [ + "Flashing", + "Vibration", + "Beep" + ] + } + ] + }, + { + "type": "submit", + "defaultValue": "Save" + } +] diff --git a/src/pkjs/index.js b/src/pkjs/index.js new file mode 100644 index 0000000..3f7cff9 --- /dev/null +++ b/src/pkjs/index.js @@ -0,0 +1,3 @@ +var Clay = require('@rebble/clay'); +var clayConfig = require('./config.json'); +var clay = new Clay(clayConfig); |
