linux: AirPods Max battery status support (#272)

This commit is contained in:
Tyrone
2025-11-20 18:44:40 +11:00
committed by GitHub
parent f12fe90134
commit 8a5d6087c9
8 changed files with 108 additions and 52 deletions

View File

@@ -85,11 +85,23 @@ namespace AirpodsTrayApp
return {"podpro.png", "podpro_case.png"};
case AirPodsModel::AirPodsMaxLightning:
case AirPodsModel::AirPodsMaxUSBC:
return {"max.png", "max_case.png"};
return {"podmax.png", "max_case.png"};
default:
return {"pod.png", "pod_case.png"}; // Default icon for unknown models
}
}
// TODO: Only used for parseEncryptedPacket for battery status. Is it possible to determine this
// from the data in the packet rather than by model? i.e number of batteries
inline bool isModelHeadset(AirPodsModel model) {
switch (model) {
case AirPodsModel::AirPodsMaxLightning:
case AirPodsModel::AirPodsMaxUSBC:
return true;
default:
return false;
}
}
}
}
}