diff --git a/frontend/device/kobo/device.lua b/frontend/device/kobo/device.lua index 5df59a953..2bebb398f 100644 --- a/frontend/device/kobo/device.lua +++ b/frontend/device/kobo/device.lua @@ -534,6 +534,74 @@ local KoboCondor = Kobo:extend{ isSMP = yes, } +-- Kobo Clara B/W: +local KoboSpaBW = Kobo:extend{ + model = "Kobo_spaBW", + isMTK = yes, + hasEclipseWfm = yes, + canToggleChargingLED = yes, + hasFrontlight = yes, + touch_snow_protocol = true, + display_dpi = 300, + hasNaturalLight = yes, + frontlight_settings = { + frontlight_white = "/sys/class/backlight/mxc_msp430.0/brightness", + frontlight_mixer = "/sys/class/backlight/lm3630a_led/color", + nl_min = 0, + nl_max = 10, + nl_inverted = true, + }, + battery_sysfs = "/sys/class/power_supply/bd71827_bat", + power_dev = "/dev/input/by-path/platform-bd71828-pwrkey.6.auto-event", +} + +-- Kobo Clara Colour: +local KoboSpaColour = Kobo:extend{ + model = "Kobo_spaColour", + isMTK = yes, + hasEclipseWfm = yes, + canToggleChargingLED = yes, + hasFrontlight = yes, + touch_snow_protocol = true, + display_dpi = 300, + hasNaturalLight = yes, + frontlight_settings = { + frontlight_white = "/sys/class/backlight/mxc_msp430.0/brightness", + frontlight_mixer = "/sys/class/backlight/lm3630a_led/color", + nl_min = 0, + nl_max = 10, + nl_inverted = true, + }, + battery_sysfs = "/sys/class/power_supply/bd71827_bat", + power_dev = "/dev/input/by-path/platform-bd71828-pwrkey.6.auto-event", + isSMP = yes, + hasColorScreen = yes, +} + +-- Kobo Libra Colour: +local KoboMonza = Kobo:extend{ + model = "Kobo_monza", + isMTK = yes, + hasEclipseWfm = yes, + canToggleChargingLED = yes, + hasFrontlight = yes, + hasKeys = yes, + hasGSensor = yes, + display_dpi = 300, + hasNaturalLight = yes, + frontlight_settings = { + frontlight_white = "/sys/class/backlight/mxc_msp430.0/brightness", + frontlight_mixer = "/sys/class/backlight/lm3630a_led/color", + nl_min = 0, + nl_max = 10, + nl_inverted = true, + }, + battery_sysfs = "/sys/class/power_supply/bd71827_bat", + power_dev = "/dev/input/by-path/platform-bd71828-pwrkey.6.auto-event", + isSMP = yes, + hasColorScreen = yes, +} + function Kobo:setupChargingLED() if G_reader_settings:nilOrTrue("enable_charging_led") then if self:hasAuxBattery() and self.powerd:isAuxBatteryConnected() then @@ -638,7 +706,7 @@ function Kobo:init() is_always_portrait = self.isAlwaysPortrait(), mxcfb_bypass_wait_for = mxcfb_bypass_wait_for, } - if self.screen.fb_bpp == 32 then + if self.screen.fb_bpp == 32 and not self:hasColorScreen() then -- Ensure we decode images properly, as our framebuffer is BGRA... logger.info("Enabling Kobo @ 32bpp BGR tweaks") self.hasBGRFrameBuffer = yes @@ -1678,6 +1746,12 @@ elseif codename == "goldfinch" then return KoboGoldfinch elseif codename == "condor" then return KoboCondor +elseif codename == "spaBW" then + return KoboSpaBW +elseif codename == "spaColour" then + return KoboSpaColour +elseif codename == "monza" then + return KoboMonza else error("unrecognized Kobo model ".. codename .. " with device id " .. product_id) end