Closed edouard-lopez closed 7 years ago
A quick solution, need to ensure there is no regression as I don't know the format of the grep remain case.
grep remain
upower output for reference:
upower
$ upower -i /org/freedesktop/UPower/devices/battery_BAT0 native-path: BAT0 vendor: LGC model: 00HW002 serial: 2598 power supply: yes updated: Tue 06 Sep 2016 04:14:53 PM CEST (12 seconds ago) has history: yes has statistics: yes battery present: yes rechargeable: yes state: discharging warning-level: none energy: 44,67 Wh energy-empty: 0 Wh energy-full: 46,97 Wh energy-full-design: 50,22 Wh energy-rate: 12,546 W voltage: 16,728 V time to empty: 3,6 hours # <-------------------------------------------- percentage: 95% capacity: 93,2099% technology: lithium-polymer icon-name: 'battery-full-symbolic' History (charge): 1473171293 95,000 discharging History (rate): 1473171293 12,546 discharging
Looks good to me, I prefer to see an example for both the remain and the time to empty case which this enhancement will work for both cases.
remain
time to empty
closing as base code evolded.
A quick solution, need to ensure there is no regression as I don't know the format of the
grep remain
case.upower
output for reference: