|
|
@ -25,8 +25,10 @@ local PocketBookPowerD = BasePowerD:new{
|
|
|
|
function PocketBookPowerD:init()
|
|
|
|
function PocketBookPowerD:init()
|
|
|
|
-- needed for SetFrontlightState / GetFrontlightState
|
|
|
|
-- needed for SetFrontlightState / GetFrontlightState
|
|
|
|
inkview.OpenScreen()
|
|
|
|
inkview.OpenScreen()
|
|
|
|
local color = inkview.GetFrontlightColor()
|
|
|
|
if self.device:hasNaturalLight() then
|
|
|
|
self.fl_warmth = color >= 0 and color or 0
|
|
|
|
local color = inkview.GetFrontlightColor()
|
|
|
|
|
|
|
|
self.fl_warmth = color >= 0 and color or 0
|
|
|
|
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
function PocketBookPowerD:frontlightIntensityHW()
|
|
|
|
function PocketBookPowerD:frontlightIntensityHW()
|
|
|
@ -43,8 +45,10 @@ function PocketBookPowerD:setIntensityHW(intensity)
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
function PocketBookPowerD:setWarmth(level)
|
|
|
|
function PocketBookPowerD:setWarmth(level)
|
|
|
|
self.fl_warmth = level or self.fl_warmth
|
|
|
|
if self.fl_warmth then
|
|
|
|
inkview.SetFrontlightColor(self.fl_warmth)
|
|
|
|
self.fl_warmth = level or self.fl_warmth
|
|
|
|
|
|
|
|
inkview.SetFrontlightColor(self.fl_warmth)
|
|
|
|
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
function PocketBookPowerD:getCapacityHW()
|
|
|
|
function PocketBookPowerD:getCapacityHW()
|
|
|
|