Kobo Frontlight Tweaks

Now the frontlight remains unchanged from Nickel to koreader and vice
versa.
Also ffi/kobolight.lua has been changed to allow for usage of the toggle
button in the filemanager.
This commit is contained in:
Markismus
2014-05-02 16:06:18 +02:00
parent dc8b1f365b
commit a153286f44
3 changed files with 20 additions and 3 deletions

View File

@@ -20,6 +20,7 @@ end
function BasePowerD:init() end
function BasePowerD:toggleFrontlight() end
function BasePowerD:setIntensityHW() end
function BasePowerD:setIntensitySW() end
function BasePowerD:getCapacityHW() end
function BasePowerD:isChargingHW() end
function BasePowerD:suspendHW() end
@@ -39,6 +40,14 @@ function BasePowerD:setIntensity(intensity)
self:setIntensityHW()
end
function BasePowerD:setIntensityWithoutHW(intensity)
intensity = intensity < self.fl_min and self.fl_min or intensity
intensity = intensity > self.fl_max and self.fl_max or intensity
self.flIntensity = intensity
self:setIntensitySW()
end
function BasePowerD:getCapacity()
if capacity_pulled_count == capacity_cached_count then
capacity_pulled_count = 0