Update app.js
parent
438537ace2
commit
c1b467ba8e
|
|
@ -57,19 +57,24 @@ if (next) {
|
||||||
if(lasty > 40){
|
if(lasty > 40){
|
||||||
writeLine('Down', 3);
|
writeLine('Down', 3);
|
||||||
// setTimeout(drawApp, 1000);
|
// setTimeout(drawApp, 1000);
|
||||||
|
Bluetooth.println(JSON.stringify({t:"music", n:"volumedown"}));
|
||||||
down(() => {});
|
down(() => {});
|
||||||
}
|
}
|
||||||
else if(lasty < -40){
|
else if(lasty < -40){
|
||||||
writeLine('Up', 3);
|
writeLine('Up', 3);
|
||||||
// setTimeout(drawApp, 1000);
|
// setTimeout(drawApp, 1000);
|
||||||
|
Bluetooth.println(JSON.stringify({t:"music", n:"volumeup"}));
|
||||||
|
|
||||||
up(() => {});
|
up(() => {});
|
||||||
} else if(lastx < -40){
|
} else if(lastx < -40){
|
||||||
writeLine('Prev', 3);
|
writeLine('Prev', 3);
|
||||||
// setTimeout(drawApp, 1000);
|
// setTimeout(drawApp, 1000);
|
||||||
|
Bluetooth.println(JSON.stringify({t:"music", n:"previous"}));
|
||||||
prev(() => {});
|
prev(() => {});
|
||||||
} else if(lastx > 40){
|
} else if(lastx > 40){
|
||||||
writeLine('Next', 3);
|
writeLine('Next', 3);
|
||||||
// setTimeout(drawApp, 1000);
|
// setTimeout(drawApp, 1000);
|
||||||
|
Bluetooth.println(JSON.stringify({t:"music", n:"next"}));
|
||||||
next(() => {});
|
next(() => {});
|
||||||
} else if(lastx==0 && lasty==0){
|
} else if(lastx==0 && lasty==0){
|
||||||
writeLine('play/pause', 3);
|
writeLine('play/pause', 3);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue