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:
Tigran Aivazian
2012-09-16 23:04:03 +01:00
parent a34696d96c
commit 1694fc5b0a

View File

@@ -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