mirror of
https://github.com/koreader/koreader.git
synced 2025-08-10 00:52:38 +00:00
Stop filling up crash.log with INFO messages about battery charge every couple of seconds.
Every write to a flash device shortens its life.
This commit is contained in:
@@ -57,7 +57,7 @@ end
|
||||
function BatteryLevel()
|
||||
local fn, battery = "/tmp/kindle-battery-info", "?"
|
||||
-- NuPogodi, 18.05.12: This command seems to work even without Amazon Kindle framework
|
||||
os.execute("gasgauge-info -s > "..fn)
|
||||
os.execute("gasgauge-info -s 2> /dev/null > "..fn)
|
||||
if io.open(fn,"r") then
|
||||
for lines in io.lines(fn) do battery = " " .. lines end
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user