sensor: ac adapter
This commit is contained in:
parent
644cbfcf7a
commit
d9d7d3550e
|
@ -534,6 +534,15 @@ system_power_state_get(power_t *power)
|
|||
power->have_ac = atoi(buf);
|
||||
free(buf);
|
||||
}
|
||||
else
|
||||
{
|
||||
char *buf = file_contents("/sys/class/power_supply/ACAD/online");
|
||||
if (buf)
|
||||
{
|
||||
power->have_ac = atoi(buf);
|
||||
free(buf);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
_battery_state_get(power);
|
||||
|
|
Loading…
Reference in New Issue