Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Software > KOReader

Notices

Reply
 
Thread Tools Search this Thread
Old 04-13-2023, 06:31 AM   #541
kaznelson
Old Kaz
kaznelson ought to be getting tired of karma fortunes by now.kaznelson ought to be getting tired of karma fortunes by now.kaznelson ought to be getting tired of karma fortunes by now.kaznelson ought to be getting tired of karma fortunes by now.kaznelson ought to be getting tired of karma fortunes by now.kaznelson ought to be getting tired of karma fortunes by now.kaznelson ought to be getting tired of karma fortunes by now.kaznelson ought to be getting tired of karma fortunes by now.kaznelson ought to be getting tired of karma fortunes by now.kaznelson ought to be getting tired of karma fortunes by now.kaznelson ought to be getting tired of karma fortunes by now.
 
kaznelson's Avatar
 
Posts: 208
Karma: 1064151
Join Date: May 2010
Device: PocketBook Era
Quote:
Originally Posted by NiLuJe View Post
Are we talking the angle at which point horizontal becomes a diagonal? I would assume 45°
In any case, hope you like trig: https://github.com/koreader/koreader....lua#L307-L337
I made these sectors: 15°*2 for vertical swipe, 15° for diagonal swipe, and 60°*2 for horizontal swipe.
Please tell me, is it possible to do this with user patch?

Spoiler:
Code:
--[[--
Compares `current_tev` with `initial_tev`.

The first boolean argument `simple` results in only four directions if true.

@return (direction, distance) pan direction and distance
--]]
function Contact:getPath(simple, diagonal, initial_tev)
    initial_tev = initial_tev or self.initial_tev

    local x_diff = self.current_tev.x - initial_tev.x
    local y_diff = self.current_tev.y - initial_tev.y
    local direction = nil
    local distance = math.sqrt(x_diff*x_diff + y_diff*y_diff)
    if x_diff ~= 0 or y_diff ~= 0 then
        local v_direction = y_diff < 0 and "north" or "south"
        local h_direction = x_diff < 0 and "west" or "east"
        if (not simple
            and math.abs(y_diff) > 1.732*math.abs(x_diff)
            and math.abs(y_diff) < 3.732*math.abs(x_diff))
           or (simple and diagonal)
        then
            direction = v_direction .. h_direction
        elseif (math.abs(x_diff) > 0.577*math.abs(y_diff)) then
            direction = h_direction
        else
            direction = v_direction
        end
    end
    return direction, distance
end

Last edited by kaznelson; 04-13-2023 at 07:02 AM.
kaznelson is offline   Reply With Quote
Old 04-13-2023, 04:48 PM   #542
NiLuJe
BLAM!
NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.
 
NiLuJe's Avatar
 
Posts: 13,494
Karma: 26047188
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW, PW2, PW5; Kobo H2O, Forma, Elipsa, Sage, C2E
You'll have to ask someone actually fluent in trigonometry, that's not me .
NiLuJe is offline   Reply With Quote
Advert
Old 04-14-2023, 03:45 AM   #543
kaznelson
Old Kaz
kaznelson ought to be getting tired of karma fortunes by now.kaznelson ought to be getting tired of karma fortunes by now.kaznelson ought to be getting tired of karma fortunes by now.kaznelson ought to be getting tired of karma fortunes by now.kaznelson ought to be getting tired of karma fortunes by now.kaznelson ought to be getting tired of karma fortunes by now.kaznelson ought to be getting tired of karma fortunes by now.kaznelson ought to be getting tired of karma fortunes by now.kaznelson ought to be getting tired of karma fortunes by now.kaznelson ought to be getting tired of karma fortunes by now.kaznelson ought to be getting tired of karma fortunes by now.
 
kaznelson's Avatar
 
Posts: 208
Karma: 1064151
Join Date: May 2010
Device: PocketBook Era
Quote:
Originally Posted by NiLuJe View Post
You'll have to ask someone actually fluent in trigonometry, that's not me
Trigonometry? I understand her... a little
But I don't know how to make a user-patch...
Code:
...
        if (not simple
            and math.abs(y_diff) > 1.732*math.abs(x_diff)  <===
            and math.abs(y_diff) < 3.732*math.abs(x_diff)) <===
           or (simple and diagonal)
        then
            direction = v_direction .. h_direction
        elseif (math.abs(x_diff) > 0.577*math.abs(y_diff)) then <===
            direction = h_direction
