Synchronise frontlight level with nickel config

* Drops support for mocking the frontlight setting internally which may
  cause incorrect in-memory values.

* Adds new supported value for `KOBO_LIGHT_ON_START` (-2), which sets
  'Kobo eReader.conf' as the source to update `settings.reader.lua`'s
  brightness setting on startup, thus using the value from it
  indirectly.

* Adds the `KOBO_SYNC_BRIGHTNESS_WITH_NICKEL` configuration variable
  which updates 'Kobo eReader.conf' every time the brightness setting is
  changed within koreader.

* Fixes missing call to save brightness when modifying via two-finger
  swipe.

Closes #1523.
This commit is contained in:
Dimitrios Semitsoglou-Tsiapos committed 2016-01-11 23:30:22 +02:00
1 parent 04ad3bcfe5
commit eb47c5a39f
7 files changed
+99 -24

No files matched your search

+1 -2
View File
@@ -118,8 +118,7 @@ if Device:isKobo() then
if powerd and powerd.restore_settings then
local intensity = G_reader_settings:readSetting("frontlight_intensity")
intensity = intensity or powerd.flIntensity
powerd:setIntensityWithoutHW(intensity)
-- powerd:setIntensity(intensity)
powerd:setIntensity(intensity)
end
if Device:getCodeName() == "trilogy" then
require("utils/kobo_touch_probe")