From 853d8eeef337169be211da221ce81e7149fb59c9 Mon Sep 17 00:00:00 2001 From: Ishidres <17363426+Ishidres@users.noreply.github.com> Date: Fri, 8 Mar 2024 00:08:48 +0100 Subject: [PATCH] Add comments about sleep status, fix typo --- apps/sleeplog/boot.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/apps/sleeplog/boot.js b/apps/sleeplog/boot.js index 53873ab29..e956c5ed1 100644 --- a/apps/sleeplog/boot.js +++ b/apps/sleeplog/boot.js @@ -158,11 +158,12 @@ if (sleeplog.conf.enabled) { data.timestamp = data.timestamp || ((Date.now() / 6E5 | 0) - 1) * 6E5; // add preliminary status depending on charging and movement thresholds + // 1 = not worn, 2 = awake, 3 = light sleep, 4 = deep sleep data.status = Bangle.isCharging() ? 1 : data.movement <= sleeplog.conf.deepTh ? 4 : data.movement <= sleeplog.conf.lightTh ? 3 : 2; - // check if changing to deep sleep from non sleepling + // check if changing to deep sleep from non sleeping if (data.status === 4 && sleeplog.status <= 2) { // check wearing status sleeplog.checkIsWearing((isWearing, data) => {