From 994ea1298b703985cff6aee223cfd47f00f922c1 Mon Sep 17 00:00:00 2001 From: radsvvid <84921310+radsvvid@users.noreply.github.com> Date: Fri, 28 May 2021 00:50:30 +0200 Subject: [PATCH 01/15] Create ChangeLog --- apps/gbtwist/ChangeLog | 1 + 1 file changed, 1 insertion(+) create mode 100644 apps/gbtwist/ChangeLog diff --git a/apps/gbtwist/ChangeLog b/apps/gbtwist/ChangeLog new file mode 100644 index 000000000..e6a8d1263 --- /dev/null +++ b/apps/gbtwist/ChangeLog @@ -0,0 +1 @@ +Initial version From a10792af7fa5a8cc90a3548ae7dc41a16450e7ee Mon Sep 17 00:00:00 2001 From: radsvvid <84921310+radsvvid@users.noreply.github.com> Date: Fri, 28 May 2021 00:50:50 +0200 Subject: [PATCH 02/15] Add files via upload --- apps/gbtwist/app-icon.js | 1663 +++++++++++++++++++++++++++ apps/gbtwist/app.js | 2071 ++++++++++++++++++++++++++++++++++ apps/gbtwist/app.png | 1548 +++++++++++++++++++++++++ apps/gbtwist/screenshot1.jpg | 1611 ++++++++++++++++++++++++++ 4 files changed, 6893 insertions(+) create mode 100644 apps/gbtwist/app-icon.js create mode 100644 apps/gbtwist/app.js create mode 100644 apps/gbtwist/app.png create mode 100644 apps/gbtwist/screenshot1.jpg diff --git a/apps/gbtwist/app-icon.js b/apps/gbtwist/app-icon.js new file mode 100644 index 000000000..d460c76b4 --- /dev/null +++ b/apps/gbtwist/app-icon.js @@ -0,0 +1,1663 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + BangleApps/app-icon.js at master · radsvvid/BangleApps + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ Skip to content + + + + + + + + + + +
+ +
+ + + + + +
+ + + +
+ + + + + + + + + +
+
+
+ + + + + + + + + + +
+ +
+ +
+

+ + + / + + BangleApps + + +

+ + + forked from espruino/BangleApps + + +
+ +
    + +
  • + +
    + + + + + + + + Watch + + + + + +
    +
    +

    Notifications

    + +
    + +
    +
    + + + + + + + + +
    + +
    +
    +
    + + +
    +
    + +
    + + + +
  • + +
  • +
    +
    + + +
    +
    + + +
    + +
  • + +
  • + + + Fork + + +
  • +
+ +
+ + + + +
+ + +
+
+ + + + +
+ + + + Permalink + + + +
+ +
+
+ + + master + + + + +
+
+
+ Switch branches/tags + +
+ + + +
+ +
+ +
+ + +
+ +
+ + + + + + + + + + + + + + + + +
+ + +
+
+
+
+ +
+ +
+ + + + Go to file + + +
+ + + + + + + + + +
+
+
+ + + +
+ +
+
+
 
+
+ +
+
 
+ Cannot retrieve contributors at this time +
+
+ + + + + + + + + + + + + +
+ +
+ + +
+ + 1 lines (1 sloc) + + 283 Bytes +
+ +
+ + + +
+ + + + +
+ +
+
+ +
+
+ +
+ +
+
+ + + +
+ + + + + + +
require("heatshrink").decompress(atob("mEwwhC/AC3wCysP/4vW/4YWGAJJWGC4YBGCJ1EJKAQBAAZJFh4WPCgQwDGZIWHDAgXKCxAtDAgYuPGAgXIFJIGFC5w3EAwQXHIwoMDBIanJC56NNLARIHC543IC+jVGC454IC96P/C8D9HOxwXDEggXMh4QEC5JGHEAYlGC5wJBJArfFRhRZHFxYkBJIYqFFxYXCAQJJEUhoXCPQhcNAATQFEIwAOJIYAUIJgYjJOIvWAEw="))
+ + + +
+ +
+ + + + +
+ + +
+ + +
+
+ + + + +
+ + + +
+
+ +
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + diff --git a/apps/gbtwist/app.js b/apps/gbtwist/app.js new file mode 100644 index 000000000..3e3e00c7e --- /dev/null +++ b/apps/gbtwist/app.js @@ -0,0 +1,2071 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + BangleApps/app.js at master · radsvvid/BangleApps + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ Skip to content + + + + + + + + + + +
+ +
+ + + + + +
+ + + +
+ + + + + + + + + +
+
+
+ + + + + + + + + + +
+ +
+ +
+

+ + + / + + BangleApps + + +