...
kaznelson is offline   Reply With Quote
Old 04-14-2023, 01:18 PM   #544
NiLuJe
BLAM!
NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.
 
NiLuJe's Avatar
 
Posts: 13,494
Karma: 26047188
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW, PW2, PW5; Kobo H2O, Forma, Elipsa, Sage, C2E
See https://github.com/koreader/koreader/wiki/User-patches

You'll basically just want to replace the whole function with your tweaked variant.
NiLuJe is offline   Reply With Quote
Old 04-14-2023, 05:27 PM   #545
NiLuJe
BLAM!
NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.
 
NiLuJe's Avatar
 
Posts: 13,494
Karma: 26047188
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW, PW2, PW5; Kobo H2O, Forma, Elipsa, Sage, C2E
I'd forgotten a key implementation detail that would have made a patch require some fun low-level Lua shenanigans, and @poire-z caught it and went the extra mile: https://github.com/koreader/koreader...ent-1509160619 .
NiLuJe is offline   Reply With Quote
Advert
Old 04-15-2023, 06:05 AM   #546
kaznelson
Old Kaz
kaznelson ought to be getting tired of karma fortunes by now.kaznelson ought to be getting tired of karma fortunes by now.kaznelson ought to be getting tired of karma fortunes by now.kaznelson ought to be getting tired of karma fortunes by now.kaznelson ought to be getting tired of karma fortunes by now.kaznelson ought to be getting tired of karma fortunes by now.kaznelson ought to be getting tired of karma fortunes by now.kaznelson ought to be getting tired of karma fortunes by now.kaznelson ought to be getting tired of karma fortunes by now.kaznelson ought to be getting tired of karma fortunes by now.kaznelson ought to be getting tired of karma fortunes by now.
 
kaznelson's Avatar
 
Posts: 208
Karma: 1064151
Join Date: May 2010
Device: PocketBook Era
NiLuJe
Thanks, it works!
https://github.com/koreader/koreader...ent-1509696330
kaznelson is offline   Reply With Quote
Old 05-02-2023, 10:17 AM   #547
kaznelson
Old Kaz
kaznelson ought to be getting tired of karma fortunes by now.kaznelson ought to be getting tired of karma fortunes by now.kaznelson ought to be getting tired of karma fortunes by now.kaznelson ought to be getting tired of karma fortunes by now.kaznelson ought to be getting tired of karma fortunes by now.kaznelson ought to be getting tired of karma fortunes by now.kaznelson ought to be getting tired of karma fortunes by now.kaznelson ought to be getting tired of karma fortunes by now.kaznelson ought to be getting tired of karma fortunes by now.kaznelson ought to be getting tired of karma fortunes by now.kaznelson ought to be getting tired of karma fortunes by now.
 
kaznelson's Avatar
 
Posts: 208
Karma: 1064151
Join Date: May 2010
Device: PocketBook Era
Minimum swipe distance

Please tell me about paging: in which lua-file can I increase the minimum swipe distance?
When I hold the e-book by the bottom edge with my thumb and flip through the pages not with the tip, but with tap the entire phalanx of my finger - and such a tap is regularly perceived by KOReader as a back-swipe (or a call to bottom menu, also assigned to a swipe)...
Attached Thumbnails
Click image for larger version

Name:	last-phalanx-of-thumb.jpg
Views:	115
Size:	18.1 KB
ID:	201367  

Last edited by kaznelson; 05-02-2023 at 01:23 PM. Reason: add picture.
kaznelson is offline   Reply With Quote
Old 05-02-2023, 01:22 PM   #548
NiLuJe
BLAM!
NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.
 
NiLuJe's Avatar
 
Posts: 13,494
Karma: 26047188
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW, PW2, PW5; Kobo H2O, Forma, Elipsa, Sage, C2E
I'd first double-check how your input device is actually reporting that, as it's not uncommon for some to do completely wonky shit if they're not designed to deal with that properly (which, on Linux, would be reporting a single touch event with auxiliary info indicating a larger oval shape for the contact) .

But to answer your actual question: https://github.com/koreader/koreader...ector.lua#L117

