Commit 9c15c09
authored
Update lib.js to save averaged HR instead of last HR
Previous version saved the last sent HR reading when saving to CSV. Updated to maintain an average of all HR readings during each recording interval (only readings with confidence > 80), and save this instead. If no readings pass confidence threshold, the reading with the highest confidence is saved.1 parent 4f48439 commit 9c15c09
1 file changed
+33
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
61 | 61 | | |
62 | 62 | | |
63 | 63 | | |
64 | | - | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
65 | 67 | | |
66 | | - | |
67 | | - | |
| 68 | + | |
| 69 | + | |
68 | 70 | | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
69 | 81 | | |
| 82 | + | |
70 | 83 | | |
71 | 84 | | |
72 | 85 | | |
73 | 86 | | |
74 | | - | |
75 | | - | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
76 | 103 | | |
77 | 104 | | |
78 | 105 | | |
| |||
384 | 411 | | |
385 | 412 | | |
386 | 413 | | |
387 | | - | |
| 414 | + | |
0 commit comments