diff options
author | Marcus Glocker <mglocker@cvs.openbsd.org> | 2022-10-25 19:32:19 +0000 |
---|---|---|
committer | Marcus Glocker <mglocker@cvs.openbsd.org> | 2022-10-25 19:32:19 +0000 |
commit | e55718f9c01961332361f22152f06590a076baed (patch) | |
tree | 6f2addf5a3ae47d76a7b8d4d62dc80a918ecc264 | |
parent | bef72fef14fad63dfd95083c9810cfb5daf47a5f (diff) |
Calculate approx. battery re-charge time.
-rw-r--r-- | sys/dev/i2c/pijuice.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/sys/dev/i2c/pijuice.c b/sys/dev/i2c/pijuice.c index 0a1d94e1d93..6cfaeee04ec 100644 --- a/sys/dev/i2c/pijuice.c +++ b/sys/dev/i2c/pijuice.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pijuice.c,v 1.2 2022/10/24 04:28:01 mglocker Exp $ */ +/* $OpenBSD: pijuice.c,v 1.3 2022/10/25 19:32:18 mglocker Exp $ */ /* * Copyright (c) 2022 Marcus Glocker <mglocker@openbsd.org> @@ -380,6 +380,8 @@ pijuice_apminfo(struct apm_power_info *info) case PIJUICE_STATUS_BATT_CHARGE_AC: case PIJUICE_STATUS_BATT_CHARGE_5V: info->battery_state = APM_BATT_CHARGING; + info->minutes_left = + ((99 * 30) / 60) - info->minutes_left; break; case PIJUICE_STATUS_BATT_ABSENT: info->battery_state = APM_BATTERY_ABSENT; |