mirror of https://github.com/koreader/koreader
[feat] kobo/powerd: Support for automatic warmth
This is the first step to support "automatic warmth", meaning that warmth will be set according to the current time. The user can set a "bedtime" at which warmth should be maximal. Warmth will increase towards approaching bedtime and decrease afterwards. Add new members 'auto_warmth' and 'max_warmth_hour' which tell if this feature is enabled and the "bedtime", resp. Add a method 'calculateAutoWarmth' which will set the current warmth according to the current time. The progression is linear but not symmetrical: we start 5h before "bedtime", but turn back warmth to '0' 2h after it, to make sure that warmth is '0' in the morning. For automatically setting warmth in the background we use the backgroundrunner plugin, because not only is it more comfortable to use, but we also cannot require 'uimanager' during device initialization.pull/3823/head
parent
2c1178896c
commit
596e20e588
Loading…
Reference in New Issue