Commit Graph

654 Commits (863255c9f426bdd6845f3f3eced4f270f1baecee)

Author SHA1 Message Date
ElimGarak1 863255c9f4
Add PocketBook InkPad Lite (PB970) (#8335)
Closes #8331.
3 years ago
zwim 0c7d174cd7
[frontlight, kobo, cervantes] Remove auto_warmth (#8154)
The feature is now provided by the "Auto warmth
and night mode" plugin (#8129).
3 years ago
NiLuJe 4a2f519600 Kobo: Use CLOEXEC in the Device module
We have a guarantee that it's supported on this platform.
3 years ago
NiLuJe 53b8ed48bf Kobo: Don't leak fds in isWifiOn
io.lines only closes the fd when the loop is exited sanely, not by a
control flow keyword (i.e., no break or return allowed).

Regression since #8169
3 years ago
NiLuJe 48da545e32 Kobo/Elipsa: More fine-grained control over the amount of online CPU
cores

* Only keep a single core online most of the time.
* Device: Add an enableCPUCores method to allow controlling the amount of
  online CPU cores.
* Move the initial core onlining setup to Kobo:init, instead of the startup script.
* Enable two CPU cores while hinting new (e.g., cache miss) pages in PDF land.
* Enable two CPU cores while processing book metadata.
* Drive-by fix to isolate the DocCache pressure check to KoptInterface
  and actually apply it when it matters most (e.g., k2pdfopt stuff).
3 years ago
zwim debf5dc550
Footer: add Warmth as footer item (#8060) 3 years ago
NiLuJe af8988ef5f
Minor script tweaks (#8169)
* Neater fbdepth usage on sunxi
* Make sure we only ever match *loaded* modules when we check lsmod
3 years ago
NiLuJe edfb29b406 Fix duplicate suspend scheduling in Device:onPowerEvent
We should always unschedule suspend before scheduling it again (i.e.,
use rescheduleSuspend ;)).

Fix #8097 (many thanks to @Mel-kior for the detailed repro!)
3 years ago
Galunid 611a5311b6
Fix warmth settings on some android devices (#8104) 3 years ago
Martín Fdez 6fb52528cd disable light settings on ChromeOS, android TV and e-ink devices without lights 3 years ago
Martín Fdez 8bf19a7327 flush settings before being killed 3 years ago
NiLuJe 1e9346aec6 Fix Wi-Fi toggle on the Elipsa
It turns out that the kernel needs a little push now that the dedicated
wifi power control module is gone ;).

Issue was only exposed if you booted KOReader while the Wi-Fi was down.
3 years ago
NiLuJe bc133e70d3
Input: Minor simplifications around pen/finger discrimination & the snow protocol (#8021)
* Decode EV_KEY:KEY_BATTERY
* Input: Only drop hovering *pen* events.
  There are currently too many broken 0-pressure *finger* events being
  reported on the Elipsa, making a dumb rejection highly annoying.
* Bump base
https://github.com/koreader/koreader-base/pull/1393
* Rely on actual events to detect loss of contact for the "snow"
protocol.
  Allows simplifying the whole thing.
* Use `ipairs` over `pairs` for pure arrays.
3 years ago
Martín Fernández 990b6768f4
disable battery level on desktop Linux (#8026)
This also include ChromeOS laptops (chromebooks) since the power sysfs attributes don't exist in linux containers.
3 years ago
NiLuJe 817e9e26e8
Minor input tweak after #7986 (#8004) 3 years ago
NiLuJe ae35e898fb
Kobo Elipsa support (#7986)
Includes a few minor cleanups along the way ;).
3 years ago
poire-z 16ab5aa194 SDL keyboard input: should go to top level widget only
Avoid the typed input to be added to all
InputText present on the stack: only the
top one should handle it.
3 years ago
hius07 884c664f63
Device status alarm: battery and memory (#7857)
Move former low battery alarm into a device status
alarm menu, and add high memory usage checks.
3 years ago
Martín Fernández ee92ca68e8
workaround for Onyx Poke2 nonsense (#7872)
Requires koreader/android-luajit-launcher#320

Also the luajit-launcher bump adds support for Likebook P78 and sanitizes clipboard text.
3 years ago
Martín Fernández 9f097da4f0
Bump android backend (#7813)
* Bumps the target Sdk to Android 11 (API30)
* Add a crash handler
3 years ago
Frans de Jonge 039947886f
Revert "Hyphenation: add custom hyphenation rules (#7746)" (#7785)
This reverts commit f25da5d0d5.
3 years ago
zwim f25da5d0d5
Hyphenation: add custom hyphenation rules (#7746)
The hyphenation of a word can be changed from its default
by long pressing for 3 seconds and selecting 'Hyphenate'.
These overrides are stored in a per-language file, i.e:
koreader/settings/user-German.hyph.
3 years ago
NiLuJe 1ded7c3907 PocketBook: Support the PB741
Re: https://github.com/koreader/koreader/issues/7747#issuecomment-846850605
3 years ago
NiLuJe 92afc63951 PocketBook: Deal with FW shenanigans on the PB627
Might break it on older FW, who knows.

Fix #7747
3 years ago
Martín Fernández b8d658b922
android: minor fixes (#7753)
* Save settings before installing a new APK & after resume. 
* Move Resume/Suspend events to Resume/Pause callbacks
3 years ago
Martín Fernández dc0d759148
don't log thirdparty app list if they're platform defaults (#7760) 3 years ago
zwim 6e2be98edc
Notifications: options to show none/some/more (#7718)
Notification: adds some functions so it can be used as
a notification manager.
Have various bits of code emitting events that may generate
notifications advertize themselves as the source for following
notifications.
Add a menu to allow selecting some subsets of sources
to show or hide.
3 years ago
poire-z 4b6b12b799 Remove unused "pan_delayed_interval" support 3 years ago
poire-z d0165f8bd1 Fix scrolling, add inertial scroll on non-eInk devices
Add a new reader module: ReaderScrolling, that exposes
some Scrolling options to the menu (which are to be used
by and implemented in ReaderPaging and ReaderRolling
themselves) and implement some inertial scrolling logic
used by both of them.
Default to "Classic scrolling" which is the expected
behaviour on phones and tablets.
The old CreDocument buggy behaviour is available as
"Turbo scrolling" for both Paging and Rolling documents.
Added a "On release scrolling" option that might be
useful on eInk to avoid dynamic pan/scrolling.

Try to avoid bad interactions between pan and swipe,
cancelling unwanted panning if we ended up doing a
swipe or multiswipe.
3 years ago
poire-z 0a3978f60b Reader: remove full refresh on vertical swipes
Small diagonal swipes is what can be used for
full refrehes. Tweak a bit how it is done.
3 years ago
Martín Fdez 23b7bfe0ce move android specific bits outside OTAManager 3 years ago
NiLuJe 4b265bcd7a Allow ingoring the B288 feature bans, for debugging purposes. 3 years ago
NiLuJe f413cd15e8 PB: Unconditionally disable HW rotation on B288 SoCs
Apparently, it's even more broken than usual on some devices/FW combos.

Fix #7663
3 years ago
NiLuJe 628aef2099 OTA: Unbreak exit code on Install
Regression since #7657
3 years ago
NiLuJe bb65a69193
Geom: nil guard a few rect methods (#7664)
We've managed to trip a few of those on dimen fields post-init but
pre-paintTo in a few weird coner-cases, a point at which dimen is often
nil.

ConfigDialog: Deal with that very thing in update()

Fix #7656
3 years ago
Martín Fernández 939fcf7f0e
android: avoid downloading the APK again if there's one download in progress + fix signature error (#7657) 3 years ago
NiLuJe 48c474e245 Device: Add some more logging in onPowerEvent
Could possibly help shed some light on potential SleepCover races...
re #7633
3 years ago
Frans de Jonge 310151fac9
Fix typo (#7655)
Follow-up to #7632.
3 years ago
Martín Fernández d303fdf694
android: Prompt for install updates when they're downloaded (#7632) 3 years ago
zwim 3d9ed32458
Android: Send Suspend/Resume Events on STOP/START (#7630)
* ReaderHeader: Refresh it *now* on Resume, instead of just re-scheduling an update if auto-refresh is enabled..
3 years ago
NiLuJe e0a67bb656
OTA: Handle tar checkpointing visual feedback w/ an FBInk daemon (#7588)
Instead of forking it on every checkpoint.

Won't change much in the grand scheme of things, but FIFOs are fun.
3 years ago
zwim e4c9409f97
[plugin] Add a caching mechanism for CoverImage (#7510) 3 years ago
Martín Fernández 53234fcdc1
add hasSystemFonts device property (#7535)
Add system + user paths to the ReMarkable (has normal linux paths)
3 years ago
NiLuJe 14cd6febbb Kindle Legacy: Cleanup key mappings
The K3 has a mapping similar to the K4, not to the DX & K2.

Fix #7561
3 years ago
gbyl 32802ee7f2
reMarkable: Remove refresh before poweroff (#7563)
This is now handled in a platform-agnostic manner (#7558).

Co-authored-by: gbyl <gbyl@users.noreply.github.com>
3 years ago
NiLuJe 1ac0ad2f1a Android: More input handling tweaks
* Android: Fix #7552 by simply ensuring we drain the input/cmd queue first, simply by scheduling the task to the next tick, instead of locally re-implementing part of the event loop ;). (Requires https://github.com/koreader/koreader-base/pull/1356 for extra safety).
* Android: Clear input state when the window loses focus. (Related to the above fix).

* Bump base:

https://github.com/koreader/koreader-base/pull/1356
https://github.com/koreader/koreader-base/pull/1357

* Bump android-luajit-launcher:

https://github.com/koreader/android-luajit-launcher/pull/293
https://github.com/koreader/android-luajit-launcher/pull/298
https://github.com/koreader/android-luajit-launcher/pull/299
3 years ago
NiLuJe 3274183466 Minor Input & TimeVal cleanups
* Input: Don't create a new TimeVal object for input frame timestamps, just promote our existing table by assigning it the `TimeVal` metatable.
* TimeVal: Export (const) `zero` & `huge` TimeVal objects, because they're common enough in our codebase. (NOTE: not actually const, that's a Lua 5.4 feature ;p).
* GestureDetector: Explain the behavior of the `last_tevs` & `first_tevs` tables, and why one needs a new object and not the other.
* Speaking of, simplify the copy method for `first_tevs`, because it doesn't need to create a new TimeVal object, we can just reference the original, it's unique and re-assigned for each frame.
3 years ago
NiLuJe f2e90f505b
Input: Minor cleanups (#7542)
* TimeVal: Log the results of the COARSE probes in debug logs
* GestureDetector: Print details of failed clock probes in debug logs
* GestureDetector: Skip the BOOTTIME probe when CLOCK_BOOTTIME is unsupported.
* Input: Decode ABS_DISTANCE events in debug logs
* Get rid of duplicated <linux/input.h> constants, use the FFI module everywhere (re #7536)
* Kobo: Get rid of the `touch_alyssum_protocol` quirk. Replace it by setting `main_finger_slot` to `1`, like on the H2O.
3 years ago
Glen Sawyer b6b332e311
Fix for PR #7415 breaking reMarkable touch input (#7536)
The Wacom pen reports sane CLOCK_REALTIME timestamps, but the Touchscreen reports timestamps frozen at the boot time ts (in REALTIME) :s.

So, make everyone use synthetic CLOCK_MONOTONIC timestamps in order to make gesture detection behave.
3 years ago
zwim 10922561dd
Add update of the top and bottom status bars, on +/-Charging (#7379) 3 years ago