sysfs_light handles every case sanely already, no need to be cute ;).
This prevents always setting the warmth when setting the FL on NL
devices with a mixer, because, besides being useless, it's also slow
(lua does mmap'ed io, so every handle requires an fstat + mmap).
It was subtly affecting the fluidity of the toggle ramp, and much less
subtly wreaking havoc on #5373 ;).
KA1 owners might want to investigate keeping the fds around one way or
another, like we do for the fl ioctl, to alleviate the overhead of doing
that for not one but three or four fds...
I won't be doing that, since I lack the hardware to test it, and FL+NL
stuff is pain.
* Do the same on Cervantes
* Bump base to pickup related ioctl tweaks
When reasonably possible, the program should only crash in debug mode.
Adds a couple of extra unit tests to prevent regressions and adds docs.
Fixes <https://github.com/koreader/koreader/issues/5356>.
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
* 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
Close: #4997
This PR add support arrow key and mouse scroll wheel for next/previous page.
- Document in page mode:
PageDown, Arrow down, Arrow right - go to next page
PageUp, Arrow up, arrow left - go to prev page
Mouse scroll wheel down - go to next page
Mouse scroll wheel up - go to prev page
- Document in scroll mode:
PageDown, Arrow right - go to next page
PageUp, Arrow, arrow left - go to prev page
Arrow down - scroll document down
Arrow up - scroll document up
Mouse scroll wheel down - scroll document down
Mouse scroll wheel up - scroll document up
* Fix Kindle model detection in some corner-cases
We were (currently) unaffected because we don't support the K1.
Still, this should be slightly more robust.
* 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