* 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
* landscape FM / Refactor rotation
refactor and simplify the orientation handling code. the user generally cares about the rotation (what direction the device is facing) and not about if koreader is displaying in portrait or landscape mode
* bump base
update luasocket, libjpeg-turbo, curl
add logging to evernote-sdk-lua
update framebuffer for proper rotation
joins calibre metadata search and calibre wireless connections into a single plugin
search metadata changes:
- search directly into calibre metadata files.
- search can be performed on more than one library (configurable from a menu)
- device scans now find all calibre libraries under a given root
- search options can be configured from a menu. (case sensitive, find by title, author and path)
- removed legacy global variables.
- *option* to search from the reader
- *option* to generate a cache of books for faster searches.
calibre wireless connection changes:
- keep track of books in a library (includes prunning books from calibre metadata if the file was deleted locally)
- remove files on device from calibre
- support password protected connections
- FM integration: if we're in the inbox dir it will be updated each time a book is added or deleted.
- disconnect when requested by calibre, available on newer calibre versions (+4.17)
- remove unused opcodes.
- better report of client name, version and device id
- free disk space checks for all calibre versions
- bump supported extensions to match what KOReader can handle. Users can override this with their own list of extensions (or from calibre, by configuring the wireless device).
* 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
Requires koreader/android-luajit-launcher#233
Requires koreader/koreader-base#1117
It is a workaround for #6263 but can be useful on some devices with erratic back key behaviour too (yep, Onyx)
* Ensure feature-parity in ScreenSaver handling on Kindle
We were missing the fancy extra white flash and landscape handling that
most every other eInk device gets ;).
Fix#5724
* Minor SO tweaks
The "swipe to unlock" ad screen was possibly managing to seep through on
slow devices.
* Less convoluted and more consistent logic
Thanks, @yparitcher ;).
Prevent the Tap>Hold setTimeout'ed function to trigger
on another later Tap.
Fix a Tap quickly following a Swipe (which triggers this
Tap>Hold timer) from becoming a Hold.
* Kindle FL shenanigans
Either fix#5986, or break a whole crapload of weird corner-cases.
Possibly the insane AutoFrontLight checks.
* Make fl step 0 usable on devices where 0 doesn't turn the light off.
By fudging an extra step on our own side.
* Also, add some debug logging around wmctrl to try to figure out what's
happening there...
* remarkable: remove unnecessary screen invalidate on resume
This is handled in uimanager if needsScreenRefreshAfterResume is enabled
(which is the default).
* remarkable: pass a path argument to reader.lua
Otherwise if lastfile is not set in the settings (e.g. install and then
exit without opening a file) koreader will just refuse to start.
* remarkable: pass koreader.sh args (if any) through to reader.lua
Touchscreen is mirrored in X & Y and has a different resolution from the eink panel.
Uses systemd for time/date/suspend/poweroff/reboot
Two systemd units for platform integration. button-listen is a very
simple launcher.
to-do: add support for wifi by implementing a wpa supplicant dbus client.
Authored-by: Thomas Spurden <tcrs@users.noreply.github.com>
* Allow running Shell/Python scripts from the FM
* Show an InfoMessage before/after running the script
Since we're blocking the UI ;).
* Allow running scripts from the favorites menu, too.
* Don't store stale screen/rotation modes in book's settings!
Gyro events *may* entirely bypass the local copy...
In any case, using a local copy was essentially asking for trouble...
Actually fix#5772
(because the issue was indeed that a Gyro swap from Portrait to Inverted
Portrait wasn't stored properly).
* Allow showing ScreenSavers in Inverted Portrait.
That works just fine, and won't lead to the confusing situation where a
lefty might pick up the device as a righty because the ScreenSaver
happens to be shown that way, only to have it rotate back to its lefty
orientation on wakeup...
bidi.lua:
- Revert "Alias everything to Bidi.nowrap() when in LTR UI,
as using LTR isolates seems uneeded when already LTR" (part
of a628714f) which was a wrong assumption: we need proper
wrappers for all things paths. Enhance some of these wrappers.
- Fix GetText RTL wrapping which was losing empty lines and
trailing \n.
- Wrap all paths, directories, filenames in the code with
these wrappers.
- Wrap all book metadata (title, authors...) with BD.auto(),
as it helps fixing some edge cases (like open/close quotation
marks which are not considered as bracket types by FriBiDi).
(Needed some minor logic changes in CoverBrowser.)
- Tweak hyphenation menu text
- Update forgotten SortWidget for UI mirroring
- KoptConfig: update "justification" index for RTL re-ordering,
following the recent addition of the page_gap_height option.
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