diff --git a/apps.json b/apps.json index 3c68b9c0f..86e3d08fa 100644 --- a/apps.json +++ b/apps.json @@ -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"} ] - }, + } ] diff --git a/apps/fd6fdetect/ChangeLog b/apps/fd6fdetect/ChangeLog new file mode 100644 index 000000000..3c82c3ca7 --- /dev/null +++ b/apps/fd6fdetect/ChangeLog @@ -0,0 +1 @@ +0.1: Added source code diff --git a/apps/fd6fdetect/app-icon.js b/apps/fd6fdetect/app-icon.js new file mode 100644 index 000000000..e8868099f --- /dev/null +++ b/apps/fd6fdetect/app-icon.js @@ -0,0 +1 @@ +require("heatshrink").decompress(atob("mEwwIjgg/gAp0IgfAiAFBjkP+E4AoM8n/8ngFBvn//8+AoP//Ef/4FBv/Agf+AoMPwEB+AFCjEYAoUenk8vAvCAoIvCnAFBjgFCC4IFCCgUeEQNwAoMO+EPuPD4eOAoPz8fH54FH+IRBx4FBDogpFGoxBFJopZFMopxFPoqJFSoqhFVoq5FgAFBa6gAW")) diff --git a/apps/fd6fdetect/app.js b/apps/fd6fdetect/app.js new file mode 100644 index 000000000..a7ef71994 --- /dev/null +++ b/apps/fd6fdetect/app.js @@ -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); diff --git a/apps/fd6fdetect/app.png b/apps/fd6fdetect/app.png new file mode 100644 index 000000000..cd0a92f7c Binary files /dev/null and b/apps/fd6fdetect/app.png differ