mirror of
https://github.com/ruvnet/RuView
synced 2026-07-20 17:03:24 +00:00
5f3c90bf1c
The person-count heuristic was causing widespread flickering (#237, #249, #280, #292) because: 1. Threshold 0.50 for 2-persons was too low — multipath reflections in small rooms easily exceeded it 2. No actual hysteresis despite the comment claiming asymmetric thresholds 3. EMA smoothing (α=0.15) was too responsive to transient spikes Changes: - Raise up-thresholds: 1→2 persons at 0.65 (was 0.50), 2→3 at 0.85 (was 0.80) - Add true hysteresis with asymmetric down-thresholds: 2→1 at 0.45, 3→2 at 0.70 - Track prev_person_count in SensingState for state-aware transitions - Increase EMA smoothing to α=0.10 (~2s time constant at 20 Hz) - Update all 4 call sites (ESP32, Windows WiFi, multi-BSSID, simulated) Fixes #292, #280, #237 Co-authored-by: Reuven <cohen@ruv-mac-mini.local>