* Try to make sure restoreWifiAsync eventually sends a NetworkConnected
event...
re: #5109
* Take a page from @shermp's book, and make sure wpa_supplicant managed to
connect to the AP before acquiring an IP.
Tear down WiFi modules in case of failure.
c.f., https://github.com/shermp/Kobo-UNCaGED/pull/21
* Don't let restore-wifi-async.sh enable WiFi behind our back when we're
killing it to start Nickel...
* Don't even call ping if there's no default gw
* Make toggling Gyro events more robust
Actually ask to turn it on/off depending on the setting, instead of a
blind toggle
A quick succession of suspend/resume events could otherwise leave it
in an unexpected state (i.e., off when it should have been on).
For some mysterious reason, I have a duplicate default gateway on my
Forma, one with no metrics, and a proper one.
This ensures we pick the proper one.
I'm fairly sure this is temporary insanity on the part of my device,
but, still, it can't hurt.
route -n:
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
0.0.0.0 192.168.0.1 0.0.0.0 UG 0 0 0 eth0
0.0.0.0 192.168.0.1 0.0.0.0 UG 208 0 0 eth0
192.168.0.0 0.0.0.0 255.255.255.0 U 208 0 0 eth0
ip r:
default via 192.168.0.1 dev eth0
default via 192.168.0.1 dev eth0 metric 208
192.168.0.0/24 dev eth0 src 192.168.0.49 metric 208
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 ;).)
* Make hasNaturalLight* caps safe to call without a device check. (fix#4919)
Make it clear that it's expecting the NTX implementation, though.
* Don't turn the FL on on resume if it was off on suspend
* Make sure turnOn/turnOff actually updates hw_intensity in the process where it matters, instead of just in a short lived fork ;). (fix#4923)
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.
* Fix the "Enable debug logging" checkbox so that it properly disables "Enable verbose debug logging" when it gets disabled
* Avoid asking ImageWidget for alpha-blending when it's not useful
* Make ImageWidget's alpha-blending code-path double-check that alpha-blending actually is needed, and avoid it if possible
* In the same vein, only do alpha-blending in textboxwidget when absolutely necessary
* Prefer color constants over the gray() method, ensuring that they're part of the eInk palette
Depends on https://github.com/koreader/koreader-base/pull/853Fix#4774
When we rotate to show a screensaver, restore original rotation *before* closing the ScreenSaver window.
And ensure closing the ScreenSaver *always* triggers a full update, no
matter the settings.
Fix#4621
* Flash a white screen before showing a screensaver image, to prevent
ghosting.
* Really limit the white flash to full-screen images
* Limit that behavior to eInk screens
(Not that clear() is implemented anywhere else, but, still).
* On Kobo, kill WiFi on startup if we detect an inconsistent state...
Untested, not terribly pretty.
The other solution is to slow down the Wi-Fi meny by doing the same
check for the "Wi-Fi connection" checkbox as in the later wifi_status
one...
* Don't enable auto_restore_wifi by default
It's liable to silently murder batteries for no good reason, given that
we prompt to enable WiFi by default when needed, and we otherwise have
no actual need to keep WiFi on in the background.
re #2215 (in particular, this directly contradicts @houqp in
https://github.com/koreader/koreader/pull/2215#discussion_r74696133 ;)).
* Enable HW dithering on supported devices (Clara HD, Forma; Oasis 2, PW4)
* FileManager and co. (where appropriate, i.e., when covers are shown)
* Book Status
* Reader, where appropriate:
* CRe: on pages whith image content (for over 7.5% of the screen area, should hopefully leave stuff like bullet points or small scene breaks alone).
* Other engines: on user-request (in the gear tab of the bottom menu), via the new "Dithering" knob (will only appear on supported devices).
* ScreenSaver
* ImageViewer
* Minimize repaints when flash_ui is enabled (by, almost everywhere, only repainting the flashing element, and not the toplevel window which hosts it).
(The first pass of this involved fixing a few Button instances whose show_parent was wrong, in particular, chevrons in the FM & TopMenu).
* Hunted down a few redundant repaints (unneeded setDirty("all") calls),
either by switching the widget to nil when only a refresh was needed, and not a repaint,
or by passing the appropritate widget to setDirty.
(Note to self: Enable *verbose* debugging to catch broken setDirty calls via its post guard).
There were also a few instances of 'em right behind a widget close.
* Don't repaint the underlying widget when initially showing TopMenu & ConfigDialog.
We unfortunately do need to do it when switching tabs, because of their variable heights.
* On Kobo, disabled the extra and completely useless full refresh before suspend/reboot/poweroff, as well as on resume. No more double refreshes!
* Fix another debug guard in Kobo sysfs_light
* Switch ImageWidget & ImageViewer mostly to "ui" updates, which will be better suited to image content pretty much everywhere, REAGL or not.
PS: (Almost 💯 commits! :D)
Supported devices:
- Boyue T61 and *some* clones
- Boyue T62 and *some* clones
- Onyx C67
- Energy Sistem (which are in fact Boyue T62 clones). Was tested on a energy pro 4.
Others may work with the same controller too, but are disabled by default.
Requires https://github.com/koreader/koreader-base/pull/798
Requires https://github.com/koreader/android-luajit-launcher/pull/96Fixes#4373Fixes#1613 (supported devices will show the "full refresh rate" option under eink settings. Others won't)
Related #4228 (need to add support for this specific device to work)
* Fix the Touch input probe on Trilogy devices that depend on the touch_probe_ev_epoch_time quirk (fix#630)
* Expose a "Pageturn button inversion" feature in the Navigation menu (for all devices with keys) (fix#4446)
* Allow ignoring the accelerometer on the Forma (Screen > Ignore accelerometer rotation events; also available from the Gesture Manager) (fix#4451)
* Fix SleepCover handling on the Forma (fix#4457)
* Make isWifiOn a tiny bit more accurate (check the actual WiFi module instead of sdio_wifi_pwr)
* Move all flash related Screen options to the eInk submenu
* Pocketbook Color Lux detection
* fix rotation for Pocketbook Color Lux
* deal with 24bit RGB framebuffer that are reported as 8bit
* use default DPI for Pocketbook Color Lux
* bump base
* Switch all initial highlights to "fast" update
i.e., everything that does an invert
Plus a few other things that refresh small UI elements onTap
Re #3130
* Tweak refreshtype for a number of widgets:
* Fix iconbutton dimen
* Make touchmenu flash on close & initial menu popup. Full-screen on close.
* Use flashing updates when opening/closing dictionary popup. Full-screen on close.
* Switch FileManager to partial.
It's mostly text, and we want flash promotion there.
* Make configdialog & menu flash on exit
* Make FLWidget flash on close
* virtualkeyboard: flash on layout change & popup.
* Potentially not that great workaround to ensure we actually see the
highlights in the FM's chevrons
* Flash when closing BookStatus Widget
* Optimize away a quirk of the dual "fast" update in touchmenu
* Promote updates to flashing slightly more agressively.
* Document what each refreshtype actually does.
With a few guidelines on their optimal usecases.
* Switch remaining scheduleIn(0.0) to nextTick()
* Tighter scheduling timers
Shaving a hundred ms off UI callbacks...
* Cache FFI C Library namespace
* Ask MuPDF to convert pixmaps to BGR on Kobo
Fix#3949
* Mention koxtoolchain in the README
re #3972
* Kindle: Handle *all* fonts via EXT_FONT_DIR instead of bind mounts insanity
* Make black flashes in UI elements user-configurable
(All or nothing).
* Jot down some random KOA2 sysfs path
* Trim unneeded stuff from startup script
I was somehow convinced I'd already done that...
While we're there, explain why we need to siphon those specific vars
* Fix a stray eth0
-> $INTERFACE
* Be very very sure we have INTERFACE set in our env
re #3936
* Make getFirmwareVersion less fragile on Kobo
Not that we actually use it right now, but, still. :D
* Use the same syntax as the PRODUCT check
* Actually implement getProductId
Instead of a stray c/p ^^
* Properly identify the Rev2/Mark7 variants of existing devices
Namely, the H2O² and Aura SE
Not that the H2O²r2 support is still broken, this just allows us to
implement it cleanyl without breaking handling of the original H2O²
re #3925
* Tweak sleeps a bit around Kobo WiFi modules...
See if that jog things up (re #3936)
* Try harder not to suspend with WiFi on on Kobos
Because otherwise, things go boom. (re #3936)
* Prevent open screensaver more than one in the same time
* Add option to enable/disable background in message screensaver
* fallback to random images if this book cover is excluded feature + fix Disabled (leave screen/page as it is)
* Autostretch disable by default, more fallback options, leave screen as it is
I believe this should be `if isKobo()`, or better yet that the entire
block should be moved to `KoboPowerD:init()` because afaik that is the
only platform where the system doesn't provide trustworthy frontlight
information. But to be absolutely sure that I don't break anything (and I
don't want to spend any time on this atm) I'm temporarily excluding only
Android where this behavior is known to be problematic.
See discussion in https://github.com/koreader/koreader/issues/3118#issuecomment-334995879
References #3118 (using keyword "references" because phrases like "possibly fixes"
result in GH autoclose).
* Allow for colored rendering
Available with all engines (CRE, PDF, Images).
Needs to manually add setting: "color_rendering" = true
* Disable color for djvudocument
* Use Screen:isColorEnabled()
* Bump base