fix(battery): start and end threshold check

end limits should be greater than start and end should be < 100 for it to be considered enabled
This commit is contained in:
Ashley Wulber 2025-11-05 10:33:24 -05:00 committed by Ashley Wulber
parent 3ba34931e7
commit ba1e379a75

View file

@ -220,7 +220,7 @@ pub async fn get_charging_limit() -> anyhow::Result<bool> {
match backend {
Backend::S76PowerDaemon(proxy) => {
if let Ok((start, end)) = proxy.get_charge_thresholds().await {
return Ok(start > 0 || end > 0);
return Ok(end > start && end < 100);
}
}
Backend::PowerProfilesDaemon(_) => {