widdevst: fix default, keep original behaviour

pull/3400/head
Rob Pilling 2024-05-05 16:21:37 +01:00
parent 95a57aa4e1
commit b8aad3b084
3 changed files with 3 additions and 2 deletions

View File

@ -2,3 +2,4 @@
0.02: Support for Bangle.js 2 0.02: Support for Bangle.js 2
0.03: Update storage usage and perform GC every minute 0.03: Update storage usage and perform GC every minute
0.04: Add ability to only redraw when a peripheral state changes 0.04: Add ability to only redraw when a peripheral state changes
0.05: Adjust default (of previous change) to preserve original behaviour

View File

@ -1,6 +1,6 @@
{ "id": "widdevst", { "id": "widdevst",
"name": "Device Status Widget", "name": "Device Status Widget",
"version": "0.04", "version": "0.05",
"description": "Shows power status of Bluetooth, Compass, GPS and Heart Rate Monitor as well as storage and memory usage.", "description": "Shows power status of Bluetooth, Compass, GPS and Heart Rate Monitor as well as storage and memory usage.",
"icon": "icon.png", "icon": "icon.png",
"type": "widget", "type": "widget",

View File

@ -2,7 +2,7 @@
var stat = {date: 0}; var stat = {date: 0};
var d = Date.now(); var d = Date.now();
var settings = require("Storage").readJSON("widdevst.settings.json", 1)||{}; var settings = require("Storage").readJSON("widdevst.settings.json", 1)||{};
var redrawBars = "redrawBars" in settings ? settings.redrawBars : false; var redrawBars = "redrawBars" in settings ? settings.redrawBars : true;
delete settings; delete settings;
WIDGETS.devst = {area: "tr", width: 22, draw: function() { WIDGETS.devst = {area: "tr", width: 22, draw: function() {