Commit Graph

2 Commits

Author SHA1 Message Date
nevaforget baada36222 fix: reject out-of-range led brightness instead of silently clamping
led accepted any u16 and main.rs clamped to 0..=1000 with no feedback,
inconsistent with sidetone which rejects out-of-range at parse time.
Add a clap range validator (0..=1000) and drop the silent clamp, so
invalid input now fails loudly.

Further quality-audit follow-ups:
- remove dead BragiDevice::open() (no caller; binary uses open_with_verbose)
- add tests: led range validation, format_battery for all status
  variants, waybar "unknown" class

Bump 0.1.2 -> 0.1.3.
2026-06-10 17:51:40 +02:00
nevaforget 25eacfc02d fix: Audit-Befunde in Protokoll-Parsing, Error-Handling und Eingabe-Validierung
BragiResponse-Felder korrekt zugeordnet (endpoint=raw[1], command=raw[2],
status=raw[3]) gemäß Protokoll-Doku. PropertyNotSupported durch DeviceError
ersetzt, parse_response_validated in device.rs aktiviert, flush() mit
Iterationslimit gegen Endlosschleifen, Sidetone-Range per clap validiert
statt clamp, JSON-Escaping im hidpp-battery-waybar.sh, udev auf uaccess
umgestellt. 52 Tests grün.
2026-03-28 00:37:36 +01:00