07-30-2018, 07:43 PM | #16 | |
Guru
Posts: 859
Karma: 2676800
Join Date: Aug 2008
Location: Taranaki - NZ
Device: Kobo Aura H2O, Kobo Forma
|
Quote:
I was going to try and put something together myself, but hey, I'm not complaining! I do have access to a Glo in this household. Whether I want to risk messing mum's ereader up though is a slightly different matter... |
|
07-30-2018, 07:56 PM | #17 |
BLAM!
Posts: 13,480
Karma: 26012494
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW, PW2, PW5; Kobo H2O, Forma, Elipsa, Sage, C2E
|
I updated the attachment after trying it out in large print mode. Tweaked the thresholds to get something working in both modes (so far ).
That doesn't solve the issue of the touch protocol being potentially slightly different on different devices, but, hey, that was fun, at least . And that *can* be overcome with a bit of effort (we do it in KOReader, after all). EDIT: You can chuck stderr to the void if you just want the final result . Last edited by NiLuJe; 07-30-2018 at 07:59 PM. |
Advert | |
|
07-30-2018, 08:02 PM | #18 |
Guru
Posts: 859
Karma: 2676800
Join Date: Aug 2008
Location: Taranaki - NZ
Device: Kobo Aura H2O, Kobo Forma
|
Well, it works (of course) on my H2O.
We will probably need to refine the numbers somewhat to make it more generic hopefully, but the concept certainly seems valid. For example, for the button height, it might be better to measure it directly, rather than use an estimate percentage. And we probably need a wider range for the button width (15-20 percent?). Maybe I'll go take a screenshot of mum's Glo. |
07-30-2018, 08:14 PM | #19 |
Guru
Posts: 859
Karma: 2676800
Join Date: Aug 2008
Location: Taranaki - NZ
Device: Kobo Aura H2O, Kobo Forma
|
Alright, so the button width on the Glo is about 143px. That is approx 18.9% of the viewable width (758px). That's on FW 4.7.10413
|
07-30-2018, 08:21 PM | #20 |
BLAM!
Posts: 13,480
Karma: 26012494
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW, PW2, PW5; Kobo H2O, Forma, Elipsa, Sage, C2E
|
Oh, yeah, if you can post the screenshot, I can probably cobble something up .
EDIT: Another approach might also be to just scan the next N rows at the first hint of the two buttons, and then stopping if everything's okay, instead of finishing the complete loop and making a wild guesstimate at the end ^^. |
Advert | |
|
07-30-2018, 08:25 PM | #21 | |
Guru
Posts: 859
Karma: 2676800
Join Date: Aug 2008
Location: Taranaki - NZ
Device: Kobo Aura H2O, Kobo Forma
|
Quote:
As an aside, perhaps we should ask a mod to break out this conversation to a new, more relevant thread? Or we could just start a new one? |
|
07-30-2018, 08:27 PM | #22 |
Guru
Posts: 859
Karma: 2676800
Join Date: Aug 2008
Location: Taranaki - NZ
Device: Kobo Aura H2O, Kobo Forma
|
That's how I was originally thinking of doing it. No need to continue scanning if you are sure the buttons have been found.
|
07-30-2018, 10:17 PM | #23 |
BLAM!
Posts: 13,480
Karma: 26012494
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW, PW2, PW5; Kobo H2O, Forma, Elipsa, Sage, C2E
|
Done .
Breaks early on match, tweaked the (horizontal) match thresholds to be much more lenient (hopefully that should cover everyone), and tweaked a tiny bit the coordinates fudging for the button's center. 'early' is currently set at after .5% lines, which is between 6 and 8 lines, so we still have roughly that again of headroom if it's not strict enough . It's probably not terribly pretty (4AM brain), but it appears to work ^^. |
07-30-2018, 10:32 PM | #24 | |
Guru
Posts: 859
Karma: 2676800
Join Date: Aug 2008
Location: Taranaki - NZ
Device: Kobo Aura H2O, Kobo Forma
|
Quote:
I'm trying to figure out the touch protocol. More specifically, where the base coordinate is. My dump of a top-left tap is 48,1038 and top-right is 46,40. That indicates to me that 0,0 is top-right as far as the touchscreen is concerned. Is this correct? |
|
07-30-2018, 10:35 PM | #25 |
BLAM!
Posts: 13,480
Karma: 26012494
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW, PW2, PW5; Kobo H2O, Forma, Elipsa, Sage, C2E
|
@sherman: Quite possibly, they boot in landscape at whatever 90° CW or CCW that is, and the touch origin may not be rotated when Nickel fixes that on 32bpp FW (because that matches my experience on 16bpp FW where the fb isn't rotated either, fb origin was at the top-right instead of top-left...).
EDIT: I imagine that's what the touch_switch_xy/touch_mirrored_x shenanigans are for in KOReader. EDIT²: I'll tweak scan_button to output rotated coords, to check if you can use those directly... Last edited by NiLuJe; 07-30-2018 at 10:54 PM. |
07-30-2018, 10:49 PM | #26 |
BLAM!
Posts: 13,480
Karma: 26012494
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW, PW2, PW5; Kobo H2O, Forma, Elipsa, Sage, C2E
|
There, tweaked it .
After a quick glance at KOReader, it may be a tiny bit more annoying to make right everywhere, but if that works, I'm pretty sure I can cover at least everything except the Touch automatically (that one's a mess anyway, there are seven billion indistinguishable variants that behave differently). EDIT: H2O²r1 may also be a special snowflake. Last edited by NiLuJe; 07-30-2018 at 10:53 PM. |
07-30-2018, 10:53 PM | #27 |
Guru
Posts: 859
Karma: 2676800
Join Date: Aug 2008
Location: Taranaki - NZ
Device: Kobo Aura H2O, Kobo Forma
|
@NiLuJe I am in awe at what you've managed to come up with in a few hours.
And here I was earlier just idly musing if it might be an alright idea, and maybe I might give it a go within the next few days... |
07-30-2018, 10:58 PM | #28 |
BLAM!
Posts: 13,480
Karma: 26012494
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW, PW2, PW5; Kobo H2O, Forma, Elipsa, Sage, C2E
|
@sherman: Well, most of it meshes pretty well with stuff I've had to work on recently in FBInk, so, that was easier than it might otherwise have been .
Because that means the groundwork is there, for once, and, more importantly, how it all works is still fresh in my mind . |
07-31-2018, 04:41 PM | #29 |
BLAM!
Posts: 13,480
Karma: 26012494
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW, PW2, PW5; Kobo H2O, Forma, Elipsa, Sage, C2E
|
So far, so good...
Code:
Rotated: x=1029, y=582 Code:
hexdump -d /dev/input/event1 0000000 51428 23392 49334 00011 00003 00057 00001 00000 0000010 51428 23392 51142 00011 00003 00048 00001 00000 0000020 51428 23392 51174 00011 00003 00050 00001 00000 0000030 51428 23392 51192 00011 00003 00053 01030 00000 0000040 51428 23392 51203 00011 00003 00054 00595 00000 0000050 51428 23392 51215 00011 00000 00002 00000 00000 0000060 51428 23392 51223 00011 00000 00000 00000 00000 0000070 51428 23392 15473 00012 00003 00057 00001 00000 0000080 51428 23392 15757 00012 00003 00048 00000 00000 0000090 51428 23392 15774 00012 00003 00050 00000 00000 00000a0 51428 23392 15785 00012 00003 00053 01030 00000 00000b0 51428 23392 15796 00012 00003 00054 00595 00000 00000c0 51428 23392 15808 00012 00000 00002 00000 00000 00000d0 51428 23392 15818 00012 00000 00000 00000 00000 EDIT: Tweaked it to hopefully only output the appropriate coords automagically... EDIT²: And maybe do the right thing on 16bpp FW, although I may have a minor conversion/rounding error somewhere, because I get a slightly different button color... Last edited by NiLuJe; 07-31-2018 at 05:31 PM. |
07-31-2018, 05:54 PM | #30 |
Guru
Posts: 859
Karma: 2676800
Join Date: Aug 2008
Location: Taranaki - NZ
Device: Kobo Aura H2O, Kobo Forma
|
@NiLuJe I see you've been a busy person while I was asleep...
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Academics eye the Kobo Aura One, but need better PDF support. Letter to Kobo-ville | pinktank | Kobo Reader | 36 | 09-03-2016 04:05 PM |
Kobo H2O Question - [Post moved out of a thread and forum unrelated to Kobo] | Millie1366 | Kobo Reader | 10 | 03-20-2016 12:35 PM |
New Kobo User becomes burned EX-Kobo user aka KOBO is horrible | tvuongpham | Kobo Reader | 140 | 09-18-2015 08:42 AM |
Changing fonts issue on Kobo Aura HD/Kobo Glo [PROBLEM SOLVED] | Dr. Drib | Kobo Reader | 19 | 05-13-2014 04:35 PM |
[WIP] Samba share on the Kobo Glo (windows network share) | joris_ | Kobo Developer's Corner | 1 | 07-11-2013 12:44 PM |