Skip to content

Commit

Permalink
Added app config and first app config.
Browse files Browse the repository at this point in the history
  • Loading branch information
got-x committed Apr 1, 2020
1 parent 6b775da commit 7708388
Show file tree
Hide file tree
Showing 5 changed files with 53 additions and 0 deletions.
14 changes: 14 additions & 0 deletions apps.json
Original file line number Diff line number Diff line change
Expand Up @@ -951,5 +951,19 @@
{"name":"chrono.app.js","url":"chrono.js"},
{"name":"chrono.img","url":"chrono-icon.js","evaluate":true}
]
},
{
"id": "gbaudioc",
"name": "Gadgetbridge Audio Control",
"shortName": "gbAudioControl",
"icon": "gbaudioc.png",
"version": "0.01",
"description": "A gadgetbride remote control for your smartphones audio player",
"tags": "tool,gadgetbridge",
"type": "app",
"storage": [
{"name":"gbaudioc.app.js","url":"gbcaudioc.js"},
{"name":"gbaudioc.img","url":"gbcaudioc-icon.js","evaluate":true}
]
}
]
1 change: 1 addition & 0 deletions apps/gbaudioc/ChangeLog
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
0.01: New App
37 changes: 37 additions & 0 deletions apps/gbaudioc/gbaudioc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
function init() {
setWatch(btn1, BTN1);
setWatch(btn2, BTN2);
setWatch(btn3, BTN3);
Bangle.on('touch', function(b) {
b == 1 ? t1(): t2();
});
display();
}

function btn1() {
Bluetooth.println(JSON.stringify({t:"info", msg:"btn1"}))
}
function btn2() {
Bluetooth.println(JSON.stringify({t:"info", msg:"btn2"}))
}
function btn3() {
Bluetooth.println(JSON.stringify({t:"info", msg:"btn3"}))
}
function t1() {
Bluetooth.println(JSON.stringify({t:"info", msg:"t1"}))
}
function t2() {
Bluetooth.println(JSON.stringify({t:"info", msg:"t2"}))
}

function display() {
g.clear();
g.setFontAlign(0,0); // center font
g.setFont("Vector",30);
// draw the current counter value
g.drawString(gbAudicC, g.getWidth()/2, g.getHeight()/2);
// optional - this keeps the watch LCD lit up
g.flip();
}

init();
Binary file added apps/gbaudioc/gbaudioc.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions apps/gbaudioc/gcaudioc-icon.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 7708388

Please sign in to comment.