1
0
Fork 0

Merge pull request #2 from v1nc/stepup

add stepup
master
v1nc 2020-05-07 18:03:53 +02:00 committed by GitHub
commit 0d0b79b39d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 55 additions and 0 deletions

View File

@ -1675,5 +1675,17 @@
{"name":"findphone.app.js","url":"app.js"},
{"name":"findphone.img","url":"app-icon.js","evaluate":true}
]
},
{ "id": "stepup",
"name": "Stepup",
"icon": "app.png",
"version":"0.01",
"description": "Reminds you to stepup every 20 minutes. Sitting to long is dangerous!",
"tags": "tools",
"allow_emulator":true,
"storage": [
{"name":"stepup.app.js","url":"app.js"},
{"name":"stepup.img","url":"app-icon.js","evaluate":true}
]
}
]

1
apps/stepup/ChangeLog Normal file
View File

@ -0,0 +1 @@
0.01: First Version

9
apps/stepup/README.md Normal file
View File

@ -0,0 +1,9 @@
# Find Phone
Ring your phone via GadgetBridge if you lost it somewhere.
1. Enable HID in settings
2. Connect GadgetBridge
3. Lose phone
4. Open app
5. Click any button or screen

1
apps/stepup/app-icon.js Normal file
View File

@ -0,0 +1 @@
require("heatshrink").decompress(atob("mEwwkCkQA/AEp0JCxkgC5KJMUpYXMgf/AA0wC5sPC4/wC/4XhxAXXwQXtlBIJC5URC4QwIC5PxFgQXT/QUCC6fwC4ZgIC5E/+EYCgJ4JC4/zwfwhAXTnGIC9pHXO66nY//4a63xFYTvUiJeCC6cAOxQXNFxIXllAWIC5oAKC+EDC48wC5oAKC9EBiAXokBGJgQXLMBQWMAH4AZA="))

32
apps/stepup/app.js Normal file
View File

@ -0,0 +1,32 @@
function remind() {
return Bangle.buzz(1000,1)
.then(() =>setTimeout(remind, 60));
}
//init graphics
g.clear();
require("Font8x12").add(Graphics);
g.setFont("8x12",2);
g.setFontAlign(0,0);
g.flip();
g.setColor(0xF800);
g.drawString("sitting is dangerous!", g.getWidth()/2, g.getHeight()/2);
setTimeout(remimd,60);false };
//check if HID enabled and show message
if (settings.HID=="kb" || settings.HID=="kbmedia") {
g.setColor(0x03E0);
g.drawString("click to find", g.getWidth()/2, g.getHeight()/2);
//register all buttons and screen to find phone
setWatch(find, BTN1);
setWatch(find, BTN2);
setWatch(find, BTN3);
setWatch(find, BTN4);
setWatch(find, BTN5);
}else{
g.setColor(0xf800);
g.drawString("enable HID!", g.getWidth()/2, g.getHeight()/2);
}

BIN
apps/stepup/app.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 973 B