+ + + forked from espruino/BangleApps + + +
+ +
    + +
  • + +
    + + + + + + + + Watch + + + + + +
    +
    +

    Notifications

    + +
    + +
    +
    + + + + + + + + +
    + +
    +
    +
    + + +
    +
    + +
    + + + +
  • + +
  • +
    +
    + + +
    +
    + + +
    + +
  • + +
  • + + + Fork + + +
  • +
+ +
+ + + + +
+ + +
+
+ + + + +
+ + + + Permalink + + + +
+ +
+
+ + + master + + + + +
+
+
+ Switch branches/tags + +
+ + + +
+ +
+ +
+ + +
+ +
+ + + + + + + + + + + + + + + + +
+ + +
+
+
+
+ +
+ +
+ + + + Go to file + + +
+ + + + + + + + + +
+
+
+ + + +
+ +
+
+
 
+
+ +
+
 
+ Cannot retrieve contributors at this time +
+
+ + + + + + + + + + + + + +
+ +
+ + +
+ + 100 lines (88 sloc) + + 1.98 KB +
+ +
+ + + +
+ + + + +
+ +
+
+ +
+
+ +
+ +
+
+ + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
// just a watch, to fill an empty screen
+
function drwClock() {
var d = new Date();
var h = d.getHours(), m = d.getMinutes();
var time = ("0"+h).substr(-2) + ":" + ("0"+m).substr(-2);
g.reset();
g.setFont('6x8',7);
g.setFontAlign(-1,-1);
g.drawString(time,20,80);
}
+
g.clear();
drwClock();
Bangle.loadWidgets();
Bangle.drawWidgets();
+
/////////////////////////////////////////////////////////////
// control music by twist/buttons
+
var counter = 0; //stores your counted your twists
var tstate = false; //are you ready to count the twists?
+
function playx() {
Bluetooth.println(JSON.stringify({t:"music", n:"play"}));
}
+
function volup() {
Bluetooth.println(JSON.stringify({t:"music", n:"volumeup"}));
}
+
function voldn() {
Bluetooth.println(JSON.stringify({t:"music", n:"volumedown"}));
}
+
function sendCmd() {
print (counter);
Bangle.beep(200,3000);
if (tstate==false && counter>0){
do {playx(); counter--;}
while (counter >= 1);
}
}
+
function twistctrl() {
if (tstate==false){
tstate=true;
setTimeout('tstate=false',4000);
setTimeout(sendCmd,4100);
Bangle.beep(200,3000);
}
else{
g.clearRect(10,140,230,200);
if (tstate==true){
if (counter < 5){
counter++;
drwCmd();
Bangle.buzz(100,2);
}
else {
counter = 0;
Bangle.buzz(400);
}
}
}
}
+
/////////////////////////////////////////////////////////////
// draw the command to be executed
+
function drwCmd() {
g.setFont('6x8',6);
g.setColor(0.3,1,0.3);
g.clearRect(10,140,230,200);
switch (counter){
case 1:
g.drawString('play',50,150);
break;
case 2:
g.drawString('next',50,150);
break;
case 3:
g.drawString('prev',50,150);
break;
case 4:
g.drawString('nx f',50,150);
break;
case 5:
g.drawString('pr f',50,150);
break;
case 0:
g.clearRect(10,140,230,200);
break;
}
}
+
setWatch(volup,BTN1,{repeat:true});
setWatch(voldn,BTN3,{repeat:true});
Bangle.on('twist',twistctrl);
setWatch(Bangle.showLauncher, BTN2, {repeat:false,edge:"falling"});
+ + + +
+ +
+ + + + +
+ + +
+ + +
+
+ + + + +
+ + + +
+
+ +
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + diff --git a/apps/gbtwist/app.png b/apps/gbtwist/app.png new file mode 100644 index 000000000..e12e3f4c3 --- /dev/null +++ b/apps/gbtwist/app.png @@ -0,0 +1,1548 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + BangleApps/app.png at master · radsvvid/BangleApps + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ Skip to content + + + + + + + + + + +
+ +
+ + + + + +
+ + + +
+ + + + + + + + + +
+
+
+ + + + + + + + + + +
+ +
+ +
+

+ + + / + + BangleApps + + +

+ + + forked from espruino/BangleApps + + +
+ +
    + +
  • + +
    + + + + + + + + Watch + + + + + +
    +
    +

    Notifications

    + +
    + +
    +
    + + + + + + + + +
    + +
    +
    +
    + + +
    +
    + +
    + + + +
  • + +
  • +
    +
    + + +
    +
    + + +
    + +
  • + +
  • + + + Fork + + +
  • +
