linux-rust: parse single battery of AirPods Max

This commit is contained in:
Kavish Devar
2025-11-23 00:35:09 +05:30
parent 4737cbfc2c
commit 6f0323ee6b
5 changed files with 75 additions and 47 deletions

View File

@@ -170,6 +170,10 @@ impl AirPodsDevice {
handle.update(|tray: &mut MyTray| {
for b in &battery_info {
match b.component as u8 {
0x01 => {
tray.battery_headphone = Some(b.level);
tray.battery_headphone_status = Some(b.status);
}
0x02 => {
tray.battery_r = Some(b.level);
tray.battery_r_status = Some(b.status);