Skip to content

Heart v1.0.11 — Sleep tab actually shows last week

Choose a tag to compare

@pointbreaklab-byte pointbreaklab-byte released this 09 May 21:06

What's fixed

Trends → Sleep tab empty even with HR data on disk

The Dart sleep stager had three constants set far too tight for real-world Coospo HW9 data quality:

  1. _hrStdMax = 4.0 — required heart-rate std-deviation < 4 bpm in every 5-min window. Real overnight traces have std around 4–6 bpm even during deep sleep; the stability score collapsed to 0 on most windows.
  2. _sleepOnsetThreshold = 0.85 — to OPEN a sleep period, a single window had to score ≥ 0.85. Under realistic data quality (BLE coverage ~0.5 sample/sec, std 4–6 bpm) the maximum achievable score for a clean sleep window was ~0.85 itself. The gate effectively never opened — Trends → Sleep stayed empty for entire weeks even with 60k samples per night on disk.
  3. _minDurationMinutes = 180 — rejected anything under 3 hours. Disturbed-sleep nights (2.5 h with multiple awakenings) had nothing to show.

Fix:

  • _hrStdMax8.0 (matches Kotlin's SLEEP_STD_MAX_BPM = 8.0 so Dart and native paths agree)
  • _sleepOnsetThreshold0.7 (still rejects quiet pre-sleep wakefulness, which scores ~0.65 with the level-score component dragging it down)
  • _minDurationMinutes120 (shows 2-hour-plus blocks instead of erasing them)

After upgrading, open the app once. The Trends → Sleep chart will populate with the last week's nights within seconds.

Build

  • heart-android.apk — arm64-v8a split, 22 MB. SHA-256: 710897fa8bca37cfcd5f0088818b2f200ce0eeec25f1ae5e0b2db5bac954c3ba
  • heart-android-universal.apk — fat APK, 62 MB. SHA-256: 41947c6f0c9de28a723869f98f53faa22add04d22473492e2a6f2683f03faca5
  • Same release certificate as every prior version — clean upgrade.