![]() |
sailfish onboard battery monitor
hi,
since update to 1.0.3.8 i noticed follow: sailfish logged by it self battery-states located in: Code:
/var/lib/upower Code:
[nemo@localhost upower]$ ls -al Code:
[nemo@localhost upower]$ cat history-charge-7.dat Code:
/var/run/state/namespaces/Battery Code:
/var/run/state/providers/upower/Battery Code:
[nemo@localhost Battery]$ ls -al |
Re: sailfish onboard battery monitor
Cool, thanks for the info! :) I quickly computed a median over my discharge rate using
Code:
grep discharging /var/lib/upower/history-rate-7.dat | sort -k2 | awk '{ a[i++]=$2; } END { print a[int(i/2)]; }' :) stefan PS: Computing the mean using the awk command below does bias short intervals with a high consumption too strongly (I get 0.448 Watt) and would suggest that my battery lasts for only 17.8h which is not the case. Code:
awk '{ if ($3 =="discharging") sum += $2 } END { if (NR > 0) print sum / NR }' < /var/lib/upower/history-rate-7.dat Code:
grep discharging /var/lib/upower/history-rate-7.dat | sort -k2 | head |
Re: sailfish onboard battery monitor
Hi,
you can check https://openrepos.net/content/radekp/battery-monitor for battery monitor application done by me. It draws graph for charge_now values. Unfortunately the value refreshes quite seldom - so not very useful for short term measurements, but you will get pretty accurate graph e.g. if you manually refresh after a few hours. Btw battery on my Jolla on 2G takes 7 days to discharge. |
Re: sailfish onboard battery monitor
can you code a second screen based by 'history-charge-7.dat'?
i'm not a developer, so i can't support you... |
Re: sailfish onboard battery monitor
Yes, it should be possible, but no promises - depends if i'll have time
|
Re: sailfish onboard battery monitor
No hurry...
|
Re: sailfish onboard battery monitor
It seems that with Sailfish 1.1.0.39 the files from /var/lib/upower are missing!
|
Re: sailfish onboard battery monitor
In version 1.1.0.39 we can use files from:
/var/run/state/providers/upower/ and /sys/class/power_supply/battery (apparently there are the same files) |
All times are GMT. The time now is 21:46. |
vBulletin® Version 3.8.8