1
0
Fork 0

Merge pull request #808 from Smooklu/master

Add fd6fdetect
master
Gordon Williams 2021-09-15 08:00:52 +01:00 committed by GitHub
commit 7502320639
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 39 additions and 2 deletions

View File

@ -3464,6 +3464,18 @@
{"name":"vectorclock.img","url":"app-icon.js","evaluate":true}
]
},
{ "id": "fd6fdetect",
"name": "fd6fdetect",
"shortName":"fd6fdetect",
"icon": "app.png",
"version":"0.1",
"description": "Allows you to see 0xFD6F beacons near you.",
"tags": "tool",
"storage": [
{"name":"fd6fdetect.app.js","url":"app.js"},
{"name":"fd6fdetect.img","url":"app-icon.js","evaluate":true}
]
},
{ "id": "choozi",
"name": "Choozi",
"icon": "app.png",
@ -3475,7 +3487,7 @@
{"name":"choozi.app.js","url":"app.js"},
{"name":"choozi.img","url":"app-icon.js","evaluate":true}
]
}
},
{ "id": "widclkbttm",
"name": "Digital clock (Bottom) widget",
"shortName":"Digital clock Bottom Widget",
@ -3488,5 +3500,5 @@
"storage": [
{"name":"widclkbttm.wid.js","url":"widclkbttm.wid.js"}
]
},
}
]

View File

@ -0,0 +1 @@
0.1: Added source code

View File

@ -0,0 +1 @@
require("heatshrink").decompress(atob("mEwwIjgg/gAp0IgfAiAFBjkP+E4AoM8n/8ngFBvn//8+AoP//Ef/4FBv/Agf+AoMPwEB+AFCjEYAoUenk8vAvCAoIvCnAFBjgFCC4IFCCgUeEQNwAoMO+EPuPD4eOAoPz8fH54FH+IRBx4FBDogpFGoxBFJopZFMopxFPoqJFSoqhFVoq5FgAFBa6gAW"))

23
apps/fd6fdetect/app.js Normal file
View File

@ -0,0 +1,23 @@
g.clear();
let amount = 'global value';
function FindFD6FBeacons() {
NRF.findDevices(function(devices) {
g.setFont('Vector', 75);
g.setFontAlign(0,0);
var amount = devices.length;
g.clear();
g.drawString(amount, 125, 100);
if (amount == 1) {
g.setFont('Vector', 25);
g.drawString('FD6F', 125, 150);
g.drawString('beacon', 125, 175);
g.drawString('nearby', 125, 200);
} else{
g.setFont('Vector', 25);
g.drawString('FD6F', 125, 150);
g.drawString('beacons', 125, 175);
g.drawString('nearby', 125, 200);
}
}, {timeout : 1000, filters : [{services: ['fd6f'] }] });
}
setInterval(FindFD6FBeacons, 2000);

BIN
apps/fd6fdetect/app.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB