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

Battery subsystem causes fatal error on Kobo Libra 2 #237

Closed
ticky opened this issue Jun 3, 2022 · 0 comments · Fixed by #239
Closed

Battery subsystem causes fatal error on Kobo Libra 2 #237

ticky opened this issue Jun 3, 2022 · 0 comments · Fixed by #239

Comments

@ticky
Copy link
Contributor

ticky commented Jun 3, 2022

On my Kobo Libra 2, Plato 0.9.27 fails to start, and I get the following in info.log:

Error: can't build context

Caused by:
    0: can't create battery
    1: No such file or directory (os error 2)

This appears to be down to an oversight in the battery reading code; as a Mark 9 device, the Libra 2 exposes the battery device at /sys/class/power_supply/battery, not /sys/class/power_supply/mc13892_bat, but the battery code is treating it as if it were an earlier device:

let base = if CURRENT_DEVICE.mark() != 8 {

I believe this could be fixed by merging #185, or by changing the above line to < instead of !=

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

Successfully merging a pull request may close this issue.

1 participant