+ +
+ + + + +
+ + +
+
+ + + + +
+ + + + Permalink + + + +
+ +
+
+ + + master + + + + +
+
+
+ Switch branches/tags + +
+ + + +
+ +
+ +
+ + +
+ +
+ + + + + + + + + + + + + + + + +
+ + +
+
+
+
+ +
+ +
+ + + + Go to file + + +
+ + + + + + + + + +
+
+
+ + + +
+ +
+
+
 
+
+ +
+
 
+ Cannot retrieve contributors at this time +
+
+ + + + + + + + + + + + + +
+ +
+ + +
+ + 906 Bytes +
+ +
+ + + +
+ + + + +
+ +
+
+ +
+ +
+
+ + + +
+
+ app.png +
+
+ +
+ + + + +
+ + +
+ + +
+
+ + +
+ + + +
+
+ +
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + diff --git a/apps/gbtwist/screenshot1.jpg b/apps/gbtwist/screenshot1.jpg new file mode 100644 index 000000000..93c33c5b6 --- /dev/null +++ b/apps/gbtwist/screenshot1.jpg @@ -0,0 +1,1611 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + BangleApps/screenshot1.jpg at master · radsvvid/BangleApps + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ Skip to content + + + + + + + + + + +
+ +
+ + + + + +
+ + + +
+ + + + + + + + + +
+
+
+ + + + + + + + + + +
+ +
+ +
+

+ + + / + + BangleApps + + +

+ + + forked from espruino/BangleApps + + +
+ +
    + +
  • + +
    + + + + + + + + Watch + + + + + +
    +
    +

    Notifications

    + +
    + +
    +
    + + + + + + + + +
    + +
    +
    +
    + + +
    +
    + +
    + + + +
  • + +
  • +
    +
    + + +
    +
    + + +
    + +
  • + +
  • + + + Fork + + +
  • +
+ +
+ + + + +
+ + +
+
+ + + + +
+ + + + Permalink + + + +
+ +
+
+ + + master + + + + +
+
+
+ Switch branches/tags + +
+ + + +
+ +
+ +
+ + +
+ +
+ + + + + + + + + + + + + + + + +
+ + +
+
+
+
+ +
+ +
+ + + + Go to file + + +
+ + + + + + + + + +
+
+
+ + + +
+ +
+
+ + + +
+ + + + + + +
+
+ + Latest commit + 7d5ae92 + May 27, 2021 + + + + + + History + + +
+
+ +
+ +
+
+ + + 1 + + contributor + + +
+ +

+ Users who have contributed to this file +

+
+ + + + + + +
+
+
+
+ + + + + + + + + + + + + +
+ +
+ + +
+ + 63.8 KB +
+ +
+ + + +
+ + + + +
+ +
+
+ +
+ +
+
+ + + +
+
+ screenshot1.jpg +
+
+ +
+ + + + +
+ + +
+ + +
+
+ + +
+ + + +
+
+ +
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + From 4c7707d0bd97b3eb2473497f9b52e5e171fc48eb Mon Sep 17 00:00:00 2001 From: radsvvid <84921310+radsvvid@users.noreply.github.com> Date: Fri, 28 May 2021 00:54:29 +0200 Subject: [PATCH 03/15] Update apps.json --- apps.json | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/apps.json b/apps.json index a0a819ca5..c2e9a4ca9 100644 --- a/apps.json +++ b/apps.json @@ -3230,5 +3230,20 @@ {"name":"doztime.app.js","url":"app.js"}, {"name":"doztime.img","url":"app-icon.js","evaluate":true} ] +}, +{ "id":"gbtwist", + "name":"Gadgetbridge Twist Control", + "shortName":"Twist Control", + "icon":"app.png", + "version":"0.01", + "description":"Shake your wrist to control your music app via Gadgetbridge", + "tags":"tools,bluetooth,gadgetbridge,music", + "type":"app", + "allow_emulator":false, + "readme": "README.md", + "storage": [ + {"name":"gbtwist.app.js","url":"app.js"}, + {"name":"gbtwist.img","url":"app-icon.js","evaluate":true} + ] } ] From f6973a6ab5a1ff812d556749d471d4efa41ad77c Mon Sep 17 00:00:00 2001 From: radsvvid <84921310+radsvvid@users.noreply.github.com> Date: Fri, 28 May 2021 01:00:11 +0200 Subject: [PATCH 04/15] Create README.md --- apps/gbtwist/README.md | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 apps/gbtwist/README.md diff --git a/apps/gbtwist/README.md b/apps/gbtwist/README.md new file mode 100644 index 000000000..c9bb28cd3 --- /dev/null +++ b/apps/gbtwist/README.md @@ -0,0 +1,10 @@ +# Gadgetbridge Twist Control + +Control your music app (e.g. MortPlayer Music [a folder based, not tag based player] ) that handles multiple play-commands (same as using a single-button-headset's button to change songs) on your Gadgetbridge-connected phone. + • Activate counting for 4 seconds with a twist (beeps at start and end of counting) + • twist multiple times for: + play/pause (1), next song (2), prev. song (3), next folder (4), prev. folder (5), reset counter (6) + • the command to be sent is shown in green + • Volume up/down is controlled by BTN1/BTN3 presses + + From 7161b62531a376cc72b520d3da575609e5ed046d Mon Sep 17 00:00:00 2001 From: radsvvid <84921310+radsvvid@users.noreply.github.com> Date: Fri, 28 May 2021 01:01:40 +0200 Subject: [PATCH 05/15] Update README.md --- apps/gbtwist/README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/apps/gbtwist/README.md b/apps/gbtwist/README.md index c9bb28cd3..a99b75300 100644 --- a/apps/gbtwist/README.md +++ b/apps/gbtwist/README.md @@ -7,4 +7,5 @@ Control your music app (e.g. MortPlayer Music [a folder based, not tag based pla • the command to be sent is shown in green • Volume up/down is controlled by BTN1/BTN3 presses - +![screenshot1](https://user-images.githubusercontent.com/84921310/119907281-3ad10d80-bf50-11eb-9818-c2247c99352c.jpg) + From 91377976653d64fc1bc3b69579629de6d1c4a5b6 Mon Sep 17 00:00:00 2001 From: radsvvid <84921310+radsvvid@users.noreply.github.com> Date: Fri, 28 May 2021 01:02:19 +0200 Subject: [PATCH 06/15] Delete screenshot1.jpg --- apps/gbtwist/screenshot1.jpg | 1611 ---------------------------------- 1 file changed, 1611 deletions(-) delete mode 100644 apps/gbtwist/screenshot1.jpg diff --git a/apps/gbtwist/screenshot1.jpg b/apps/gbtwist/screenshot1.jpg deleted file mode 100644 index 93c33c5b6..000000000 --- a/apps/gbtwist/screenshot1.jpg +++ /dev/null @@ -1,1611 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - BangleApps/screenshot1.jpg at master · radsvvid/BangleApps - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- Skip to content - - - - - - - - - - -
- -
- - - - - -
- - - -
- - - - - - - - - -
-
-
- - - - - - - - - - -
- -
- -
-

