diff --git a/apps/smclock/app.js b/apps/smclock/app.js index 0294f070b..9309cf508 100644 --- a/apps/smclock/app.js +++ b/apps/smclock/app.js @@ -99,7 +99,7 @@ function draw() { g.drawImage(background); const color = getBatteryColor(batLevel); - const bat; + const bat = ""; const d = new Date(); const day = d.getDate(); const month = d.getMonth() + 1; @@ -111,9 +111,9 @@ function draw() { const time = d02(h) + ":" + d02(m); if (E.getBattery() < 100) { - bat = d02(E.getBattery()) + "%" + bat = d02(E.getBattery()) + "%"; } else { - bat = E.getBattery() + "%" + bat = E.getBattery() + "%"; } g.reset(); @@ -146,6 +146,8 @@ function draw() { loadSettings(); +console.log(settings); + g.clear(); pollBattery(); diff --git a/apps/smclock/settings.js b/apps/smclock/settings.js index 0fa0340d5..6ff95c72e 100644 --- a/apps/smclock/settings.js +++ b/apps/smclock/settings.js @@ -6,17 +6,7 @@ var FILE = "smclock.json"; // load settings from the file // assign default values if it doesn't exist - var settings = Object.assign( - { - dateFormat: "Short", - drawInterval: 10, - pollInterval: 60, - showAnalogFace: false, - showWeekInfo: false, - useVectorFont: false, - }, - require("Storage").readJSON(FILE, true) || {} - ); + var settings = Object.assign(require("Storage").readJSON(FILE, true) || {}); // write the new settings to the file function writeSettings() {