commit 7f2408559294e746a03d3f15ed1951a6e4ed744d from: Benjamin Stürz date: Thu Jul 18 21:39:11 2024 UTC bedstatus: freebsd: fix bat_charging commit - 7531eddb5c1c5d5778955b6935e033f865bde366 commit + 7f2408559294e746a03d3f15ed1951a6e4ed744d blob - abefccb23efc5f36794e0c01518bbd51f513671a blob + 530b947f6a551749a7b033dabde016cb46c7c839 --- bedstatus/freebsd.c +++ bedstatus/freebsd.c @@ -58,7 +58,7 @@ static bool bat_charging (bool *b) if (!SYSCTL ("hw.acpi.battery.state", &x)) return false; - *b = (x == 0); + *b = (x & 2) == 2; return true; }