Commit Graph

654 Commits (863255c9f426bdd6845f3f3eced4f270f1baecee)

Author SHA1 Message Date
NiLuJe c810a19040
H2O: Fix initial tap detection (#6832)
* Fix initial tap on the H2O

There's no slot 0, so make sure the initialState doesn't get confused by input's init data that otherwise assumes the main slot is 0
4 years ago
Martín Fernández 99ad13b13c
android: handle onDestroy (#6811)
* handle onDestroy

we need it if killed by the system (ie: battery optimizations or OOM)
we need it to exit the lua VM when we call finish() from Kotlin

This prevents us for being trapped into a zombie state
4 years ago
ezdiy 5a86443eb1
Pocketbook: waveform presets (#6794)
On pocketbook, update modes are not as clear cut due to overall
chipset and kernel version mess. Inkview solves this by always
using the slowest (and safe) GC16 waveform. We now do that too
by default.

Slow updates suck though, so there's now a menu entry to configure
it for speed (with mild artifacts at best, kernel panic at worst).

This is a generic interface (any eink Screen can announce support).
The driver may interpret the slow/fast range however they want.
4 years ago
NiLuJe dda905271d
[Kobo, Mk. 7] Enable the power LED when charging (#6810) 4 years ago
NiLuJe 0406be3319
Random nano optimizations (#6801)
* Don't call Screen:afterPaint if nothing was actually painted

* Stupid micro-optimization (os.)time! (pun intended :D)
4 years ago
poire-z 633d43b322 Devices: get rid of touch_probe_ev_epoch_time
On devices where the event time is the uptime (time since
boot), we don't need to trash it and use TimeVal:now()
and lose precision. We can still use these times for
relative delays and durations computations, which is
mostly all we use them for.
We just need a real clock time in GestureDetector for
two timers (long-press and double tap), where we do
the event time type detection on the first event, on
all devices.
4 years ago
poire-z b90f6db876 GestureDetector: add Tap interval setting, to avoid bounces
Also fix info_text not displayed, and add more
descriptive ones.
4 years ago
ezdiy 893909146d
Pocketbook: use raw input I/O (#6791)
This allows for better energy efficiency (no more 50Hz tick poll),
as well as lower input lag / higher precision - touch events are
native linux ones.

In addition, auto off/suspend plugin is used in this mode, as we need
to trigger (timed) sleep / poweroff on our own, since the OS ones
will no longer work whenever koreader has focus.

This is for rooted devices only, and possibly somewhat FW
specific, so enabled only on PB740-2 where it's reasonably tested.
4 years ago
Martín Fdez 009e2b3b94 android: reinit FM after surface change 4 years ago
NiLuJe d2f533e5b7
A couple of hotfixes for 2020.10.1 (#6781)
* PB Crash Screen:
	* We don't actually support the "tap to restart now" behavior, it's a
	  plain sleep.

* Remove CBB toggling leftovers missed in #6696

Fix #6780
4 years ago
NiLuJe ac6b121c85
Disable HW inversion on rM (#6779)
Turns out it's being weird like on Mk. 7 Kobos with a crapload of PxP
processing flags.
Except without the "crapload of flags", part :D.
4 years ago
NiLuJe b932b97b20
A few reMarkable QoL fixes (#6772)
* Enable AutoSuspend plugin on rM

Fix #6769
Re: #6028

* Use the PowerEvent handler on rM

It makes much more sense than the fire & forget & hope for the best
approach copied from the Kindle platform, because we *are* controlling
suspend ourselves (mostly), unlike on Kindle ;).

Fix #6676

* Enable HW inversion on the rM

I mean, we kinda forgot to ever test that, but I don't really see why it
wouldn't work ;).
4 years ago
ezdiy 6b4188074e
Pocketbook: Fix silly rotation bug on PB1040 (#6735)
Ditto as PB740
4 years ago
ezdiy 592e54aa02
Pocketbook: Fix silly rotation bug on PB740 (#6734)
It detects B288, disables hwrot...
.... and there wasn't the isAlwaysPortrait enabled to serve as an alternative.
4 years ago
NiLuJe ec3ec8dc21
Show full ToC entry on hold (#6729)
Fix #6728
4 years ago
NiLuJe e169b34577
Fancier Wi-Fi status icons in ReaderFooter (#6725)
* In icons mode, just use two different icons to display Wi-Fi status

* Enable Wi-Fi status icon on Kobo & Cervantes, too

* Refresh footer on (dis)connect if the Wi-Fi status item is enabled
4 years ago
ezdiy 25d5e9322c
Pocketbook: Try to auto-detect HW feature caps more precisely (#6721)
The differences between Allwinner/MXC matter surprisingly little in practice, it's not even worth
it to bother the base mxc driver with it. Instead, frontend can make some informed choice by
probing for the hardware and tweaking requested device caps accordingly.

On Allwinner B288, we disable both hwrot (done in software in kernel and terribly, ie not worth it)
and hwinverse (no support whatsoever). On NXT we'll keep both on, as the kernel driver seems
to be using the hardware properly .
4 years ago
ezdiy ef8d2d0d6e
linuxfb: is_always_portrait must be passed to screen init() from all frontends. (#6712)
This is because fb driver should not be inspecting self.device for low level
caps anymore.

Fixes #6711
4 years ago
ezdiy 5345728cc4
Clean up C blitbuffer kludges. (#6696)
CBB now handles nightmode correctly (by deferring to Lua), so we no longer
need to do monkey dances about disabling it when hw invert is missing.

canUseCBB cap is resolved by generic device re-configuring blitbuffer
on the go, so as to avoid repeating the same thing in every device driver.

The dev setting can now flip cbb on the go, so one can gloat at the near
meaningless perf difference - 2Mp draw is 15ms Lua / 10ms C on 1GHz Cortex A7.
4 years ago
ezdiy d59a3e217e
Pocketbook: Implement HW screen rotation, bring in PB specific kludges from linuxfb (#6684)
* Uses bunch of new plumbing in base to configure screen rotations in hardware (koreader normally does this via blit buffer rotations, except for android).

* Some PB specific kludges that used to pollute core/framebuffer_linux are brought into PBs frontend driver.
4 years ago
yparitcher 3e063498fc
FrontLight: fix footer update on FL on/off toggle (#6664)
move state change event to higher level function so it will be called after powerd.is_fl_on is updated.

makes _setIntensity redundant so get rid of it

obsoletes #6667
4 years ago
Martín Fernández 27fe0d7957
add eudic from gplay (#6682) 4 years ago
NiLuJe 23efabb913
[PB] Fix WAIT_FOR_UPDATE_COMPLETE ioctl (#6669)
* Fix WAIT_FOR_COMPLETE ioctl (fix #6000)

* Prevent a promotion to a flashing on fg/bg toggle

* Bump base for the matching PB updates

(https://github.com/koreader/koreader-base/pull/1188)
4 years ago
NiLuJe f1918cdfbb
[Kobo] Don't send a flood a FrontlightStateChanged events during the FL ramps (#6667)
* Only send a single FrontlightStateChanged event on toggle

Prevents the ReaderFooter refresh from going wonky
4 years ago
zwim 73b0c701ce
correct bug introduced with #6641 (#6665) 4 years ago
ezdiy 152ee087a8
Pocketbook: Fix frontlight handling. (#6663)
Account for InkView 5.x having different API for on/off states.
4 years ago
NiLuJe 99045b4311
Minor util & ffi/util cleanups (#6657) 4 years ago
Martín Fernández 8f61bc750b
AndroidPowerD: remove unneded syntactic sugar & JNI calls (#6641)
Each JNI call has a little overhead, so don't use them when it is not needed.
The syntactic sugar is not needed to use android module's functions.
4 years ago
ezdiy a110fe8686
Pocketbook: Add reboot option. (#6625)
Turns out there's an IPC command for it.
4 years ago
ezdiy 63e938f508
Pocketbook: Add file associations into "Open with" menu (#6624)
We used to put koreader alone in there, but apparently other
handlers can be left in as optional - see #6415
4 years ago
poire-z f15aa7103f
Allow following links and footnotes with keys (#6619)
Only with CreDocuments (as no way currently to highlight links
in PDFs).
Tab or Shift-Tab to select next or previous links.
Press to follow (or show footnote in popup, and in there Press
to follow), back to go back.
4 years ago
ezdiy 4857e97e30
Pocketbook: Launcher OS integration (#6620)
* Bring in restart koreader & shutdown device exit options
* Existing instance reused for opens via native book explorer
4 years ago
ezdiy c9a339ead0
Pocketbook: File handling OS integration (#6617)
* Show opened file in task manager
* Remember file to open on power-off
* Perform file associations
4 years ago
ezdiy 426f7b5ddc
Add API to set OS level file associations (#6615) 4 years ago
poire-z 962fd02c98
Tame BackgroundRunner: stop running when no more job (#6605)
A BackgroundRunner plugin instance will stop running
(rescheduling a check every 2 seconds) when there is no
(or no more) job to run.
Clients of this service now have to emit an event after
adding a job into PluginShare.backgroundJobs, so an
already loaded but stopped BackgroundRunner can notice
it and start running again.
4 years ago
ezdiy 6d3d45a93b
Pocketbook frontend: Fix up missing require. (#6604)
This one slipped through tests somehow.
4 years ago
ezdiy 3c0e14703d
Poll mode pocketbook frontend. (#6559)
Out of the box, it behaves exactly as native pocketbook apps should, ie aggressive
standby, but no freezing at operations in progress.

Config UI will be done via koplugin that will also do adaptive standby. This is
because the API is now device independent (albeit PB is the only implemented user).
4 years ago
ezdiy fd31bcc5fd
Make UIManager track prevent/allowStandby state. (#6558)
Conversely, Trapper and plugins report standby interruptibility.
4 years ago
zwim 2c1d87a956 resolve ANR on hold and native light dialog 4 years ago
zwim 6fb2a0469b
update statusline after native light dialog (#6584) 4 years ago
zwim 24af0810d2
turn on frontlight switch on Tolino. (#6586) 4 years ago
Martín Fernández c7f77de72a
refactor thirdparty app integration (#6513)
* refactor thirdparty app integration
* Fix fora package name
4 years ago
Martín Fernández 189397e38c
android: fix frontlight dialog gesture (#6568) 4 years ago
zwim 66e8087c66
[android]: fix backlight toggle (#6520)
* check on startup if frontlight can be changed.
* Init fl_min if necessary not to use intensity==0
4 years ago
NiLuJe 6e3a3e8069
[Kobo] Support USBMS exports (#6552)
* \o/

* Make sure the (debug) event log doesn't end up in the fd table of our child processes...
Otherwise, it breaks USBMS.

* Close suspicious fds in the Wi-Fi scripts
To prevent any and all issues w/ USBMS down the road...

* Minor USBMS UI tweaks

* Always ask for confirmation to start on USBMS session on plug

* Bump base

https://github.com/koreader/koreader-base/pull/1161
https://github.com/koreader/koreader-base/pull/1162
https://github.com/koreader/koreader-base/pull/1163
https://github.com/koreader/koreader-base/pull/1165
https://github.com/koreader/koreader-base/pull/1167
4 years ago
Martín Fdez 09e5143d2f pocketbook: fix for devices without natural light :p 4 years ago
roshavagarga 61e9d0b40a
Specify that PocketBook 515 has no frontlight (#6549)
It doesn't have one, and having it in there might lead to issues.
4 years ago
NiLuJe b5d3305876
A few e-Ink flash rate QoL tweaks (#6528)
* Add an option to *always* flash on chapter boundaries

* Optionally, in flash on chapter boundaries mode, also flash on the *second* page of a chapter.

(There's often a large river at the top of the page on a chapter's first page)

* In CRe, request a flashing update when there is significant image content on the page.

* Register all refresh rate related options in Dispatcher, making them available in Gestures & Profiles.
4 years ago
NiLuJe 1b904f0f0d
Revamp manual rotation events (#6530)
Restore a Swap event like before #6309
Implement an Invert one
And keep the fairly useless +90° CW one, but under an accurate name.

Fix #6524
4 years ago
roshavagarga 87fac74ea2
Fixes and changes to PocketBook definitions (#6533)
**Changes:**
- [x] Added new CIS-unique device definition for PocketBook 606 - [News article](https://pocketbook.ru/news/novyy-pocketbook-606/)
- [x] Added new CIS-unique codename for PocketBook Aqua (640) - [Russian manual](http://support.pocketbook-int.com/fw/640/ru/4.4.1853/manual/User_Guide_PocketBook_640_RU.pdf) (last page)
- [x] Added new CIS-unique codename for PocketBook Ultra (650) - [Russian manual](http://support.pocketbook-int.com/fw/650/ru/5.14.789/manual/User_Guide_PocketBook_650_RU.pdf) (last page)
4 years ago
Martín Fernández b9ffb2e0d0
pocketbook: warmth lights support (#6531)
* also enables natural light controls for the emulator
4 years ago
Teteros 01ed79fb92
Update PB633 device definition (#6529) 4 years ago
roshavagarga a9aa63d94c
Update PocketBook device definitions (#6525) 4 years ago
zwim b3f64dc73b
gesture: messages and sensitivity changes for small (warmth) scales; devicelistener dedup (#6468)
* deduplicate code on warmth/brightness swipes

if device has a small scale (e.g. warmth is going from 0..10)
* adjust warmth message
* use a smaller gesture sensitivity
4 years ago
Martín Fernández d935ca6937
sdl: keep track of window position and size (#6495) 4 years ago
roshavagarga ec87d36e57
PocketBook: Add new device definitions (#6481) 4 years ago
Martín Fdez 9037a1f4f2 bump luajit-launcher and remove frontlightwidget leftovers 4 years ago
Martín Fdez bdbebb9e08 standalone osx application bundle 4 years ago
zwim a6763465b4
[Android]: Native light dialog (#6426)
* Adds support for Tolino Epos 2 warmth light
4 years ago
Galunid a9d0990f84
Add Set Frontlight/Set Frontlight Warmth to dispatcher (#6440)
Add Set Frontlight/Set Frontlight warmth events to dispatcher. This allows users to set day/night profiles with different fl/warmth values as requested in #6444
4 years ago
NiLuJe 2ad976387d
More #6424 cleanups (#6442)
* Simplify logic, and more detailed debug logging
* Kill Nickel's FIFO on startup
Avoids udev/udhcpc scripts hanging when trying to open() it.
4 years ago
NiLuJe 37a01100b7
Various Wi-Fi QoL improvements (#6424)
* Revamped most actions that require an internet connection to a new/fixed backend that allows forwarding the initial action and running it automatically once connected. (i.e., it'll allow you to set "Action when Wi-Fi is off" to "turn_on", and whatch stuff connect and do what you wanted automatically without having to re-click anywhere instead of showing you a Wi-Fi prompt and then not doing anything without any other feedback).
* Speaking of, fixed the "turn_on" beforeWifi action to, well, actually work. It's no longer marked as experimental.
* Consistently use "Wi-Fi" everywhere.
* On Kobo/Cervantes/Sony, implemented a "Kill Wi-Fi connection when inactive" system that will automatically disconnect from Wi-Fi after sustained *network* inactivity (i.e., you can keep reading, it'll eventually turn off on its own). This should be smart and flexible enough not to murder Wi-Fi while you need it, while still not keeping it uselessly on and murdering your battery.
(i.e., enable that + turn Wi-Fi on when off and enjoy never having to bother about Wi-Fi ever again).
* Made sending `NetworkConnected` / `NetworkDisconnected` events consistent (they were only being sent... sometimes, which made relying on 'em somewhat problematic).
* restoreWifiAsync is now only run when really needed (i.e., we no longer stomp on an existing working connection just for the hell of it).
* We no longer attempt to kill a bogus non-existent Wi-Fi connection when going to suspend, we only do it when it's actually needed.
* Every method of enabling Wi-Fi will now properly tear down Wi-Fi on failure, instead of leaving it in an undefined state.
* Fixed an issue in the fancy crash screen on Kobo/reMarkable that could sometime lead to the log excerpt being missing.
* Worked-around a number of sneaky issues related to low-level Wi-Fi/DHCP/DNS handling on Kobo (see the lengthy comments [below](https://github.com/koreader/koreader/pull/6424#issuecomment-663881059) for details). Fix #6421 
Incidentally, this should also fix the inconsistencies experienced re: Wi-Fi behavior in Nickel when toggling between KOReader and Nickel (use NM/KFMon, and run a current FW for best results).
* For developers, this involves various cleanups around NetworkMgr and NetworkListener. Documentation is in-line, above the concerned functions.
4 years ago
Frans de Jonge 7c1a716d57
Fake battery status in readerfooter_spec to succeed on devices with batteries (#6417)
Cf. <https://github.com/koreader/koreader/pull/6370#issuecomment-662382487>.
4 years ago
Martín Fernández ca21d1401a SDL: use platform as model for desktop computers, report battery if available 4 years ago
Martín Fernández 94c0d7854f remove filechooser 4 years ago
Martín Fdez fca7f9e7d5 desktop/emulator 4 years ago
yparitcher 1db2b7d875
better logic for #6386 (#6388) 4 years ago
yparitcher 6671d984ed
SetNightMode event & Night Mode refresh rate (#6386)
If the user has not set a separate refresh rate for night mode
the default one will be used, as was the previous behavior

Closes: #5019
Closes: #6094
4 years ago
NiLuJe a8da762955
Initial handling of the upcoming Kobo Nia (#6380)
Obviously untested ;p
4 years ago
yparitcher bda44a99ef
Dispatcher: use sections (#6364)
use `device` `filemanager` `rolling` and `paging` sections to organize the
dispatcher menu and allow the user to know when the action will apply

add events from ReaderGesture

allow profiles in FM
4 years ago
yparitcher 70f89c4df1
ReaderGesture: cleanup (#6292)
convert all gesture actions to use events for better modularity
add network event handlers and device event handlers
4 years ago
Martín Fernández 1adea4a497 Add macOS target
Co-authored-by: Jason Benwell <jbenwell@hotmail.com>
4 years ago
Martín Fdez a376a52c3a easier user font paths with Device.home_dir 4 years ago
NiLuJe 509ee7bb86
Allow locking the gyro to the current screen mode (#6347)
* 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
4 years ago
Martín Fdez 8324154177 keep newlines outside translations 4 years ago
Martín Fdez 7094519e1b android: support for native surface rotation 4 years ago
yparitcher f7d538b108
Landscape FM / Refactor rotation (#6309)
* 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
4 years ago
Martín Fernández 32207523b0
emulator: add fake network manager (#6314) 4 years ago
roshavagarga 46bf88c573
Add PocketBook 614W (Basic 3) definition (#6312)
Cf. <#6311>.
4 years ago
zwim 43693c9fe9
Add the possibility run shell scripts from filemanager on android (#6288) 4 years ago
NiLuJe ff1e50c5c0
Don't rotate BookStatus & ReadingProgress in screensavers. (#6286)
They're full-screen, and they work fine in Landscape.

re: #5724

* Fix multiline indents in the Kindle c/p ;p
4 years ago
Martín Fernández 83cde64bcc
unified calibre plugin (#6177)
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).
4 years ago
Martín Fernández 2e731dd4dd
[chore] Device abstraction (#6280)
* 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
4 years ago
Martín Fernández 765b35a7bf
android: add a toggle to ignore back button events (#6269)
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)
4 years ago
Martín Fdez 835f9f62c6 fix ANRs in Kosync plugin login/register 4 years ago
Martín Fdez 3e3ddbfc4b desktop: don't show which results on console 4 years ago
NiLuJe 9c4e246038
Ensure feature-parity in ScreenSaver handling on Kindle (#6240)
* 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 ;).
4 years ago
NiLuJe 95567d8af8
Disable the RTC alarm on shutdown (#6211)
* Disable the RTC alarm on shutdown

* Nice typo.

* Bump base

https://github.com/koreader/koreader-base/pull/1103
https://github.com/koreader/koreader-base/pull/1105
https://github.com/koreader/koreader-base/pull/1106
4 years ago
Frans de Jonge 0fb9113078
[feat] Add Device:hasFewKeys() (#6193)
This will allow to behave subtly different in certain instances.
Cf. <https://github.com/koreader/koreader/issues/4029>.
4 years ago
Frans de Jonge 528e993eb3
[PocketBook] Add PocketBook 613 Basic definition (#6192)
Cf. <https://github.com/koreader/koreader/issues/4029>.
4 years ago
poire-z 16e42116ee
[fix] GestureDetector: prevent hold timers overlap (#6186)
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.
4 years ago
Frank LENORMAND 23cbabd539
[PocketBook] Refine 515 model attributes (#6184)
References <#6168>.
4 years ago
Frank LENORMAND 0b0548fade
[PocketBook] Map d-pad key events (#6183)
References <#6168>.
4 years ago
Frans de Jonge eb92a95fa0
[PocketBook] Add 515 and PB616W definition stubs (#6182)
Might need further tweaks. References <https://github.com/koreader/koreader/issues/6168>.
4 years ago
Martín Fernández 3a4b5d3cab
desktop: add support for 3rd party dictionary apps (#6167) 4 years ago
Martín Fdez 607dbf0808 clean PB device definition 4 years ago
Martín Fernández 5704f63bfc
fix openLink on linux (#6161) 4 years ago
Martín Fernández 58a6b01d03
add eudic dictionary support (#6154) 4 years ago
Martín Fdez 48727a984b android: add a toggle to force haptic feedback in spite of system settings 4 years ago
Roman Artiukhin 9588b51f24 Correct name for GoldenDict Pro dictionary 4 years ago
Martín Fdez 8e831eb756 desktop: disable battery on touch menu and reader footer
isDesktop and isEmulator are now different entities
4 years ago
NiLuJe 2ae796eb2a
[Kindle] Be more thorough when toggling WiFi (#6039)
Fix #6019
4 years ago
dfhall 04ca12bb7f
Fix remarkable pen input (#6031)
fixes #6030
4 years ago
NiLuJe 0b898624ac
[Kindle] More accurate on/off FL detection/toggle (#5989)
* 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...
4 years ago
NiLuJe 4a5a2eb708
Unbreak nightmode on Cervantes (#5966)
* Unbreak nightmode on Cervantes

Regression after https://github.com/koreader/koreader-base/pull/1047 (I
thought it was already implemented).

Fix #5963

* make luacheck happy
4 years ago
clarkspark 1d58eb8b6c
Correct Frontlight status on suspend when screensaver mode is 'Leave … (#5928)
Also use a var in place of a long function name
4 years ago
Lukáš Kucharczyk ab744e1945
Add support for PocketBook InkPad X (#5890)
Closes #5887.
4 years ago
Frans de Jonge 5692f7df75 sort 4 years ago
Matias Nitsche 0575ed4c14 PRSTUX: interact with USB charger 4 years ago
Thomas Spurden 6f849c5285
A couple of minor remarkable port fixes (#5834)
* 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
4 years ago
Frans de Jonge 1177baaf01 [CI] Ignore unscaled size check on mt_width/height (#5829)
See https://github.com/koreader/koreader/pull/5828#issuecomment-583677718

* fix luacheck too
4 years ago
Martín Fernández 67627ce2d9
Remarkable port (#5828)
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>
4 years ago
Martín Fernández 3856f04445 android: switch to connectivity manager
Co-Authored-By: Frans de Jonge <fransdejonge@gmail.com>
4 years ago
NiLuJe 5499d85cbc
Allow running shell scripts from the FileManager/Favorites (#5804)
* 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.
4 years ago
NiLuJe f44b031702
Make Inverted Portrait a first-class citizen (#5783)
* 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...
4 years ago
Martín Fernández 5ef329c19c android: share text (#5745) 4 years ago
Martín Fernández 419b42cf2c
android: call EPD test from within KOReader (#5737)
* android: call EPD test from within KOReader

Co-Authored-By: Frans de Jonge <fransdejonge@gmail.com>
4 years ago
poire-z 0599c440cc [RTL UI] Bidi-wrap filenames, paths, urls, metadata
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.
4 years ago
Martín Fernández 25e80358dc android: import files from Storage Access Framework 4 years ago
Martín Fernández f9a820d682 android: unbreak KO on scoped storage devices 4 years ago
Martín Fernández 72e5574ca7 android: allow overrides on 3rd party dictionary list 4 years ago
Martín Fernández f1f75c5cb0 android: touchscreen toggle option (#5564) 5 years ago
Martín Fernández 87334801ea android: fix ko paths when primary storage is a SD card 5 years ago
NiLuJe 9f4ba77fab [Kobo] Always set the warmth on the KA1 (#5468)
It might be possible to instead only set the white led, but I don't
have the hardware to test that theory, se, eh.

Fix #5465 (probably.)
5 years ago
Martín Fernández b75fec4971 tweak timeouts, add haptic feedback support
Co-Authored-By: Frans de Jonge <fransdejonge@gmail.com>
5 years ago
Frans de Jonge f7861bc1eb
[feat] Add haptic feedback (#5380)
References <https://github.com/koreader/koreader/issues/5374>.
5 years ago
NiLuJe abc86323fc [Kobo/Cervantes] Always use setBrightness to set the brightness (#5429)
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
5 years ago
NiLuJe e7cfc65780 [Kobo] Unbreak the FL ramp-up/down (#5421)
I got my wires crossed.

It's fast on Mk. 5, slow on Mk. 7.
So, slow it down on Mk. 5 so we actually get a ramp and not a jump.
5 years ago
NiLuJe f96cfe940b
Use the proper LED driver on the Libra (#5416)
So that we can actually set the warmth ;)
5 years ago
NiLuJe bcceb94603
Hotfix the startup orientation on the Kobo Libra (#5409) 5 years ago
NiLuJe 1c2c471c5f
[Kobo/Cervantes] Prefer using the ioctl over sysfs when setting the FL. (#5407)
* Prefer using the ioctl over sysfs when setting the FL.
It's much lower latency (re #5373).

We can do so on NL devices with a mixer.
5 years ago
tobiasarndt a2f605ba38 [fix] added PocketBook InkPad 3 Pro to device.lua (#5398) 5 years ago
Frans de Jonge 672d29fbcc [fix] WakeupMgr: pass through task epoch for proximity check 5 years ago
Frans de Jonge 0c290be055 WakeupMgr: add log when scheduling wakeup 5 years ago
Frans de Jonge 3836184f9d [Kobo] Always write scheduled wakeup info to log 5 years ago
NiLuJe 4363576066 Support the Kobo Libra
(Hopefully?).
5 years ago
Frans de Jonge e257c4e45e
[feat, Kobo] Autoshutdown (#5335)
The methods used here will likely work on most embedded devices, which is why I put them in their own WakeupMgr interface/scheduler module, separate from Kobo.

See https://www.mobileread.com/forums/showthread.php?p=3886403#post3886403 for more context.

Fixes #3806.
5 years ago
Frans de Jonge 0dad707e2e
[fix, Kobo] Don't crash trying to sync frontlight with Nickel. (#5361)
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>.
5 years ago
Martín Fernández 20ebb55703 [Cervantes] Disable wifi before returning to QT, improved sysfs read (#5326) 5 years ago
Frans de Jonge 7019ff15bd
[chore] Drop SDL 1.2 (#5324)
Depends on https://github.com/koreader/koreader-base/pull/963.

Also includes Initial import of <linux/rtc.h> related stuff https://github.com/koreader/koreader-base/pull/965
5 years ago
Robert ae50569055 Frontlight - Add checkbox use system settings (#5307)
See: https://github.com/koreader/koreader/issues/5205#issuecomment-526935357

Devices with `hasLightLevelFallback = true` (for now Android) has extra checkbutton `Use system settings`. Default unchecked.
5 years ago
Frans de Jonge 1b17ce8ba0
[fix, Kobo] Save frontlight state on shutdown after suspend (#5305)
Fixes <https://github.com/koreader/koreader/issues/5292>.
5 years ago
Frans de Jonge cfa73be940
[feat, Kobo] Implement shutdown from suspend (#5280)
This allows to shutdown straight from suspend just like Nickel.

Fixes <https://github.com/koreader/koreader/issues/2431>.
5 years ago
Frans de Jonge be87fb27a0
[chore] Convert a couple more todos (#5267)
Cf. <https://github.com/koreader/koreader/pull/5244>.

Also update check.
5 years ago
Frans de Jonge 9cd8e4a53a [chore] Work around weird LDoc bug
Using two `@fixme` tags directly following each other can result in a crash.

See <https://github.com/stevedonovan/LDoc/issues/314> for the upstream issue.
5 years ago
Frans de Jonge 59bb3ac8ea
[chore] Remove executable bit on device/input.lua (#5258)
I've got no idea why that might be there.
5 years ago
Frans de Jonge a2dcfe9aec
[doc] Tag @todo, @fixme and @warning (#5244)
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
5 years ago
Martín Fernández 3a957d71e3 [Desktop] Open writable font dir, toggle system+user/user fonts, fix openLink on mac (#5220)
Fixes #5093
5 years ago
Martín Fernández 3161673d70 fix #5228 5 years ago
vvasseur c104724a58 PocketBook 626 new codename (#5215) 5 years ago