Fix battery status on the K4

And also probably prevent a crash when trying to enable WiFi there.
We really shouldn't even show the WiFi stuff on some of these old
devices, but at least now it doesn't crash ;).
pull/1646/head
NiLuJe 9 years ago
parent 276838bc79
commit 5fa5fabf02

@ -112,6 +112,11 @@ end
function Kindle4:init()
self.screen = require("ffi/framebuffer_einkfb"):new{device = self, debug = DEBUG}
self.powerd = require("device/kindle/powerd"):new{
device = self,
batt_capacity_file = "/sys/devices/system/yoshi_battery/yoshi_battery0/battery_capacity",
is_charging_file = "/sys/devices/platform/fsl-usb2-udc/charging",
}
self.input = require("device/input"):new{
device = self,
event_map = require("device/kindle/event_map_kindle4"),

@ -11,8 +11,8 @@ local KindlePowerD = BasePowerD:new{
}
function KindlePowerD:init()
local lipc = require("liblipclua")
if lipc then
local haslipc, lipc = pcall(require, "liblipclua")
if haslipc and lipc then
self.lipc_handle = lipc.init("com.github.koreader.kindlepowerd")
end
if self.device.hasFrontlight() then

@ -8,9 +8,9 @@ local _ = require("gettext")
local NetworkMgr = {}
local function kindleEnableWifi(toggle)
local lipc = require("liblipclua")
local haslipc, lipc = pcall(require, "liblipclua")
local lipc_handle = nil
if lipc then
if haslipc and lipc then
lipc_handle = lipc.init("com.github.koreader.networkmgr")
end
if lipc_handle then

Loading…
Cancel
Save