github ilyakruchinin/SomnoTrace v2.0.1

4 hours ago

SomnoTrace v2.0.1 Release Notes

SomnoTrace v2.0.1 is a major refinement release focusing on real-time display responsiveness, bedroom-friendly display controls, web portal performance, and enhanced firmware resilience.


⚡ Instantaneous Zero-Lag Waveform Display

  • Event-Driven LCD Refresh: Live breath waveforms on the hardware display now render synchronously with CPAP BLE packet arrivals (~5 Hz) with direct head indexing. By eliminating artificial buffer delays, breath-to-screen latency is reduced by ~240 ms, delivering instantaneous real-time feedback with zero perceptible lag.
  • Hardware Display Watchdog: Added a periodic display supervisor task that monitors SPI/DMA transactions and automatically resets the ST7789 display controller in the rare event of a bus stall.

🖥️ Display Settings Overhaul & Thoughtful Defaults

  • Separation of Display Content & Backlight Policy: Decoupled "what to show" from "when the screen stays lit". You can now independently choose:
    • Screen during therapy: Choose between Info Panel (runtime, leak rate, and session statistics), Live Flow Graph (breath waveform), or the standard Main Status Screen.
    • Backlight behavior: Choose between Always On, Off during therapy (turns off automatically when your mask goes on, turns back on when therapy stops), or Always Off (for completely dark bedrooms and battery preservation).
  • Info Panel as Default: New installations now default to the Info Panel during active therapy for a cleaner, bedroom-friendly glance at mask leak rate and session runtime.

🔘 Universal POWER Button & "Tap to Wake"

  • Universal POWER Button Backlight Toggle: A single click of the physical POWER button now toggles the screen backlight on or off on demand at any time, across all display modes (no longer locked behind a separate mode).
  • Tap to Wake (Touchscreen): When the display is dark, a gentle tap on the capacitive touchscreen temporarily illuminates the screen for a configurable duration (5s, 10s default, 15s, 30s, or 60s) before automatically returning to sleep.
  • Centralized I2C Bus Management: Consolidated touch controller (CST816) and audio codec (ES8311) access under a shared, thread-safe ESP-IDF v5 I2C master bus, eliminating peripheral contention during active Bluetooth connections.

🌐 Web Portal Performance

  • High-Efficiency Graph Rendering: Overhauled time-series data handling in the web portal. Pre-allocated typed arrays and reusable buffer pools now handle large, high-frequency night recordings, drastically cutting browser memory allocation, CPU spikes, and garbage-collection stutter.

🛡️ Reliability & Core Fixes

  • BLE Memory Allocation Guard: Added defensive null checks when acquiring fallback heap buffers during AirSense 11 BLE packet parsing, preventing potential null-pointer crashes during connection spikes.
  • Leap Year & Century Boundary Accuracy: Validated civil date timekeeping across February month-ends and century boundary conditions.

🧪 Test Suite & Quality Assurance

  • Direct Source Property Testing: Aligned the host property test suite to bind directly against shipped source modules.
  • Mutation & Contract Testing: Expanded test coverage for EDF generation boundaries and spool-to-EDF scale numerators, ensuring personal sleep health data is saved with 100% precision.

👥 Contributors

A big thank you to the contributors whose code, reviews, and test improvements shaped this release:

  • Chris Awad (@chrisawad) — Authored the initial physical POWER-button backlight control implementation (#168).
  • Michal Planicka (@Plantucha) — Contributed extensive host test suites, mutation testing infrastructure, civil-date boundary validations, and BLE buffer allocation safety fixes (#203, #204, #205, #206, #207, #208).
  • Ilya Kruchinin (@ilyakruchinin) — Zero-lag display pacing, centralized I2C architecture, display settings separation, touch-to-wake driver, web portal performance optimizations, and project architecture.

Don't miss a new SomnoTrace release

NewReleases is sending notifications on new releases.