Last edited by NiLuJe; 05-02-2023 at 01:24 PM.
NiLuJe is offline   Reply With Quote
Old 05-02-2023, 01:47 PM   #549
kaznelson
Old Kaz
kaznelson ought to be getting tired of karma fortunes by now.kaznelson ought to be getting tired of karma fortunes by now.kaznelson ought to be getting tired of karma fortunes by now.kaznelson ought to be getting tired of karma fortunes by now.kaznelson ought to be getting tired of karma fortunes by now.kaznelson ought to be getting tired of karma fortunes by now.kaznelson ought to be getting tired of karma fortunes by now.kaznelson ought to be getting tired of karma fortunes by now.kaznelson ought to be getting tired of karma fortunes by now.kaznelson ought to be getting tired of karma fortunes by now.kaznelson ought to be getting tired of karma fortunes by now.
 
kaznelson's Avatar
 
Posts: 208
Karma: 1064151
Join Date: May 2010
Device: PocketBook Era
Thanks, I'll try experimenting with this value!

Problem with PocketBook's is that when touch-screen goes to sleep, touches on the screen are not perceived well - gesture must be very explicit. Quick and "weightless" gestures are usually perceived as a simple tap; while a single, but "smeared" tap - like a swipe.
My finger touches the screen gradually, from left to right - this is probably what confuses the e-book...
kaznelson is offline   Reply With Quote
Old 05-03-2023, 02:17 AM   #550
kaznelson
Old Kaz
kaznelson ought to be getting tired of karma fortunes by now.kaznelson ought to be getting tired of karma fortunes by now.kaznelson ought to be getting tired of karma fortunes by now.kaznelson ought to be getting tired of karma fortunes by now.kaznelson ought to be getting tired of karma fortunes by now.kaznelson ought to be getting tired of karma fortunes by now.kaznelson ought to be getting tired of karma fortunes by now.kaznelson ought to be getting tired of karma fortunes by now.kaznelson ought to be getting tired of karma fortunes by now.kaznelson ought to be getting tired of karma fortunes by now.kaznelson ought to be getting tired of karma fortunes by now.
 
kaznelson's Avatar
 
Posts: 208
Karma: 1064151
Join Date: May 2010
Device: PocketBook Era
user-patch

Quote:
Originally Posted by NiLuJe View Post
But to answer your actual question: https://github.com/koreader/koreader...ector.lua#L117

And how to change the swipe distance with a user-patch? It doesn't work:
Code:
local GestureDetector = require("device/gesturedetector")

GestureDetector.init = function()
    self.PAN_THRESHOLD = self.screen:scaleByDPI(70)
end

Last edited by kaznelson; 05-03-2023 at 02:20 AM. Reason: quote.
kaznelson is offline   Reply With Quote
Old 05-03-2023, 12:44 PM   #551
NiLuJe
BLAM!
NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.
 
NiLuJe's Avatar
 
Posts: 13,494
Karma: 26047188
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW, PW2, PW5; Kobo H2O, Forma, Elipsa, Sage, C2E
Don't overwrite `GestureDetector.init`, just `GestureDetector.PAN_THRESHOLD` .

(And if you need access to Screen, either go at it via Device, or via `GestureDetector.screen`. All the input classes are singletons).

(And in a patch with a prefix >= 2, IIRC).
NiLuJe is offline   Reply With Quote
Old 05-04-2023, 07:48 AM   #552
kaznelson
Old Kaz
kaznelson ought to be getting tired of karma fortunes by now.kaznelson ought to be getting tired of karma fortunes by now.kaznelson ought to be getting tired of karma fortunes by now.kaznelson ought to be getting tired of karma fortunes by now.kaznelson ought to be getting tired of karma fortunes by now.kaznelson ought to be getting tired of karma fortunes by now.kaznelson ought to be getting tired of karma fortunes by now.kaznelson ought to be getting tired of karma fortunes by now.kaznelson ought to be getting tired of karma fortunes by now.kaznelson ought to be getting tired of karma fortunes by now.kaznelson ought to be getting tired of karma fortunes by now.
 
kaznelson's Avatar
 
