* Re-implement the PB fb fixup insanity
It's apparently still necessary on a number of devices.
Fix#7072
* Bump base
(Fix FBInk on the same devices, for another reason).
On pocketbook, update modes are not as clear cut due to overall
chipset and kernel version mess. Inkview solves this by always
using the slowest (and safe) GC16 waveform. We now do that too
by default.
Slow updates suck though, so there's now a menu entry to configure
it for speed (with mild artifacts at best, kernel panic at worst).
This is a generic interface (any eink Screen can announce support).
The driver may interpret the slow/fast range however they want.
This allows for better energy efficiency (no more 50Hz tick poll),
as well as lower input lag / higher precision - touch events are
native linux ones.
In addition, auto off/suspend plugin is used in this mode, as we need
to trigger (timed) sleep / poweroff on our own, since the OS ones
will no longer work whenever koreader has focus.
This is for rooted devices only, and possibly somewhat FW
specific, so enabled only on PB740-2 where it's reasonably tested.
The differences between Allwinner/MXC matter surprisingly little in practice, it's not even worth
it to bother the base mxc driver with it. Instead, frontend can make some informed choice by
probing for the hardware and tweaking requested device caps accordingly.
On Allwinner B288, we disable both hwrot (done in software in kernel and terribly, ie not worth it)
and hwinverse (no support whatsoever). On NXT we'll keep both on, as the kernel driver seems
to be using the hardware properly .
CBB now handles nightmode correctly (by deferring to Lua), so we no longer
need to do monkey dances about disabling it when hw invert is missing.
canUseCBB cap is resolved by generic device re-configuring blitbuffer
on the go, so as to avoid repeating the same thing in every device driver.
The dev setting can now flip cbb on the go, so one can gloat at the near
meaningless perf difference - 2Mp draw is 15ms Lua / 10ms C on 1GHz Cortex A7.
* Uses bunch of new plumbing in base to configure screen rotations in hardware (koreader normally does this via blit buffer rotations, except for android).
* Some PB specific kludges that used to pollute core/framebuffer_linux are brought into PBs frontend driver.
Out of the box, it behaves exactly as native pocketbook apps should, ie aggressive
standby, but no freezing at operations in progress.
Config UI will be done via koplugin that will also do adaptive standby. This is
because the API is now device independent (albeit PB is the only implemented user).
* Allow locking the gyro to the current screen mode (i.e., orientation).
* Tweak the "sticky rota" option to work both ways
* More rotation constant usage instead of magic numbers
* generic Device:info() function which returns the model
* add Device:canSuspend() and make it true in all devices that have suspend routines and the emulator
* also enable fake poweroff/reboot on the emulator
* add Device.home_dir
* add Device:hasExitOptions() and update menus & comments
This commit standardizes the various todos around the code a bit in a manner recognized by LDoc.
Besides drawing more attention by being displayed in the developer docs, they're also extractable with LDoc on the command line:
```sh
ldoc --tags todo,fixme *.lua
```
However, whether that particular usage offers any advantage over other search tools is questionable at best.
* and some random beautification
Either at all, or because it would impose reduced functionality.
Meaning:
* On 4bpp fb, because those are completely unsupported by the C BB
* On 24bpp fb, because it has limited support for that target format (no alpha blending).
* On 8bpp Linux eInk fb with an inverted palette (that's basically only the K4 ;)).
* On Linux eInk devices w/ no HW inversion support, as that would render NightMode inoperable.
That last point means that it's currently *always* blacklisted on PocketBook, because I don't have a PB device, so I don't know how safe HW inversion would be, meaning none of them are marked as being HW invert capable.
(I was a tiny bit hasty with https://github.com/koreader/koreader-base/pull/912 ;).)
Companion PR to https://github.com/koreader/koreader-base/pull/884
* Basically flags devices known to be stable when using PxP inversion.
* Plus, random fix for #4870 ;).
* A few FrontLight tweaks & cleanups on Kobo:
* Moved the Kobo-specific startup status insanity to Kobo-specific init
* Made turnOff/turnOn frontlight do a smooth ramp down/up
* On Kobo, use turnOff/turnOn for suspend/resume, to get that smooth toggle
* On Kobo, for NaturalLight w/ a mixer, only set warmth for setWarmth, and only set Brightness for setBrightness, otherwise, it tried to set both with not in-sync values, which made the FL widget jittery.
Partially resolves#4747. Will enable switching Wi-Fi on/off in the menu and getting the network status. However, a new Wi-Fi session lasts ~100 seconds and then terminates automatically, apparently, to save the energy. I believe it can be prolonged by some networking activity. Also it is not shut down if the auto suspension is disabled.