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.
This commit is contained in:
2026-03-28 00:37:36 +01:00
parent 05d138e922
commit 25eacfc02d
15 changed files with 208 additions and 48 deletions
+2 -3
View File
@@ -37,9 +37,8 @@ fn format_sidetone_value() {
#[test]
fn format_info_values() {
let result = output::format_info(0x1B1C, 0x0A69, 1797, 0);
assert!(result.contains("0x1B1C"));
assert!(result.contains("0x0A69"));
assert!(result.contains("1797.0"));
let expected = "Vendor ID: 0x1B1C\nProduct ID: 0x0A69\nFirmware: 1797.0";
assert_eq!(result, expected);
}
// Waybar-JSON Tests