Skip to content

Commit 050d58d

Browse files
authored
Clean up health function in boot.js
Removed unnecessary whitespace and comments in health function.
1 parent 53c3005 commit 050d58d

File tree

1 file changed

+0
-6
lines changed

1 file changed

+0
-6
lines changed

apps/sleeplog/boot.js

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -154,13 +154,10 @@ if (global.sleeplog.conf.enabled) {
154154
print("Sleep Log - Health Data Acquired");
155155
// check if global variable accessable
156156
if (!global.sleeplog) return new Error("sleeplog: Can't process health event, global object missing!");
157-
158157
// check if movement is available
159158
if (!data.movement) return;
160-
161159
// add timestamp rounded to 10min, corrected to 10min ago
162160
data.timestamp = data.timestamp || ((Date.now() / 6E5 | 0) - 1) * 6E5;
163-
164161
// add preliminary status depending on charging and movement thresholds
165162
// 1 = not worn, 2 = awake, 3 = light sleep, 4 = deep sleep
166163
if(data.bpm){
@@ -177,9 +174,6 @@ if (global.sleeplog.conf.enabled) {
177174
} else data.status = 1;
178175
}
179176

180-
181-
182-
183177
// check if changing to deep sleep from non sleeping
184178
if (data.status === 4 && global.sleeplog.status <= 2) {
185179
global.sleeplog.checkIsWearing((isWearing, data) => {

0 commit comments

Comments
 (0)