diff --git a/base b/base index cf317f2fc..5c8fa477f 160000 --- a/base +++ b/base @@ -1 +1 @@ -Subproject commit cf317f2fc59341a05811865e729b5d1523e25c6f +Subproject commit 5c8fa477f8abca437950420e08efa3d2ef0da1bf diff --git a/frontend/device/kobo/device.lua b/frontend/device/kobo/device.lua index d982a0be6..9f7c4c25e 100644 --- a/frontend/device/kobo/device.lua +++ b/frontend/device/kobo/device.lua @@ -73,6 +73,8 @@ local Kobo = Generic:new{ pressure_event = nil, -- Device features multiple CPU cores isSMP = no, + -- Device supports "eclipse" waveform modes (i.e., optimized for nightmode). + hasEclipseWfm = no, } --- @todo hasKeys for some devices? @@ -312,6 +314,7 @@ local KoboLuna = Kobo:new{ local KoboEuropa = Kobo:new{ model = "Kobo_europa", isSunxi = yes, + hasEclipseWfm = yes, canToggleChargingLED = yes, hasFrontlight = yes, hasGSensor = yes, @@ -330,6 +333,7 @@ local KoboEuropa = Kobo:new{ local KoboCadmus = Kobo:new{ model = "Kobo_cadmus", isSunxi = yes, + hasEclipseWfm = yes, canToggleChargingLED = yes, hasFrontlight = yes, hasKeys = yes, @@ -355,6 +359,32 @@ local KoboCadmus = Kobo:new{ isSMP = yes, } +-- Kobo Libra 2: +local KoboIo = Kobo:new{ + model = "Kobo_io", + isMk7 = yes, + hasEclipseWfm = yes, + canToggleChargingLED = yes, + hasFrontlight = yes, + hasKeys = yes, + hasGSensor = yes, + canToggleGSensor = yes, + pressure_event = C.ABS_MT_PRESSURE, + touch_mirrored_x = false, + 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/lm3630a_led/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, + }, +} + function Kobo:init() -- Check if we need to disable MXCFB_WAIT_FOR_UPDATE_COMPLETE ioctls... local mxcfb_bypass_wait_for @@ -1036,6 +1066,8 @@ elseif codename == "europa" then return KoboEuropa elseif codename == "cadmus" then return KoboCadmus +elseif codename == "io" then + return KoboIo else error("unrecognized Kobo model "..codename) end