Skip to content

Commit

Permalink
slidertest:accommodate shortened keys for bt msgs
Browse files Browse the repository at this point in the history
... vs = Volume Set level. vg = Volume Get level.
  • Loading branch information
thyttan committed Sep 9, 2023
1 parent b1c5387 commit 589880f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions apps/slidertest/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -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",e:Math.round(100*fb/30)}); // vs = Volume Set level
if (mode =="incr") Bangle.musicControl(fb>0?"volumedown":"volumeup");
if (mode =="remove") {
audioLevels.c = fb;
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit 589880f

Please sign in to comment.