- - - / - - BangleApps - - -

- - - forked from espruino/BangleApps - - -
- -
    - -
  • - -
    - - - - - - - - Watch - - - - - -
    -
    -

    Notifications

    - -
    - -
    -
    - - - - - - - - -
    - -
    -
    -
    - - -
    -
    - -
    - - - -
  • - -
  • -
    -
    - - -
    -
    - - -
    - -
  • - -
  • - - - Fork - - -
  • -
- -
- - - - -
- - -
-
- - - - -
- - - - Permalink - - - -
- -
-
- - - master - - - - -
-
-
- Switch branches/tags - -
- - - -
- -
- -
- - -
- -
- - - - - - - - - - - - - - - - -
- - -
-
-
-
- -
- -
- - - - Go to file - - -
- - - - - - - - - -
-
-
- - - -
- -
-
- - - -
- - - - - - -
-
- - Latest commit - 7d5ae92 - May 27, 2021 - - - - - - History - - -
-
- -
- -
-
- - - 1 - - contributor - - -
- -

- Users who have contributed to this file -

-
- - - - - - -
-
-
-
- - - - - - - - - - - - - -
- -
- - -
- - 63.8 KB -
- -
- - - -
- - - - -
- -
-
- -
- -
-
- - - -
-
- screenshot1.jpg -
-
- -
- - - - -
- - -
- - -
-
- - -
- - - -
-
- -
-
- -
- - - - - - - - - - - - - - - - - - - - - - From a29614c88ac5c3822644357a5f4b4a8f0e43c4f1 Mon Sep 17 00:00:00 2001 From: radsvvid <84921310+radsvvid@users.noreply.github.com> Date: Fri, 28 May 2021 01:02:50 +0200 Subject: [PATCH 07/15] Update README.md --- apps/gbtwist/README.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/apps/gbtwist/README.md b/apps/gbtwist/README.md index a99b75300..2323296a5 100644 --- a/apps/gbtwist/README.md +++ b/apps/gbtwist/README.md @@ -7,5 +7,4 @@ Control your music app (e.g. MortPlayer Music [a folder based, not tag based pla • the command to be sent is shown in green • Volume up/down is controlled by BTN1/BTN3 presses -![screenshot1](https://user-images.githubusercontent.com/84921310/119907281-3ad10d80-bf50-11eb-9818-c2247c99352c.jpg) - +![screenshot1](https://user-images.githubusercontent.com/84921310/119907374-65bb6180-bf50-11eb-9073-f29f7e333e00.jpg) From dcca6f043dc7b4786f2fb147d6997efa010929dc Mon Sep 17 00:00:00 2001 From: radsvvid <84921310+radsvvid@users.noreply.github.com> Date: Fri, 28 May 2021 01:05:03 +0200 Subject: [PATCH 08/15] Update README.md --- apps/gbtwist/README.md | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/apps/gbtwist/README.md b/apps/gbtwist/README.md index 2323296a5..7e9dbcbe5 100644 --- a/apps/gbtwist/README.md +++ b/apps/gbtwist/README.md @@ -1,10 +1,15 @@ # Gadgetbridge Twist Control Control your music app (e.g. MortPlayer Music [a folder based, not tag based player] ) that handles multiple play-commands (same as using a single-button-headset's button to change songs) on your Gadgetbridge-connected phone. - • Activate counting for 4 seconds with a twist (beeps at start and end of counting) - • twist multiple times for: - play/pause (1), next song (2), prev. song (3), next folder (4), prev. folder (5), reset counter (6) - • the command to be sent is shown in green - • Volume up/down is controlled by BTN1/BTN3 presses +- Activate counting for 4 seconds with a twist (beeps at start and end of counting) +- twist multiple times for: + play/pause (1), + next song (2), + prev. song (3), + next folder (4), + prev. folder (5), + reset counter (6) +- the command to be sent is shown in green +- Volume up/down is controlled by BTN1/BTN3 presses ![screenshot1](https://user-images.githubusercontent.com/84921310/119907374-65bb6180-bf50-11eb-9073-f29f7e333e00.jpg) From 5ab3a32a293927d669400173375b711d68698aa6 Mon Sep 17 00:00:00 2001 From: radsvvid <84921310+radsvvid@users.noreply.github.com> Date: Fri, 28 May 2021 01:07:04 +0200 Subject: [PATCH 09/15] Delete app-icon.js --- apps/gbtwist/app-icon.js | 1663 -------------------------------------- 1 file changed, 1663 deletions(-) delete mode 100644 apps/gbtwist/app-icon.js diff --git a/apps/gbtwist/app-icon.js b/apps/gbtwist/app-icon.js deleted file mode 100644 index d460c76b4..000000000 --- a/apps/gbtwist/app-icon.js +++ /dev/null @@ -1,1663 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - BangleApps/app-icon.js at master · radsvvid/BangleApps - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- Skip to content - - - - - - - - - - -
- -
- - - - - -
- - - -
- - - - - - - - - -
-
-
- - - - - - - - - - -
- -
- -
-

- - - / - - BangleApps - - -

- - - forked from espruino/BangleApps - - -
- -
    - -
  • - -
    - - - - - - - - Watch - - - - - -
    -
    -

    Notifications

    - -
    - -
    -
    - - - - - - - - -
    - -
    -
    -
    - - -
    -
    - -
    - - - -
  • - -
  • -
    -
    - - -
    -
    - - -
    - -
  • - -
  • - - - Fork - - -
  • -
- -
- - - - -
- - -
-
- - - - -
- - - - Permalink - - - -
- -
-
- - - master - - - - -
-
-
- Switch branches/tags - -
- - - -
- -
- -
- - -
- -
- - - - - - - - - - - - - - - - -
- - -
-
-
-
- -
- -
- - - - Go to file - - -
- - - - - - - - - -
-
-
- - - -
- -
-
-
 
-
- -
-
 
- Cannot retrieve contributors at this time -
-
- - - - - - - - - - - - - -
- -
- - -
- - 1 lines (1 sloc) - - 283 Bytes -
- -
- - - -
- - - - -
- -
-
- -
-
- -
- -
-
- - - -
- - - - - - -
require("heatshrink").decompress(atob("mEwwhC/AC3wCysP/4vW/4YWGAJJWGC4YBGCJ1EJKAQBAAZJFh4WPCgQwDGZIWHDAgXKCxAtDAgYuPGAgXIFJIGFC5w3EAwQXHIwoMDBIanJC56NNLARIHC543IC+jVGC454IC96P/C8D9HOxwXDEggXMh4QEC5JGHEAYlGC5wJBJArfFRhRZHFxYkBJIYqFFxYXCAQJJEUhoXCPQhcNAATQFEIwAOJIYAUIJgYjJOIvWAEw="))
- - - -
- -
- - - - -
- - -
- - -
-
- - - - -
- - - -
-
- -
-
- -
- - - - - - - - - - - - - - - - - - - - - - From b0e768c0f0aa8b0381aad504dd2638b89292f719 Mon Sep 17 00:00:00 2001 From: radsvvid <84921310+radsvvid@users.noreply.github.com> Date: Fri, 28 May 2021 01:07:11 +0200 Subject: [PATCH 10/15] Delete app.js --- apps/gbtwist/app.js | 2071 ------------------------------------------- 1 file changed, 2071 deletions(-) delete mode 100644 apps/gbtwist/app.js diff --git a/apps/gbtwist/app.js b/apps/gbtwist/app.js deleted file mode 100644 index 3e3e00c7e..000000000 --- a/apps/gbtwist/app.js +++ /dev/null @@ -1,2071 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - BangleApps/app.js at master · radsvvid/BangleApps - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- Skip to content - - - - - - - - - - -
- -
- - - - - -
- - - -
- - - - - - - - - -
-
-
- - - - - - - - - - -
- -
- -
-

- - - / - - BangleApps - - -

- - - forked from espruino/BangleApps - - -
- -
    - -
  • - -
    - - - - - - - - Watch - - - - - -
    -
    -

    Notifications

    - -
    - -
    -
    - - - - - - - - -
    - -
    -
    -
    - - -
    -
    - -
    - - - -
  • - -
  • -
    -
    - - -
    -
    - - -
    - -
  • - -
  • - - - Fork - - -
  • -
- -
- - - - -
- - -
-
- - - - -
- - - - Permalink - - - -
- -
-
- - - master - - - - -
-
-
- Switch branches/tags - -
- - - -
- -
- -
- - -
- -
- - - - - - - - - - - - - - - - -
- - -
-
-
-
- -
- -
- - - - Go to file - - -
- - - - - - - - - -
-
-
- - - -
- -
-
-
 
-
- -
-
 
- Cannot retrieve contributors at this time -
-
- - - - - - - - - - - - - -
- -
- - -
- - 100 lines (88 sloc) - - 1.98 KB -
- -
- - - -
- - - - -
- -
-
- -
-
- -
- -
-
- - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
// just a watch, to fill an empty screen
-
function drwClock() {
var d = new Date();
var h = d.getHours(), m = d.getMinutes();
var time = ("0"+h).substr(-2) + ":" + ("0"+m).substr(-2);
g.reset();
g.setFont('6x8',7);
g.setFontAlign(-1,-1);
g.drawString(time,20,80);
}
-
g.clear();
drwClock();
Bangle.loadWidgets();
Bangle.drawWidgets();
-
/////////////////////////////////////////////////////////////
// control music by twist/buttons
-
var counter = 0; //stores your counted your twists
var tstate = false; //are you ready to count the twists?
-
function playx() {
Bluetooth.println(JSON.stringify({t:"music", n:"play"}));
}
-
function volup() {
Bluetooth.println(JSON.stringify({t:"music", n:"volumeup"}));
}
-
function voldn() {
Bluetooth.println(JSON.stringify({t:"music", n:"volumedown"}));
}
-
function sendCmd() {
print (counter);
Bangle.beep(200,3000);
if (tstate==false && counter>0){
do {playx(); counter--;}
while (counter >= 1);
}
}
-
function twistctrl() {
if (tstate==false){
tstate=true;
setTimeout('tstate=false',4000);
setTimeout(sendCmd,4100);
Bangle.beep(200,3000);
}
else{
g.clearRect(10,140,230,200);
if (tstate==true){
if (counter < 5){
counter++;
drwCmd();
Bangle.buzz(100,2);
}
else {
counter = 0;
Bangle.buzz(400);
}
}
}
}
-
/////////////////////////////////////////////////////////////
// draw the command to be executed
-
function drwCmd() {
g.setFont('6x8',6);
g.setColor(0.3,1,0.3);
g.clearRect(10,140,230,200);
switch (counter){
case 1:
g.drawString('play',50,150);
break;
case 2:
g.drawString('next',50,150);
break;
case 3:
g.drawString('prev',50,150);
break;
case 4:
g.drawString('nx f',50,150);
break;
case 5:
g.drawString('pr f',50,150);
break;
case 0:
g.clearRect(10,140,230,200);
break;
}
}
-
setWatch(volup,BTN1,{repeat:true});
setWatch(voldn,BTN3,{repeat:true});
Bangle.on('twist',twistctrl);
setWatch(Bangle.showLauncher, BTN2, {repeat:false,edge:"falling"});
- - - -
- -
- - - - -
- - -
- - -
-
- - - - -
- - - -
-
- -
-
- -
- - - - - - - - - - - - - - - - - - - - - - From 799738f85b2608f521333f02d24595c523b79e51 Mon Sep 17 00:00:00 2001 From: radsvvid <84921310+radsvvid@users.noreply.github.com> Date: Fri, 28 May 2021 01:07:22 +0200 Subject: [PATCH 11/15] Delete app.png --- apps/gbtwist/app.png | 1548 ------------------------------------------ 1 file changed, 1548 deletions(-) delete mode 100644 apps/gbtwist/app.png diff --git a/apps/gbtwist/app.png b/apps/gbtwist/app.png deleted file mode 100644 index e12e3f4c3..000000000 --- a/apps/gbtwist/app.png +++ /dev/null @@ -1,1548 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - BangleApps/app.png at master · radsvvid/BangleApps - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- Skip to content - - - - - - - - - - -
- -
- - - - - -
- - - -
- - - - - - - - - -
-
-
- - - - - - - - - - -
- -
- -
-

- - - / - - BangleApps - - -

- - - forked from espruino/BangleApps - - -
- -
    - -
  • - -
    - - - - - - - - Watch - - - - - -
    -
    -

    Notifications

    - -
    - -
    -
    - - - - - - - - -
    - -
    -
    -
    - - -
    -
    - -
    - - - -
  • - -
  • -
    -
    - - -
    -
    - - -
    - -
  • - -
  • - - - Fork - - -
  • -
- -
- - - - -
- - -
-
- - - - -
- - - - Permalink - - - -
- -
-
- - - master - - - - -
-
-
- Switch branches/tags - -
- - - -
- -
- -
- - -
- -
- - - - - - - - - - - - - - - - -
- - -
-
-
-
- -
- -
- - - - Go to file - - -
- - - - - - - - - -
-
-
- - - -
- -
-
-
 
-
- -
-
 
- Cannot retrieve contributors at this time -
-
- - - - - - - - - - - - - -
- -
- - -
- - 906 Bytes -
- -
- - - -
- - - - -
- -
-
- -
- -
-
- - - -
-
- app.png -
-
- -
- - - - -
- - -
- - -
-
- - -
- - - -
-
- -
-
- -
- - - - - - - - - - - - - - - - - - - - - - From c0e38a8185c09b6e1bf5ede9de7e14fd9bac7ea2 Mon Sep 17 00:00:00 2001 From: radsvvid <84921310+radsvvid@users.noreply.github.com> Date: Fri, 28 May 2021 01:08:43 +0200 Subject: [PATCH 12/15] Add files via upload --- apps/gbtwist/app.js | 97 +++++++++++++++++++++++++++++++++++++++++++ apps/gbtwist/app.png | Bin 0 -> 906 bytes 2 files changed, 97 insertions(+) create mode 100644 apps/gbtwist/app.js create mode 100644 apps/gbtwist/app.png diff --git a/apps/gbtwist/app.js b/apps/gbtwist/app.js new file mode 100644 index 000000000..4bd495277 --- /dev/null +++ b/apps/gbtwist/app.js @@ -0,0 +1,97 @@ +// just a watch, to fill an empty screen + +function drwClock() { + var d = new Date(); + var h = d.getHours(), m = d.getMinutes(); + var time = ("0"+h).substr(-2) + ":" + ("0"+m).substr(-2); + g.reset(); + g.setFont('6x8',7); + g.setFontAlign(-1,-1); + g.drawString(time,20,80); +} + +g.clear(); +drwClock(); +Bangle.loadWidgets(); +Bangle.drawWidgets(); + +///////////////////////////////////////////////////////////// +// control music by twist/buttons + +var counter = 0; //stores your counted your twists +var tstate = false; //are you ready to count the twists? + +function playx() { + Bluetooth.println(JSON.stringify({t:"music", n:"play"})); +} + +function volup() { + Bluetooth.println(JSON.stringify({t:"music", n:"volumeup"})); +} + +function voldn() { + Bluetooth.println(JSON.stringify({t:"music", n:"volumedown"})); +} + +function sendCmd() { + print (counter); + Bangle.beep(200,3000); + if (tstate==false && counter>0){ + do {playx(); counter--;} + while (counter >= 1); + } +} + +function twistctrl() { + if (tstate==false){ + tstate=true; + setTimeout('tstate=false',4000); + setTimeout(sendCmd,4100); + Bangle.beep(200,3000); + } + else{ + g.clearRect(10,140,230,200); + if (tstate==true){ + if (counter < 5){ + counter++; + drwCmd(); + Bangle.buzz(100,2); + } + else { + counter = 0; + Bangle.buzz(400); + } + } + } +} + +function drwCmd() { + g.setFont('6x8',6); + g.setColor(0.3,1,0.3); + g.clearRect(10,140,230,200); +switch (counter){ + case 1: + g.drawString('play',50,150); + break; + case 2: + g.drawString('next',50,150); + break; + case 3: + g.drawString('prev',50,150); + break; + case 4: + g.drawString('nx f',50,150); + break; + case 5: + g.drawString('pr f',50,150); + break; + case 0: + g.clearRect(10,140,230,200); + break; +} +} + +setWatch(volup,BTN1,{repeat:true}); +setWatch(voldn,BTN3,{repeat:true}); +Bangle.on('twist',twistctrl); +setWatch(Bangle.showLauncher, BTN2, {repeat:false,edge:"falling"}); \ No newline at end of file diff --git a/apps/gbtwist/app.png b/apps/gbtwist/app.png new file mode 100644 index 0000000000000000000000000000000000000000..2379c76f075bc03c0874358774ee626f77c5d79b GIT binary patch literal 906 zcmV;519kj~P)EX>4Tx04R}tkv&MmKpe$izo>T{x)hUfUYhmWs!37+MB?#~fb3MK=50`V-<4U2e#czV;) zIqwt4SXokt&xywjx*+i**JYRAIF}su^URo$&CC<~5g@z^v>LYkeQevU6Cm&mTxlJDtqIJ0lHTZO z@gtyb8@RacX!0I#xdRM7>5?HiQh=tvSOnhB=$rDuz%9_b=JwX!$LRx*rLNL9z`-Ff zTB7WAk9YTU_xA6Zc7H$a+j4TCqcJ`J000JJOGiWi000000Qp0^e*gdg32;bRa{vG? zBLDy{BLR4&KXw2B00(qQO+^Rg1riMr5s4h2L;wH*h)G02RA}DqnZ0epKn#WXRM>UO z1fD`Gq{$XZm%>A2mJE>@QpHVnh{t$o&VXU)e#!e$A_4*o;Uw}iA9)fbve{k@;)L1rr>!wkHFYQQZRj8KNsWVV$d*}E$S5~2Hpr&*py?+*wubgYu zZPXGVr%*#SwJKbapCsR{{h=m+rx;J}nB5_oEc5^{lVIyERK=zi`med$|Bno;9>8jX zuodwJux5aW9?v53AtH}%-CjhFwe?@rmp%5XxOUN0Q;DU=*2w1a0N`9}Vv!}Gi=)hc z;w=*VuIct2OQ$F6KO~>7)*MLQk$fTfZ7m(IgnT!N4Wh1!`Q(1jB6455a1omdqz;=} z?7Bq&F$gV)>Gy%qTqbpP*}Bgor-i11Xa-ekfRY!DUQesV03$)Do%RN)@_nEsgqfp} g>Z1B2VY9zvza Date: Fri, 28 May 2021 01:11:18 +0200 Subject: [PATCH 13/15] Create app-icon.js --- apps/gbtwist/app-icon.js | 1 + 1 file changed, 1 insertion(+) create mode 100644 apps/gbtwist/app-icon.js diff --git a/apps/gbtwist/app-icon.js b/apps/gbtwist/app-icon.js new file mode 100644 index 000000000..b28bbe664 --- /dev/null +++ b/apps/gbtwist/app-icon.js @@ -0,0 +1 @@ +require("heatshrink").decompress(atob("mEwwIYVhAFEjgFEh4FEg+AAocD4AME8ADCgPAvAFCj/8nkQAoN//8enAQB///44FBgYFB8f4FoIFB+IFBh/+n/4AocH/AXBj/+gP8FIIFDFwM//0x/wFDAIIFNv4FB/4FNEaIFFj/gn5HCj+AAoUEh4FBMgUP4AFDw/gv/wAoPDPoKhBjnxAoKtBjl4TYLICninBagUPWYLJPFoIADZIYABnj6KABIA=")) From b54431b8fe509cfb45f791c940781976af8944ba Mon Sep 17 00:00:00 2001 From: radsvvid <84921310+radsvvid@users.noreply.github.com> Date: Fri, 28 May 2021 01:17:38 +0200 Subject: [PATCH 14/15] Update ChangeLog --- apps/gbtwist/ChangeLog | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/gbtwist/ChangeLog b/apps/gbtwist/ChangeLog index e6a8d1263..8684b5743 100644 --- a/apps/gbtwist/ChangeLog +++ b/apps/gbtwist/ChangeLog @@ -1 +1 @@ -Initial version +v0.01: Initial version From 7c60b8fdddd20ccfdb012427aa806119743bbaed Mon Sep 17 00:00:00 2001 From: radsvvid <84921310+radsvvid@users.noreply.github.com> Date: Fri, 28 May 2021 01:18:03 +0200 Subject: [PATCH 15/15] Update ChangeLog --- apps/gbtwist/ChangeLog | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/gbtwist/ChangeLog b/apps/gbtwist/ChangeLog index 8684b5743..ec66c5568 100644 --- a/apps/gbtwist/ChangeLog +++ b/apps/gbtwist/ChangeLog @@ -1 +1 @@ -v0.01: Initial version +0.01: Initial version