Commit Graph

86 Commits (7210fb478d8d0c6aa5bb8e0ae3e0fc67dd730874)

Author SHA1 Message Date
NiLuJe 7210fb478d
Faster blitting @ BB8/BBRGB32 when no processing is needed (#4847)
* Pickup the eponymous blitting performance tweaks from koreader/koreader-base#878
* Cleanup BitOpts usage (require & cache)
* Unify oddness checks (MOD -> AND)
* Enforce the native Portrait orientation on Kobo (except @ 16bpp, i.e., KSM w/ 8bpp swap disabled), to allow for faster blitting when unrotted.
* Switch CRe BB to 32BPP on color screens
* Minor cleanups
5 years ago
Frans de Jonge b1ed2838c8
[UX] Add Device:openLink() stub for Linux SDL (#4822)
References #4821.
5 years ago
Frans de Jonge 728bb187fa
[UX] Gesture manager: add two-finger swipe left and right (#4815)
Also add Device:hasMultitouch() to control whether the configuration menu is shown.

Cf. #4727.
5 years ago
NiLuJe 2011cf1ad1 Various blitting related cleanups (#4789)
* 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/853

Fix #4774
5 years ago
Qingping Hou fc69257660 fix: auto dpi menu checkbox display (#4771) 5 years ago
Qingping Hou 4b7d5c82b7 fix: update gesturedector constant for custom screen dpi 5 years ago
Frans de Jonge c5b2bad6d6
[fix] Allow overriding low pan rate on E Ink device (#4729)
Cf. #4721.
5 years ago
Martín Fernández f8c71f6a45 disable low_pan_rate on non e-ink devices by default 5 years ago
Qingping Hou 1605409c60 rename runtimectl to document/canvascontext 5 years ago
Qingping Hou adb5d5a52c use screen for UI color control 5 years ago
Qingping Hou 02eca23649 decouple device from document modules 5 years ago
NiLuJe 5495c5d108 [fix] Fix partial refresh when coming out of ScreenSaver in landscape (#4622)
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
5 years ago
Martín Fernández 04e17424d0 display network settings based on device capabilities + fix android basic network info 5 years ago
Martín Fernández 301aa580cc cervantes: add usb storage on devices w/updated 3rd party tools 5 years ago
NiLuJe 134998a323 [fix] Eliminate ghosting on eInk when showing an image ScreenSaver (#4591)
* 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).
5 years ago
NiLuJe 011370882f [chore] Some Wi-Fi tweaks (#4564)
* 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 ;)).
5 years ago
NiLuJe 812e595608
Enable HW dithering in a few key places (#4541)
* 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)
5 years ago
Martín Fernández 19d13b1876 [feat, Android] Add basic support for android eink refreshes on some rockchip devices (#4517)
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/96

Fixes #4373 
Fixes #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)
5 years ago
poire-z a245630422 Implement generic internal clipboard for all devices
Will allow copying selected text from a book to the TextEditor.
Will be overriden on devices that implement interactions with
the system clipboard.
5 years ago
NiLuJe d113cb9475
A few Kobo input tweaks (#4450)
* 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
5 years ago
Martín Fernández 6de5927dc2 [build] Add support for Debian packages (#4434)
* Add support for Debian packages

* SDL: add device probe
5 years ago
Martín Fernández 1e69fae7bc [feat] Add support for BQ/Fnac devices (#4294)
Adds support for devices found in https://blog.bq.com/es/bq-ereaders-developers-program/. Tested on BQ Cervantes 4 (last BQ device from 2017).

It adds a new touch input event handler (discussed in #4275) which should work on other single touch devices (ie: Kobo Touch, Mini, Glo, Aura HD) but wasn't tested.

Includes base bump with: [feat] Add BQ/Fnac device support (https://github.com/koreader/koreader-base/pull/745)
6 years ago
Martín Fernández 717184f1d6 move e-ink related settings to a submenu (#4246) 6 years ago
Martín Fernández b8d95984d1 [UX] Show OTA updates only on supported devices (#4256) 6 years ago
Thomas Rebele 1e275fdc4f Add support for Pocketbook Color Lux (#4212)
* 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
6 years ago
Matias N 94d8f2d397 Sony PRSTUX support (#4198)
* Sony PRSTUX support
6 years ago
NiLuJe c1965ea8a9
Don't rotate on suspend for Kobo/PB when we're showing something news (#4111)
that's not full-screen (i.e., "message" ScreenSaver mode).

Fix #4098
6 years ago
NiLuJe 5871132c25
UI Behavior tweaks (#3983)
* 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
6 years ago
NiLuJe e3b7524d9c Another round of Kobo Fixes (#3939)
* 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)
6 years ago
mezzarobba a3e16b3920 [fix] make wifi control work with my Kobo Touch N905 (#3920) 6 years ago
Robert efa0d06df9 Add new options to screensaver (#3535)
* 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
6 years ago
Frans de Jonge 06dfe4fb78
[feat] Add Device:hasClipboard() (#3465)
References https://github.com/koreader/koreader/issues/3441
7 years ago
poire-z 53f083f516 Allow for toggling color rendering
New menu item in Screen submenu.
hasColorScreen enabled for SDL device.
7 years ago
poire-z 180f5755f4 Allow for colored rendering (#3276)
* 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
7 years ago
Huang Xin a4e1a3ba5e reflect changes in koreader/android-luajit-launcher#62 (#3254) 7 years ago
poire-z d4fd0b9428 frontlight on kobo: a few fixes (#3163)
* frontlight on kobo: a few fixes

Rewritten to not update NickelConf on every change, and never
if KOBO_SYNC_BRIGHTNESS_WITH_NICKEL = false.
Reintroduce global settings frontlight_intensity and
is_frontlight_on to keep level and state across koreader
sessions.
Fix a few of the remaining issues on kobo light.
Ensure settings are saved when rebooting/powering off from
File browser.

* Ensure untoggle works when starting with light off
7 years ago
Robert 7f58a13626 Ability to setup clock (#3085)
* Ability to setup clock
7 years ago
Hzj_jie 970f2e7306 Several improvements of AutoFrontlight plugin and enable it by default (#2975)
* Force refresh when kindle is out of screensaver or usb is unpluged.

* Improve AutoFrontlight

* More plugins sub menu

* Last brightness should always be updated

* Finish autofrontlight improvement and enable it by default.

* More tets

* onFlushSettings

* MenuSorter can now correctly sort sub menus
7 years ago
Hzj_jie 53eb4dee50 AutoFrontlight plugin (#2941)
* Add AutoFrontlight plugin

* Add configuration to control autofrontlight feature
7 years ago
Hzj_jie 30378eb2a8 Add restart koreader function and ensure FlushSettings event can be delivered to all widgets (#2772) 7 years ago
Martín Fernández 474c011f21 [kobo]: add reboot and poweroff menu actions (#2888) 7 years ago
Robert 9a247e86ae Screensaver on Kindle without Special Offers (#2757) 7 years ago
Cosmin Gorgovan 10132d1c59 Disable the network asynchronously to avoid blocking the UI
Noticeable latency between toggling the power switch and the device
showing the screensaver has been tracked down to the two network
manager calls. This change allows the screen to be updated first.
Note that unloading the open source brcmfmac driver used on okreader
is slower than unloading the proprietary driver shipped by Kobo,
making this delay even more noticeable.

self.suspend() is scheduled after the network manager calls to avoid
race conditions.
7 years ago
Cosmin Gorgovan 11d6bfbc40 Fix typo in frontend/device/generic/device.lua 7 years ago
Hzj_jie 8f4ec13841 Remove powerd:refreshCapacity() (#2671) 7 years ago
Qingping Hou f95ad00b9e feat: add logger module & rewrite kobo suspend script in lua 7 years ago
poire-z 283429fe9b Network Info: prettier and additional infos (#2394)
Left alignment of existing infos.
Added SSID and default gateway ping result.
7 years ago
Bastien Dejean 64bc5cd63c Make the powered off state customizable
This changes the behavior of the powered off transition phase for the
Kobo devices: instead of displaying a confirmation dialog, a screensaver
is used after a 2 seconds press delay.

Users can specify separate directories/files/messages for the powered
off and sleeping states through the `path` and `message` attributes of
the `{poweroff,suspend}_screensaver` settings.

Fixes #2327 and closes #2306.
8 years ago
Qingping Hou 816d0a551a kobo: handle charging/uncharging event 8 years ago
Qingping Hou 0ace252b64 device(minor): call restoreWifiAsync with self 8 years ago