Initial Kobo Forma support (#4325)

* Initial Kobo Forma support

re #4291
c.f., https://www.mobileread.com/forums/showpost.php?p=3771404&postcount=2994
& https://www.mobileread.com/forums/showpost.php?p=3772378&postcount=2998

Big fat warning: something is *definitely* rotten in the state of
Denmark:

* FrontLight/NaturalLight might need some more testing/tweaks
* Rotation (initial or accelerometer-induced) is *NOT* handled.
  This'll require someone with an actual Forma, shell access,
  and a bit of courage, because rotation is hell.
  Programming chops greatly appreciated!
pull/4327/head
NiLuJe 6 years ago committed by GitHub
parent b69882fa34
commit 419769d07e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -198,6 +198,27 @@ local KoboNova = Kobo:new{
},
}
-- Kobo Forma:
-- FIXME: Will need initial rotation trickery like the Kindle Oasis, startup HW rota available via self.screen.fb_rota
-- In the meantime, start KOReader with the Forma in Upright Portrait mode in order to have working touch input.
-- (That's Portrait with the buttons on the right).
-- c.f., #4291
-- FIXME: FrontLight/NaturalLight is untested
-- FIXME: touch_probe_ev_epoch_time is possibly unneeded
local KoboFrost = Kobo:new{
model = "Kobo_frost",
hasFrontlight = yes,
hasKeys = yes,
touch_probe_ev_epoch_time = true,
touch_snow_protocol = true,
display_dpi = 300,
hasNaturalLight = yes,
frontlight_settings = {
frontlight_white = "/sys/class/backlight/mxc_msp430.0",
frontlight_red = "/sys/class/backlight/tlc5947_bl",
}
}
function Kobo:init()
self.screen = require("ffi/framebuffer_mxcfb"):new{device = self, debug = logger.dbg}
-- NOTE: Something about the extra work needed to handle RGB565 conversions is making the JIT optimizer crazy when doing
@ -220,6 +241,8 @@ function Kobo:init()
[90] = "LightButton",
[102] = "Home",
[116] = "Power",
[193] = "RPgBack",
[194] = "RPgFwd",
},
event_map_adapter = {
SleepCover = function(ev)
@ -673,6 +696,8 @@ elseif codename == "snow" then
return KoboSnow
elseif codename == "nova" then
return KoboNova
elseif codename == "frost" then
return KoboFrost
else
error("unrecognized Kobo model "..codename)
end

Loading…
Cancel
Save