Update app.js

master
weeurey 2021-11-20 18:14:50 +00:00 committed by GitHub
parent 438537ace2
commit c1b467ba8e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 0 deletions

View File

@ -57,19 +57,24 @@ if (next) {
if(lasty > 40){
writeLine('Down', 3);
// setTimeout(drawApp, 1000);
Bluetooth.println(JSON.stringify({t:"music", n:"volumedown"}));
down(() => {});
}
else if(lasty < -40){
writeLine('Up', 3);
// setTimeout(drawApp, 1000);
Bluetooth.println(JSON.stringify({t:"music", n:"volumeup"}));
up(() => {});
} else if(lastx < -40){
writeLine('Prev', 3);
// setTimeout(drawApp, 1000);
Bluetooth.println(JSON.stringify({t:"music", n:"previous"}));
prev(() => {});
} else if(lastx > 40){
writeLine('Next', 3);
// setTimeout(drawApp, 1000);
Bluetooth.println(JSON.stringify({t:"music", n:"next"}));
next(() => {});
} else if(lastx==0 && lasty==0){
writeLine('play/pause', 3);