recorder 0.48: Add ability to log average acceleration values
parent
5f052d9a8f
commit
16a25f245a
|
|
@ -61,3 +61,4 @@
|
|||
0.47: Fix 'blip' on speed map on some recordings
|
||||
Ensure Battery voltage is only stored to 0.01v
|
||||
Add graphs for Steps+Battery
|
||||
0.48: Add ability to log average acceleration values
|
||||
|
|
@ -19,6 +19,7 @@ You can record
|
|||
* **BAT** Battery percentage and voltage
|
||||
* **Steps** Steps counted by the step counter
|
||||
* **Baro** (Bangle.js 2) Using the built-in barometer to record Temperature, Pressure and Altitude
|
||||
* **Accel** Average acceleration values in X,Y and Z
|
||||
* **Core** CoreTemp body temperature *if* you have a CoreTemp device and the https://banglejs.com/apps/?id=coretemp app installed
|
||||
|
||||
You can then start/stop recording from the Recorder app itself (and as long as widgets are
|
||||
|
|
|
|||
|
|
@ -114,6 +114,28 @@ exports.getRecorders = function() {
|
|||
stop : () => {},
|
||||
draw : (x,y) => g.reset().drawImage(atob("DAwBAAMMeeeeeeeecOMMAAMMMMAA"),x,y)
|
||||
};
|
||||
},
|
||||
accel:function() {
|
||||
var ax=0,ay=0,az=0,n=0;
|
||||
function onAccel(a) {
|
||||
ax += a.x;
|
||||
ay += a.y;
|
||||
az += a.z;
|
||||
n++;
|
||||
}
|
||||
return {
|
||||
name : "Accel",
|
||||
fields : ["Accel X", "Accel Y", "Accel Z"],
|
||||
getValues : () => {
|
||||
if (n<1) n=1;
|
||||
var r = [(ax/n).toFixed(2), (ay/n).toFixed(2), (az/n).toFixed(2)];
|
||||
n = ax = ay = az = 0;
|
||||
return r;
|
||||
},
|
||||
start : () => { Bangle.on('accel', onAccel); },
|
||||
stop : () => { Bangle.removeListener('accel', onAccel); },
|
||||
draw : (x,y) => g.reset().drawImage(atob("DAwBAAMMeeeeeeeecOMMAAMMMMAA"),x,y)
|
||||
};
|
||||
}
|
||||
};
|
||||
if (Bangle.getPressure){
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
"id": "recorder",
|
||||
"name": "Recorder",
|
||||
"shortName": "Recorder",
|
||||
"version": "0.47",
|
||||
"version": "0.48",
|
||||
"description": "Record GPS position, heart rate and more in the background, then download to your PC.",
|
||||
"icon": "app.png",
|
||||
"tags": "tool,outdoors,gps,widget,clkinfo",
|
||||
|
|
|
|||
Loading…
Reference in New Issue