From f77226e33ef88da8d8c657773d53c390ad5aa14f Mon Sep 17 00:00:00 2001 From: Stiralbios Date: Sat, 18 Jun 2022 19:16:44 +0200 Subject: [PATCH] [TerminalClock] Add sensible default settings --- apps/terminalclock/app.js | 11 ++++++++++- apps/terminalclock/settings.js | 12 ++++++------ 2 files changed, 16 insertions(+), 7 deletions(-) diff --git a/apps/terminalclock/app.js b/apps/terminalclock/app.js index 9b810a10a..9b8eb1351 100644 --- a/apps/terminalclock/app.js +++ b/apps/terminalclock/app.js @@ -29,7 +29,16 @@ const clock = new ClockFace({ if (this.PowerOnInterval === undefined) this.PowerOnInterval = 15; if (this.powerSaving===undefined) this.powerSaving = true; ["L2", "L3", "L4", "L5", "L6", "L7", "L8", "L9"].forEach(k => { - if (this[k]===undefined) this[k] = "Empty"; + if (this[k]===undefined){ + if(k == "L2") this[k] = "Date"; + else if(k == "L3") { + this[k] = "HR"; + this.showHRM = true; + }else if(k == "L4") this[k] = "Motion"; + else if(k == "L5") this[k] = "Steps"; + else if(k == "L6") this[k] = ">"; + else this[k] = "Empty"; + } else if (this[k]==="HR") this.showHRM = true; else if (this[k]==="Alt") this.showAltitude = true && process.env.HWVERSION == 2; }); diff --git a/apps/terminalclock/settings.js b/apps/terminalclock/settings.js index dfc9d88c2..59b55fb34 100644 --- a/apps/terminalclock/settings.js +++ b/apps/terminalclock/settings.js @@ -8,11 +8,11 @@ HRMinConfidence: 50, powerSaving: true, PowerOnInterval: 15, - L2: 'Empty', - L3: 'Empty', - L4: 'Empty', - L5: 'Empty', - L6: 'Empty', + L2: 'Date', + L3: 'HR', + L4: 'Motion', + L5: 'Steps', + L6: '>', L7: 'Empty', L8: 'Empty', L9: 'Empty', @@ -102,4 +102,4 @@ } E.showMenu(getMainMenu()); -})(); \ No newline at end of file +}) \ No newline at end of file