Commit e66ca9b
committed
HealthStatsSync: refresh today's weekday _sleepData typicals
The existing daily 6-day loop deliberately skips today (incomplete
current-day daily fields shouldn't overwrite the watch's
accelerometer-tracked values), but the firmware reads
`<today's weekday>_sleepData` typicals on the sleep summary card.
Without this extra write the typicals for today's weekday stay
stale for a day after the new typical-sleep code starts running.
After the daily loop, add a typicals-only blob for today's weekday
with last_processed_timestamp=0. Firmware's prv_notify_health_listeners
gates the in-memory daily-metric update on a valid timestamp and bails
out, so daily fields=0 don't corrupt today's tracked values, but
health_db_insert still stores the blob — making the typicals readable
via health_db_get_typical_value.
This brings sleep typicals in line with the step typicals, which
already cover all 7 weekdays via their separate per-weekday loop.1 parent 18e6496 commit e66ca9b
1 file changed
Lines changed: 23 additions & 0 deletions
Lines changed: 23 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
129 | 129 | | |
130 | 130 | | |
131 | 131 | | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
132 | 155 | | |
133 | 156 | | |
134 | 157 | | |
| |||
0 commit comments