Commit Graph

5 Commits

Author SHA1 Message Date
Levi Woodard
69d2926a1a Fix HID read busy-spin: pass 250ms, not 250ns, to ReadWithTimeout
go-hid's ReadWithTimeout takes a time.Duration, so the bare 250 was
250ns, which truncates to a 0 ms hid_read_timeout. On both Linux
(poll) and macOS (cond_timedwait) 0 ms means non-blocking, so the
button loop spun continuously: ~1.2 cores and ~7.5k context
switches/sec at idle, from startup.

Pass 250*time.Millisecond and match hid.ErrTimeout with errors.Is
ahead of the string fallback. Idle CPU drops to ~0%.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016yH8jHn1SNzNnL58CRwTi9
2026-09-29 18:49:39 -06:00
Levi Woodard
962ee747fd Text overlay support 2026-04-18 11:55:18 -06:00
lwoodard
0f5a136764 adding mac support mainly 2026-04-13 08:11:19 -06:00
Levi Woodard
b428f4861a Fix HID timeout/EINTR errors and relative icon paths
- Treat "timeout" and "interrupted system call" from ReadWithTimeout as
  non-fatal — hidraw on Linux returns errors instead of (0, nil) for
  both, causing false device-dead detection and reconnect loops
- Resolve icons_dir relative to the config file when the path is not
  absolute, so the service finds icons regardless of working directory
- Installer now copies bundled icons to the config dir on first install
2026-03-15 10:36:44 -06:00
Levi Woodard
663d452ca3 Initial Push 2026-03-15 10:10:13 -06:00