add accelgraph
parent
910c3c0b5b
commit
73bd8e5b17
20
apps.json
20
apps.json
|
|
@ -102,7 +102,7 @@
|
||||||
"version": "0.06",
|
"version": "0.06",
|
||||||
"description": "Display notifications/music/etc sent from the Gadgetbridge app on Android. This replaces the old 'Gadgetbridge' Bangle.js widget.",
|
"description": "Display notifications/music/etc sent from the Gadgetbridge app on Android. This replaces the old 'Gadgetbridge' Bangle.js widget.",
|
||||||
"icon": "app.png",
|
"icon": "app.png",
|
||||||
"tags": "tool,system,messages,notifications",
|
"tags": "tool,system,messages,notifications,gadgetbridge",
|
||||||
"dependencies": {"messages":"app"},
|
"dependencies": {"messages":"app"},
|
||||||
"supports": ["BANGLEJS","BANGLEJS2"],
|
"supports": ["BANGLEJS","BANGLEJS2"],
|
||||||
"readme": "README.md",
|
"readme": "README.md",
|
||||||
|
|
@ -309,7 +309,7 @@
|
||||||
"description": "(NOT RECOMMENDED) Displays Gadgetbridge notifications from Android. Please use the 'Android' Bangle.js app instead.",
|
"description": "(NOT RECOMMENDED) Displays Gadgetbridge notifications from Android. Please use the 'Android' Bangle.js app instead.",
|
||||||
"icon": "app.png",
|
"icon": "app.png",
|
||||||
"type": "widget",
|
"type": "widget",
|
||||||
"tags": "tool,system,android,widget",
|
"tags": "tool,system,android,widget,gadgetbridge",
|
||||||
"supports": ["BANGLEJS","BANGLEJS2"],
|
"supports": ["BANGLEJS","BANGLEJS2"],
|
||||||
"dependencies": {"notify":"type"},
|
"dependencies": {"notify":"type"},
|
||||||
"readme": "README.md",
|
"readme": "README.md",
|
||||||
|
|
@ -326,7 +326,7 @@
|
||||||
"version":"0.01",
|
"version":"0.01",
|
||||||
"description": "Debug info for Gadgetbridge. Run this app and when Gadgetbridge messages arrive they are displayed on-screen.",
|
"description": "Debug info for Gadgetbridge. Run this app and when Gadgetbridge messages arrive they are displayed on-screen.",
|
||||||
"icon": "app.png",
|
"icon": "app.png",
|
||||||
"tags": "",
|
"tags": "tool,debug,gadgetbridge",
|
||||||
"supports" : ["BANGLEJS2"],
|
"supports" : ["BANGLEJS2"],
|
||||||
"readme": "README.md",
|
"readme": "README.md",
|
||||||
"storage": [
|
"storage": [
|
||||||
|
|
@ -3008,6 +3008,20 @@
|
||||||
],
|
],
|
||||||
"data": [{"wildcard":"accellog.?.csv"}]
|
"data": [{"wildcard":"accellog.?.csv"}]
|
||||||
},
|
},
|
||||||
|
{ "id": "accelgraph",
|
||||||
|
"name": "Accelerometer Graph",
|
||||||
|
"shortName":"Accel Graph",
|
||||||
|
"version":"0.01",
|
||||||
|
"description": "A simple app to draw a graph of data from the accelerometer on the screen",
|
||||||
|
"icon": "app.png",
|
||||||
|
"tags": "tool,debug",
|
||||||
|
"supports" : ["BANGLEJS","BANGLEJS2"],
|
||||||
|
"screenshots": [{"url":"bangle1-counter-screenshot.png"}],
|
||||||
|
"storage": [
|
||||||
|
{"name":"accelgraph.app.js","url":"app.js"},
|
||||||
|
{"name":"accelgraph.img","url":"app-icon.js","evaluate":true}
|
||||||
|
]
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"id": "cprassist",
|
"id": "cprassist",
|
||||||
"name": "CPR Assist",
|
"name": "CPR Assist",
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1 @@
|
||||||
|
0.01: New App!
|
||||||
|
|
@ -0,0 +1 @@
|
||||||
|
require("heatshrink").decompress(atob("mEw4UA/4AB304ief85L/ABNVAAwKCgILHoALBgoLHqALOrVVr4BEBZIFBBYiaCAAPq2oLQEYlqF5VrBZWnBZWvBZNWz4LGBoQLHJ4O///6v/1BZHa/4LFLYOlr9pR49r1ILJ09qr4ZBBY2vrWdBY5PBq2uyoLIquqBY5bBKoZTFLYILJJ4STDBY77IJ4QLUJ4QLU1QAE0oLPqoAGBZ0BBY9ABYMABY4KCAH4AGA="))
|
||||||
|
|
@ -0,0 +1,24 @@
|
||||||
|
Bangle.loadWidgets();
|
||||||
|
g.clear(1);
|
||||||
|
Bangle.drawWidgets();
|
||||||
|
var R = Bangle.appRect;
|
||||||
|
|
||||||
|
var x = 0;
|
||||||
|
var last;
|
||||||
|
|
||||||
|
function getY(v) {
|
||||||
|
return (R.y+R.y2 + v*R.h/2)/2;
|
||||||
|
}
|
||||||
|
Bangle.on('accel', a => {
|
||||||
|
g.reset();
|
||||||
|
if (last) {
|
||||||
|
g.setColor("#f00").drawLine(x-1,getY(last.x),x,getY(a.x));
|
||||||
|
g.setColor("#0f0").drawLine(x-1,getY(last.y),x,getY(a.y));
|
||||||
|
g.setColor("#00f").drawLine(x-1,getY(last.z),x,getY(a.z));
|
||||||
|
}
|
||||||
|
last = a;x++;
|
||||||
|
if (x>=g.getWidth()) {
|
||||||
|
x = 1;
|
||||||
|
g.clearRect(R);
|
||||||
|
}
|
||||||
|
});
|
||||||
Binary file not shown.
|
After Width: | Height: | Size: 944 B |
Binary file not shown.
|
After Width: | Height: | Size: 3.6 KiB |
Loading…
Reference in New Issue