From 403bd9c248140470c6b2672da19bb34270835e75 Mon Sep 17 00:00:00 2001 From: thyttan <6uuxstm66@mozmail.comā©> Date: Sat, 9 Sep 2023 09:28:44 +0200 Subject: [PATCH] slidertest:accommodate shortened keys for bt msgs ... vs = Volume Set level. vg = Volume Get level. --- apps/slidertest/app.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/slidertest/app.js b/apps/slidertest/app.js index 6c4a622a963..c0e4634086d 100644 --- a/apps/slidertest/app.js +++ b/apps/slidertest/app.js @@ -4,7 +4,7 @@ Bangle.setLCDTimeout(0) // Easier to read the screen while developing. // Callbacks for use with the sliders let callback = (mode,fb)=>{ - if (mode =="map") Bangle.musicControl({cmd:"volumesetlevel",extra:Math.round(100*fb/30)}); + if (mode =="map") Bangle.musicControl({cmd:"vs",extra:Math.round(100*fb/30)}); // vs = Volume Set level if (mode =="incr") Bangle.musicControl(fb>0?"volumedown":"volumeup"); if (mode =="remove") { audioLevels.c = fb; @@ -61,7 +61,7 @@ let init = ()=> { let audioLevels = {u:30, c:15}; // Init with values to avoid "Uncaught Error: Cannot read property 'u' of undefined" if values were not gathered from Gadgetbridge. let audioHandler = (e)=>{audioLevels = e;}; Bangle.on('audio', audioHandler); -Bangle.musicControl("volumegetlevel"); +Bangle.musicControl("vg"); // vg = Volume Get lt evel // Bangle.emit("message", type, msg); let trackPosition = 0;