Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

batchart: remove log #2850

Merged
merged 2 commits into from
Jul 12, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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();
})();
})();
Loading