Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create BatteryBlock using FileWatcherBlock #85

Open
thiagokokada opened this issue Sep 16, 2020 · 0 comments
Open

Create BatteryBlock using FileWatcherBlock #85

thiagokokada opened this issue Sep 16, 2020 · 0 comments

Comments

@thiagokokada
Copy link
Owner

There is already a SensorsBatteryBlock, but it is based on PollingBlock. Instead, let's reimplement it using sysfs interface (https://www.kernel.org/doc/Documentation/ABI/testing/sysfs-class-power) and FileWatcherBlock (based on aionotify).

Some posts in StackOverflow on how to calculate the remaining time:
https://stackoverflow.com/questions/26888636/how-to-calculate-the-time-remaining-until-the-end-of-the-battery-charge
https://stackoverflow.com/questions/35516424/calculate-time-left-until-battery-is-discharged

(They're probably not precise, but I don't think the current battery calculations from psutil are different from this).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant