From 7b2319b1727dd25d16f12351376cdba75a404fb1 Mon Sep 17 00:00:00 2001 From: Reiner Herrmann Date: Fri, 17 Jul 2026 01:12:18 +0200 Subject: make settings configurable via phone app --- src/pkjs/config.json | 73 ++++++++++++++++++++++++++++++++++++++++++++++++++++ src/pkjs/index.js | 3 +++ 2 files changed, 76 insertions(+) create mode 100644 src/pkjs/config.json create mode 100644 src/pkjs/index.js (limited to 'src/pkjs') 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); -- cgit v1.2.3