Skip to content

Commit

Permalink
Merge pull request #2850 from bobrippling/batchart-log
Browse files Browse the repository at this point in the history
batchart: remove log
  • Loading branch information
gfwilliams committed Jul 12, 2023
2 parents b9045c9 + db49453 commit e7d869d
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
1 change: 1 addition & 0 deletions apps/batchart/ChangeLog
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,4 @@
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.11: Initial port to the BangleJS2
0.12: Remove debug log
2 changes: 1 addition & 1 deletion apps/batchart/metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"id": "batchart",
"name": "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.",
"icon": "app.png",
"tags": "app,widget,battery,time,record,chart,tool",
Expand Down
9 changes: 4 additions & 5 deletions apps/batchart/widget.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
(() => {
let recordingInterval = null;
const Storage = require("Storage");

const switchableConsumers = {
none: 0,
lcd: 1,
Expand Down Expand Up @@ -96,15 +96,14 @@
let logPercent = E.getBattery();
let logTemperature = E.getTemperature();
let logConsumers = getEnabledConsumersValue();

let logString = [logTime, logPercent, logTemperature, logConsumers].join(",");

bcLogFileA.write(logString + "\n");
}
}

function reload() {
console.log("Reloading BatteryChart widget");
WIDGETS["batchart"].width = 0;

if (recordingInterval) {
Expand All @@ -121,4 +120,4 @@
};

reload();
})();
})();

0 comments on commit e7d869d

Please sign in to comment.