commit
e7d869dcb0
|
|
@ -9,3 +9,4 @@
|
||||||
0.09: Fix failing dismissal of Gadgetbridge notifications, record (coarse) bluetooth state
|
0.09: Fix failing dismissal of Gadgetbridge notifications, record (coarse) bluetooth state
|
||||||
0.10: Remove widget icon and improve listener and setInterval handling for widget (might help with https://github.com/espruino/BangleApps/issues/381)
|
0.10: Remove widget icon and improve listener and setInterval handling for widget (might help with https://github.com/espruino/BangleApps/issues/381)
|
||||||
0.11: Initial port to the BangleJS2
|
0.11: Initial port to the BangleJS2
|
||||||
|
0.12: Remove debug log
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
"id": "batchart",
|
"id": "batchart",
|
||||||
"name": "Battery Chart",
|
"name": "Battery Chart",
|
||||||
"shortName": "Battery Chart",
|
"shortName": "Battery Chart",
|
||||||
"version": "0.11",
|
"version": "0.12",
|
||||||
"description": "A widget and an app for recording and visualizing battery percentage over time.",
|
"description": "A widget and an app for recording and visualizing battery percentage over time.",
|
||||||
"icon": "app.png",
|
"icon": "app.png",
|
||||||
"tags": "app,widget,battery,time,record,chart,tool",
|
"tags": "app,widget,battery,time,record,chart,tool",
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
(() => {
|
(() => {
|
||||||
let recordingInterval = null;
|
let recordingInterval = null;
|
||||||
const Storage = require("Storage");
|
const Storage = require("Storage");
|
||||||
|
|
||||||
const switchableConsumers = {
|
const switchableConsumers = {
|
||||||
none: 0,
|
none: 0,
|
||||||
lcd: 1,
|
lcd: 1,
|
||||||
|
|
@ -96,15 +96,14 @@
|
||||||
let logPercent = E.getBattery();
|
let logPercent = E.getBattery();
|
||||||
let logTemperature = E.getTemperature();
|
let logTemperature = E.getTemperature();
|
||||||
let logConsumers = getEnabledConsumersValue();
|
let logConsumers = getEnabledConsumersValue();
|
||||||
|
|
||||||
let logString = [logTime, logPercent, logTemperature, logConsumers].join(",");
|
let logString = [logTime, logPercent, logTemperature, logConsumers].join(",");
|
||||||
|
|
||||||
bcLogFileA.write(logString + "\n");
|
bcLogFileA.write(logString + "\n");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function reload() {
|
function reload() {
|
||||||
console.log("Reloading BatteryChart widget");
|
|
||||||
WIDGETS["batchart"].width = 0;
|
WIDGETS["batchart"].width = 0;
|
||||||
|
|
||||||
if (recordingInterval) {
|
if (recordingInterval) {
|
||||||
|
|
@ -121,4 +120,4 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
reload();
|
reload();
|
||||||
})();
|
})();
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue