Merge pull request #1527 from tarlou/master

Kobo Glo HD support
pull/1542/head v2015.05.17-nightly
Huang Xin 9 years ago
commit caf127fd58

@ -207,6 +207,12 @@ function Input:adjustTouchTranslate(ev, by)
end
end
end
function Input:adjustTouchAlyssum(ev)
ev.time = TimeVal:now()
if ev.type == EV_ABS and ev.code == ABS_MT_TRACKING_ID then
ev.value = ev.value - 1
end
end
function Input:setTimeout(cb, tv_out)
local item = {

@ -69,6 +69,15 @@ local KoboPhoenix = Kobo:new{
viewport = Geom:new{x=0, y=0, w=758, h=1012},
}
-- Kobo Glo HD:
local KoboAlyssum = Kobo:new{
model = "Kobo_alyssum",
hasFrontlight = yes,
touch_phoenix_protocol = true,
touch_alyssum_protocol = true,
display_dpi = 300,
}
function Kobo:init()
self.screen = require("ffi/framebuffer_mxcfb"):new{device = self, debug = DEBUG}
self.powerd = require("device/kobo/powerd"):new{device = self}
@ -97,6 +106,10 @@ function Kobo:init()
)
end
if self.touch_alyssum_protocol then
self.input:registerEventAdjustHook(self.input.adjustTouchAlyssum)
end
if self.touch_phoenix_protocol then
self.input.handleTouchEv = self.input.handleTouchEvPhoenix
end
@ -158,6 +171,8 @@ elseif codename == "trilogy" then
return KoboTrilogy
elseif codename == "pixie" then
return KoboPixie
elseif codename == "alyssum" then
return KoboAlyssum
else
error("unrecognized Kobo model "..codename)
end

Loading…
Cancel
Save