Sergey Krashevich
|
78ef8fc064
|
perf(homekit): optimize motion detector with frame-based timing
Replace time.Now() calls in hot path with frame-based timing:
- Pre-compute triggerLevel (integer comparison instead of float division)
- Calibrate hold/cooldown budgets from FPS (default 30fps)
- Periodic FPS recalibration every 150 frames for accuracy
- Active motion path: 47ns → 3.6ns (13x faster)
Update schema.json with detect mode and motion_threshold.
Add threshold tuning guide to README.
|
2026-03-05 08:50:27 +03:00 |
|