2
0
mirror of https://github.com/koreader/koreader synced 2024-11-10 01:10:34 +00:00
Commit Graph

863 Commits

Author SHA1 Message Date
NiLuJe
e7e0d2edb6
Kobo: Disable HW inversion on MTK (#10841)
Apparently, that doesn't quite work...

Followup to #10719
2023-08-25 20:53:11 +02:00
NiLuJe
21de1a832e Main: Move the G_reader_settings flush to Device:exit
I don't trust PB's input.closeAll not to be doing something wonky that
would trip an early abort.
2023-08-19 17:25:10 +02:00
NiLuJe
d1bbdb5dad PocketBook: Run Generic:exit *last*
Makes more sense this way.

Re: #10828

Also clarify the UIManager "no dialogs left" message, and drop the
return value, as it's meaningless, we just want to break & return.
2023-08-19 17:25:10 +02:00
NiLuJe
5146358605 NetworkManager: Allow backends to report connection failures early
As early as turnOnWifi.
Implement it on hasWifiManager platforms, preventing useless
connectivity checks to run when they're obviously never going to work
because you're out of range of your AP.

Also implemented a flag to notify the backend if the connection attempt
was interactive or not.
Right now, interactive is extremely restricted, it basically means the
menu checkmark, or a gesture.
The intent being that for stuff like the beforeWifiAction framework, we
don't want the backend to spawn extra UI.
Specifically, for hasWifiManager platforms, we no longer spawn the AP
scan list on failure unless the caller was interactive.

TL;DR: beforeWifiAction is now much less obnoxious when you're obviously
not able to connect.
2023-08-15 21:24:11 +02:00
NiLuJe
22678ee5ff Misc: Review pass on the previous commits
* Unbreak the Device test
* Rename a few things
* Tweak a few comments
2023-08-15 21:24:11 +02:00
NiLuJe
f44f92a864 Kobo: Run Generic:init dead last, like every other platform
This is semantically more correct, and should prevent platform-specific
weirdness if an ordering concern ever comes up (e.g., like it did for
the viewport stuff).
2023-08-15 21:24:11 +02:00
NiLuJe
71378b0b50 Startup: Move Device ctor/dtor shenanigans to the actual Device
constructors and destructors

No need to leak implementation details in there.
2023-08-15 21:24:11 +02:00
NiLuJe
e9a84ca434 Reader: Move the "print exit code in a file" hack to the PB
implementation, where this mess belongs.

No other platform relies on this (because, spoiler alert, InkView \o/).
2023-08-15 21:24:11 +02:00
NiLuJe
f4aca567ef Kobo: Allow disabling key repeats
Re #10743

Note that this only makes faulty switches slightly less annoying: for a
stuck switch, instead of a string of page turns, you'll get a single
missed page turn on the tap that actually releases the stuck contact...
2023-08-15 21:24:11 +02:00
NiLuJe
0db7509fe2
Kobo: Fix the input translation on the Elipsa 2E (#10802)
Apparently it mirrors on the Y axis. Or the panel vs. touch rotations are wonkier than expected or ...something.
2023-08-12 02:47:42 +02:00
zwim
ac143ca9d6
Add forgotten f:close() (#10796) 2023-08-09 19:24:46 +02:00
yparitcher
f3fc2ac353 do not allow clipboard to be nil
we use it as text anyway and test if it is the empty string also.

this fixes a crash in viewhtml when holding a selector with an empty clipboard, we try to contcate getClipboardText which is nil (on !SDL & !Android)
2023-08-08 16:15:40 -04:00
NiLuJe
9c8e55b3e5
Kobo: Yet another attempt at working around the hangs on the latest NXP boards (#10771)
* Notification: Drop the fencing from #10083; it never actually helped, and had subtle side-effects we could do without.
* VirtualKeyBoard: Flash on close, otherwise, some of the fast refresh glitches may be burned into the working buffer until a flash. Making sure we flash ourselves prevent it from sticking around on the page ;).
* util: Move `writeToSysfs` to base (i.e., `ffi/util`), as we need it there (and it actually makes more sense there anyway ;p).
* Bump base for https://github.com/koreader/koreader-base/pull/1645, which is where the actual workaround (hopefully) lives.

Re #8414, #9806, #10558
2023-08-01 23:53:10 +02:00
NiLuJe
689d9e2976
Kobo: Initial Elipsa 2E support (#10719)
Untested, but mostly everything should be there ;p.

Bumps base for MTK support (https://github.com/koreader/koreader-base/pull/1642)
2023-08-01 20:26:02 +02:00
NiLuJe
9ceb07a4c6
Kobo: Unbreak Aura One support (#10758)
Regression since #10728, Fix #10757
2023-07-28 20:48:28 +02:00
NiLuJe
21949c5521 Kobo: Apply the AW99703 smooth ramp off fix to all affected devices
e.g., at least the Clara 2E features the same controller & driver,
but it is likely found on a few other models.
2023-07-24 04:22:13 +02:00
NiLuJe
f5e871d4ed NetworkInfo: Never show the token index
Now that I've seen it in action on a device, it's mostly useless, and,
if anything, confusing, because it's not static.
2023-07-24 04:22:13 +02:00
hasezoey
618f065de4
DeviceListener:onToggleFrontlight: add notification of "unchanged" (#10727) 2023-07-23 13:33:24 +02:00
hasezoey
b1109a729e
Android: call "_decideFrontlightState" to keep "is_fl_on" in sync (#10731) 2023-07-23 13:31:10 +02:00
hasezoey
14347f0c18
Android - lights: return to previous level on cancel (#10726) 2023-07-23 13:29:53 +02:00
NiLuJe
17bdd56e02 Never export LD_LIBRARY_PATH
It's been made redundant by the RPATH changes

The only platform that gets the dubious honor of actually needing an
LD_LIBRARY_PATH is PocketBook, because of InkView.

Co-authored-by: Benoit Pierre <benoit.pierre@gmail.com>

Bump base to pull in the aforementioned RPATH changes ;).

https://github.com/koreader/koreader-base/pull/1638
2023-07-18 02:11:25 +02:00
Christian Kilb
6d7dccda13
[PocketBook]Add support for InkPad Color 2 (#10685)
Co-authored-by: Christian Kilb <christian.kilb@gmail.com>
2023-07-12 16:50:20 +02:00
NiLuJe
d57325aaf6
NetworkManager: Enable "before wifi" action support on every hasWifiToggle platform (#10669)
* Enable before_wifi_action & after_wifi_action on hasWifiToggle platforms (which is basically all of 'em except naked SDL).
* Decouple restoreWifiAsync from hasWifiManger, because we can do that on other platforms (namely, Kindle. Probably PB, too, but WiFi is already a mess there, and I can't test it).
* Implement restoreWifiAsync on Kindle.
* Properly flag rM as hasWifiManager & hasFastWifiStatusQuery, because it is actually both of those (it uses our wpa_supplicant backend).
* Update the KOSync checks to take these changes into account, to properly disable auto_sync if necessary.
* Really made the Network* event signaling consistent. For realz this time.
* In an effort to make the whole beforeWifiAction framework somewhat usable there, we now assume connectivity is always available on !hasWifiToggle platforms...
2023-07-12 02:42:16 +02:00
NiLuJe
4194244951
GestureDetector: Make two_finger pans & swipes report the same sort of data than their standard brethren (#10649)
Namely, that swipes report the gesture's *starting* coordinates as `pos` (for hit-detection purposes), while pans (and basically everything else) use the *lift* coordinates (as well as provide a relative vector).

In each case, we now also provide a separate `start_pos`/`end_pos`, in case handlers need finer-grained data (e.g., anchoring UI elements to a swipe's lift coordinates).
2023-07-09 18:20:53 +02:00
ElimGarak1
4b475bee04
Recognize PocketBook InkPad 4 with new firmware (PB743G)/(PB743g) (#10655)
Extended addition of PocketBook InkPad 4 with firmware later U743g.6.8.885 (PB743G) because its device ID was corrected from PB743g to PB743G by firmware U743g.6.8.1719.
2023-07-07 19:28:06 +02:00
Martín Fernández
5336e2f11d
[ota]: deprecation check & notice (#10639) 2023-07-04 22:58:40 +02:00
Alistair Francis
fc89b1affa
Remarkable: support the mainline touchscreen (#10585) 2023-07-04 09:08:31 +02:00
NiLuJe
08dd97384c
KOSync: Clarify settings, plus refactor & fixes to make "auto-sync" more reliable (#10605)
Fix: #10539, and for context #6489, #6733, #6534

Reorganize and reword most of the settings to make it clear what actually ties into auto sync, and what doesn't. (Specifically, what happens when a pull attempts to sync forward or backward has nothing to do with auto sync, it applies in all cases; while the periodic sync *does* require auto sync).

The main point of contention, though, is that auto sync will now *always* attempt to setup network connectivity (i.e., on resume/suspend/close). Periodic sync will *not* though (the intent being that, if you use periodic sync, you're relying on the activity check to actually keep wifi on at all times)).

Since this may lead to a large amount of nagging about wifi toggles on devices w/ NetworkManager support, it is now *disabled* by default on those devices. (And given that it wouldn't have worked because of the lack of connectivity, that doesn't really make any practical difference ;p).

Additionally, given the fact that there's no way to make this behavior viable if the "before wifi" action is left at its default of "prompt", this feature now *requires* that to be set to "turn_on" (on devices where it can, of course); attempting to toggle it on will warn about that if necessary.
This change is retroactive (OTM).

Includes an assortment of fixes and cleanups, including migrating to the new LuaSettings API, which is why there's no longer a smattering of superfluous flushes.
2023-07-03 01:23:14 +02:00
NiLuJe
752f23c85e
Input: Be more through in resetState (#10612)
Drop the actual slot data storage, in addition to the active references
2023-07-02 22:54:14 +02:00
NiLuJe
5c8143d9ac SDL: Fix initial position & size
Also keep sdl_window in sync with enforced dimensions on the emu.
2023-06-29 14:33:23 +02:00
NiLuJe
55869b82cb
PowerD: Unbreak frontlight toggle notifications outside of Kobo (#10597)
Fix #10588
Regression since #10305

While we're there, rejig the FL toggle callback shenanigans so that implementation details don't leak through to *other* implementations.
(i.e., leave the Kobo mess in Kobo land, with only a minimal impact on the public API and its implementation).
2023-06-25 11:25:33 +02:00
Frans de Jonge
64f778d97d
PocketBook: add alternative definition for PB840 (#10582)
Cf. #10579.
2023-06-15 13:54:15 +02:00
Benoit Pierre
bb7ae20697
kindle: show require error trace (#10569) 2023-06-11 21:46:46 +02:00
zwim
1ce1fe1780
[plugin] AutoWarmth: Fix resume and frontlight issue (#10557)
Fixes a regression introduced in #10426, when suspending during night and resuming during daylight.
2023-06-09 20:56:46 +02:00
NiLuJe
2797a74a96
Kobo: Handle the newer Nia HW revision (#10520)
Fix #9590, closes #9591
2023-06-01 19:04:52 +02:00
yparitcher
8034858180 WakeupMgr: kinde: use a 90 sec proximity
sometimes my kindle fires the rtc alarm a tad too late so use a more generous timeout

the real fix would be to have validateWakeupAlarmByProximity return differently if the alarm is past or in the future, but i am too lazy
2023-05-28 10:03:19 -04:00
ElimGarak1
a18afc24b8
PB: Fix Inkpad 4 device id (#10481)
Turns out it's a lowercase G, and that matters ;).
2023-05-26 20:52:18 +02:00
roshavagarga
d54c5acc11
PB: Add Inkpad 4 (#10468)
Fix #10444
2023-05-21 01:24:27 +02:00
NiLuJe
7e98b9de4b
PM: Minor refactor to suspend/resume code flow (#10426)
Make sure we only send Suspend/Resume events when we *actually* suspend/resume. This is done via the Device `_beforeSuspend`/`_afterResume` methods, and those were called by the *input handlers*, not the PM logic; which means they would fire, while the PM logic could actually take a smarter decision and *not* do what the event just sent implied ;).

(i.e., sleep with a cover -> suspend + actual suspend, OK; but if you then resume with a button -> input assumes resume, but PM will actually suspend again!).

Existing design issue made more apparent by #9448 ;).

Also fixes/generalizes a few corner-cases related to screen_saver_lock handling (e.g., don't allow USBMS during a lock).

And deal with the fallout of the main change to the Kobo frontlight ramp behavior ;).
2023-05-18 23:13:43 +02:00
NiLuJe
fdea39c2d6
Input: Leave EV_SDL mostly alone in inhibitInput (#10430)
It's mostly not used for actual input, but sideband stuff that we don't want to miss.

Fix #10427
2023-05-13 20:43:23 +02:00
hrdl
552787db89
SDL: use render buffer size instead of window size (#10428)
Related to koreader/koreader-base#1610. Not sure if this is actually
needed, but for consistency the render buffer size should be used.
2023-05-12 18:12:11 +02:00
yparitcher
1102c030fa
Kindle: toggle cover events
Allow disabling the hall efect sensor via the sysfs knob, so the kindle system wont sleep & wake the device

for those of use that stay in koreader, are caseless and have get spurious wakeups
2023-05-03 10:26:35 -04:00
kpopconnoisseur
0533ec46d8
kindle voyage: no framework: whispertouch button activation
kindle: "no framework" voyage page turn buttons
kindle: update device tests
2023-05-02 21:59:33 -04:00
zwim
00b3594d44
Kobo: Refactor frontlight toggle ramp behavior (#10305)
* Rewrite the loop mechanism to use scheduled tasks instead of a single blocking-ish subprocess.
* Change the actual logic to be more pleasing to the eye, especially on newer devices, as those *may* natively ramp on set; and fix a bad interaction with that behavior that could lead to no ramp at all on ramp down.
* Simplify Generic's Suspend handling to deal with the refresh ordering in a saner manner. The screensaver might be visible a tad longer than before this change before the frontlight actually ramps off.
2023-04-30 23:28:30 +02:00
nairyo
65031ae14f
Dictionary lookup window: use from/to language to determine glyph form (#10184)
For example, to determine whether the Japanese or Chinese form should be shown.

* Dictionaries.lua - use iso3 codes everywhere
readerdictionary.lua - convert iso to bcp tag, to construct ifo_lang
isolanguage.lua - map from iso3 to full language name, map from iso3 to bcp language tag

* Make the full language names translatable

* Store ifo information from dictionaries.lua in downloaded dictionaries
2023-03-14 22:11:17 +01:00
NiLuJe
9f37863f00
rM: Handle input shenanigans on mainline kernels (#10168)
Add a dedicated handler to handle mixed pen + panel, when panel sends both mt + st and stylus only st
Don't stomp on panel slots in the Wacom protocol handler
Get rid of a few superfluous nil guards
Return early in the EV_KEY handler for touch-related events (i.e., BTN_)
2023-03-02 18:08:56 +01:00
NiLuJe
d0b78c01aa
Hotfix followup to #10139 (#10151)
Don't blow up if we fall back to exec'ing ping
Fix https://github.com/koreader/koreader/pull/10139#issuecomment-1437678458
2023-02-21 03:12:29 +01:00
NiLuJe
5330c24b77
Device: Handle network info data gathering ourselves (#10139)
i.e., we now query routes, interfaces, wireless extensions & ping ourselves, dropping the dependency on specific CLI tools altogether.
2023-02-21 00:46:19 +01:00
NiLuJe
203094d47d Device:retrieveNetworkInfo: Drop the "HWaddr" bit from the parsed output
i.e., just display "ifname MAC"
2023-02-18 02:28:58 +01:00
NiLuJe
6dc41fe02a Device:retrieveNetworkInfo: Make "Default gateway" translatable
re: #8739
2023-02-18 02:28:58 +01:00