Support the Kobo Libra

(Hopefully?).
pull/5368/head
NiLuJe 5 years ago committed by Frans de Jonge
parent e257c4e45e
commit 4363576066

@ -234,6 +234,28 @@ local KoboFrost = Kobo:new{
},
}
-- Kobo Libra:
-- NOTE: Assume the same quirks as the Forma apply.
local KoboStorm = Kobo:new{
model = "Kobo_storm",
hasFrontlight = yes,
hasKeys = yes,
canToggleGSensor = yes,
touch_snow_protocol = true,
misc_ntx_gsensor_protocol = true,
display_dpi = 300,
hasNaturalLight = yes,
frontlight_settings = {
frontlight_white = "/sys/class/backlight/mxc_msp430.0/brightness",
frontlight_mixer = "/sys/class/backlight/tlc5947_bl/color",
-- Warmth goes from 0 to 10 on the device's side (our own internal scale is still normalized to [0...100])
-- NOTE: Those three extra keys are *MANDATORY* if frontlight_mixer is set!
nl_min = 0,
nl_max = 10,
nl_inverted = true,
},
}
-- This function will update itself after the first touch event
local probeEvEpochTime
probeEvEpochTime = function(self, ev)
@ -793,6 +815,8 @@ elseif codename == "nova" then
return KoboNova
elseif codename == "frost" then
return KoboFrost
elseif codename == "storm" then
return KoboStorm
else
error("unrecognized Kobo model "..codename)
end

@ -166,9 +166,9 @@ ko_do_fbdepth() {
if grep -q '\["dev_startup_no_fbdepth"\] = true' 'settings.reader.lua' 2>/dev/null; then
# Swap back to the original bitdepth (in case this was a restart)
if [ -n "${ORIG_FB_BPP}" ]; then
# Unless we're a Forma, don't even bother to swap rotation if the fb is @ 16bpp, because RGB565 is terrible anyways,
# Unless we're a Forma/Libra, don't even bother to swap rotation if the fb is @ 16bpp, because RGB565 is terrible anyways,
# so there's no faster codepath to achieve, and running in Portrait @ 16bpp might actually be broken on some setups...
if [ "${ORIG_FB_BPP}" -eq "16" ] && [ "${PRODUCT}" != "frost" ]; then
if [ "${ORIG_FB_BPP}" -eq "16" ] && [ "${PRODUCT}" != "frost" ] && [ "${PRODUCT}" != "storm" ]; then
echo "Making sure we're using the original fb bitdepth @ ${ORIG_FB_BPP}bpp & rotation @ ${ORIG_FB_ROTA}" >>crash.log 2>&1
./fbdepth -d "${ORIG_FB_BPP}" -r "${ORIG_FB_ROTA}" >>crash.log 2>&1
else

Loading…
Cancel
Save