🚀 SomnoTrace v4.1.0-beta7
✨ Highlights
- 📦 SNTv4 Stream Format & Project S Support: Introduced the new SNTv4 binary stream container for CPAP (
_overview.snt,_flow.snt) and oximetry (vitals.snt,raw_ppg_*.snt), with multi-member gzip support, robust trailer parsing, and strict SNTv4 validation for Project S uploads. - ⚡ Much Faster Web Portal & APIs: Added PSRAM caching with background refresh for
/api/daysand/api/oximetry/days, O(1) date-hinted oximetry lookups, and build-time gzipped web assets withETag(304 Not Modified) caching — cutting multi-second page and day-list loads down to milliseconds. - 🎯 Rock-Solid 1 Hz Live PPG & Accurate Sleep Staging: Fixed Gen1 1 Hz polling drift and BLE interval negotiation (
15–20 ms, adaptive0x1Cdrain budget), added a drain deadline to Gen2 polled fallback, and smoothed single-second jitter slips — eliminating the ~22–25% scattered 1-second dropouts that caused SomnoStage to misclassify sleep as mostly Wake with missing REM. - 🚶 Seamless Toilet-Break & Edge-of-Range Recovery: Gen1 no longer hits a 130 s reconnect curfew while resuming a paused live night or closes/reopens SD files on a single transient BLE packet error; Gen2 now applies the full 12 s off-finger debounce on reconnect, attempts an auto-stream re-arm on 5 s stalls before falling back to polling, and both drivers preserve the first half of the night if a resume open fails.
- 💓 Clean Perfusion Index (PI%) Graphs: Switched
pi_pctto use the O2 ring's own 1 Hzpi_rawreading directly instead of unfiltered raw-IR calculations, eliminating false 50–100% motion/AGC spikes (with a UI spike guard for older recordings too).
🐛 Fixes & Polish
- 🩺 Accurate Oximetry Diagnostics: Fixed the lingering
"1 downloaded but awaiting conversion"banner by scoping diagnostics to the selected night and automatically reconciling staleindex.jsonconversion flags. - ☁️ Smarter BreathingRoom & Upload Progress: Oximetry snippets rejected by BreathingRoom as
"recording too short"are now cleanly skipped instead of retrying every 24 hours, and backends with only parked/skipped items now showUp to date (N skipped) ✓rather than misleadingpendingcounts. - 🛡️ Stability & CI Hardening: Added channel bounds checks during SNTv4 EDF import flushing, cleaned up background cache refresh handling, and resolved static-analysis (
cppcheck) and mutation-test findings.