Posts: 208
Karma: 1064151
Join Date: May 2010
Device: PocketBook Era
Quote:
Originally Posted by NiLuJe View Post
Don't overwrite `GestureDetector.init`, just `GestureDetector.PAN_THRESHOLD`
Also doesn't work:
Code:
local GestureDetector = require("device/gesturedetector")
GestureDetector.PAN_THRESHOLD = GestureDetector.screen:scaleByDPI(70)
Thank you anyway.
It's too difficult for me, I'll edit `gesturedetector.lua` directly...
kaznelson is offline   Reply With Quote
Old 06-09-2023, 09:55 AM   #553
Michal Jancik
Sorry for my English
Michal Jancik ought to be getting tired of karma fortunes by now.Michal Jancik ought to be getting tired of karma fortunes by now.Michal Jancik ought to be getting tired of karma fortunes by now.Michal Jancik ought to be getting tired of karma fortunes by now.Michal Jancik ought to be getting tired of karma fortunes by now.Michal Jancik ought to be getting tired of karma fortunes by now.Michal Jancik ought to be getting tired of karma fortunes by now.Michal Jancik ought to be getting tired of karma fortunes by now.Michal Jancik ought to be getting tired of karma fortunes by now.Michal Jancik ought to be getting tired of karma fortunes by now.Michal Jancik ought to be getting tired of karma fortunes by now.
 
Michal Jancik's Avatar
 
Posts: 463
Karma: 3009894
Join Date: Aug 2018
Location: France.Besancon
Device: KOBO.PocketBook.ONYX
Wow! I am really surprised how reactive and fast my pocketbook is after the last update!

I don't know what changes have taken place, but after the last update I see a big acceleration both in menu navigation and in various settings.

Device on which I use Koreader: Pocketbook Inkapd 3 (V740)
The acceleration is so great that it has reached the level of reactivity on the same level as the significantly more powerful "Tolino Vision 6" device.

I thank the developers for the work done, really bravo guys..
thanks to this new version, using my Pocketbook (which is not exactly one of the fastest) will be more pleasant.

Last edited by Michal Jancik; 06-09-2023 at 09:57 AM.
Michal Jancik is offline   Reply With Quote
Old 08-01-2023, 03:09 AM   #554
conquerli
Member
conquerli began at the beginning.
 
Posts: 23
Karma: 10
Join Date: Jul 2023
Device: PocketBook InkPad Color PB742
My device is Pocketbook InkPad Color (PB742) with the OS is Android.
Should I follow this thread or thread for android?

Tks.
conquerli is offline   Reply With Quote
Old 08-01-2023, 04:44 PM   #555
pazos
cosiñeiro
pazos ought to be getting tired of karma fortunes by now.pazos ought to be getting tired of karma fortunes by now.pazos ought to be getting tired of karma fortunes by now.pazos ought to be getting tired of karma fortunes by now.pazos ought to be getting tired of karma fortunes by now.pazos ought to be getting tired of karma fortunes by now.pazos ought to be getting tired of karma fortunes by now.pazos ought to be getting tired of karma fortunes by now.pazos ought to be getting tired of karma fortunes by now.pazos ought to be getting tired of karma fortunes by now.pazos ought to be getting tired of karma fortunes by now.
 
Posts: 1,318
Karma: 2200073
Join Date: Apr 2014
Device: BQ Cervantes 4
Quote:
Originally Posted by conquerli View Post
My device is Pocketbook InkPad Color (PB742) with the OS is Android.
Should I follow this thread or thread for android?

Tks.
The android thread and the android install instructions -> https://github.com/koreader/koreader...ndroid-devices
pazos is offline   Reply With Quote
Reply

Tags
calibre, epub, koreader, pb742, pdf, pocketbook

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
KOReader: a document reader for PDF, DJVU, EPUB, FB2, HTML, ... (GPLv3) hawhill Kindle Developer's Corner 1268 02-27-2024 11:49 AM
CBZ plugin interaction with FB2/DjVu plugins - First try at pinpointing MrWarper iRex 2 12-11-2011 05:46 AM
Raccoon Reader - reads ePub, fb2, fb2.zip, txt on WP7 for free Andrei_Shvydryk Reading and Management 0 10-31-2011 03:17 PM
v3 vs. v3+ as a pdf/DjVu reader hedonism_bot HanLin eBook 7 11-02-2010 08:16 PM
New PDF to LRF Tool (for DJVU and CBZ files too) RWood Sony Reader 0 08-29-2007 02:13 PM


All times are GMT -4. The time now is 06:54 AM.


MobileRead.com is a privately owned, operated and funded community.