Files
linux-voice-assistant/linux_voice_assistant
imonlinux d10cf87eef Update xvf3800_led_backend.py
Problem

XVF3800 LED ring worked inconsistently (~50% success rate at startup) due to: 1. Timing race: LED commands sent before WS2812 power (X0D33) enabled 2. Missing context manager: USB resources could leak on exceptions

Changes

Context Manager Support (Critical Fix B)

Added __enter__ and __exit__ methods to _ReSpeaker class
Enhanced close() with proper null checks and error handling
Enables safe with statement usage
LED Power Management (NEW Critical Fix)

Proactive initialization: Enable X0D33 immediately in __init__ before any LED operations
Defensive runtime checks: Added _ensure_led_power() helper method
Power verification: Check X0D33 state before set_effect() and set_ring_colors()
Added 50ms settle time after enabling power
Documentation

Added GPO_WRITE_VALUE and GPO_READ_VALUES to PARAMETERS dict
Added GPO_WS2812_POWER_INDEX constant for clarity
Enhanced inline comments explaining power management
2026-01-10 13:24:38 -08:00
..
2025-08-26 09:30:58 -05:00
2026-01-06 13:37:00 -08:00
2025-11-18 15:15:46 -08:00
2026-01-10 13:23:33 -08:00
2026-01-06 13:35:52 -08:00
2025-11-17 17:42:40 -08:00
2026-01-06 13:46:32 -08:00
2026-01-06 13:36:28 -08:00
2025-12-11 18:47:01 -08:00
2025-11-17 21:50:53 -08:00
2026-01-01 15:16:13 -08:00
2025-11-29 14:38:13 -08:00
2026-01-05 21:52:41 -08:00
2026-01-01 15:17:41 -08:00
2025-11-29 23:43:08 -08:00
2025-11-21 17:17:56 -08:00
2025-11-19 18:46:05 -08:00