3 Commits
Author SHA1 Message Date
imonlinux 67abca1111 Update xvf3800_button_controller.py
Summary

Add USB context manager support and optimize polling interval

Problem

Missing context manager: USB resources could leak on exceptions
Aggressive polling: 100 Hz (10ms) unnecessarily high for human button presses
Changes

Context Manager Support (Critical Fix B)

Added __enter__ and __exit__ methods to XVF3800USBClient class
Enhanced close() with proper null checks and error handling
Enables safe with statement usage
Polling Optimization (Critical Fix C)

Changed default poll_interval_seconds from 0.01 to 0.05 (100 Hz → 20 Hz)
Updated XVF3800ButtonRuntimeConfig dataclass default
Updated fallback default in __init__ constructor
2026-01-10 13:25:29 -08:00
imonlinux fed867936a Update xvf3800_button_controller.py
Fix physical mute button not illuminating the led ring with the Mute State.
2026-01-10 11:50:02 -08:00
imonlinux e845c5c811 XVF3800 Mute Button Support
This is the same design as earlier, but now explicitly expects button_config.mode/poll_interval_seconds to exist (with defaults from ButtonConfig).
2025-12-08 11:33:21 -08:00