Update app.js
parent
438537ace2
commit
c1b467ba8e
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Reference in New Issue