![]() |
#16 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 4,293
Karma: 529619
Join Date: May 2007
Device: iRex iLiad, DR800SG
|
What I'm thinking of is something like:
In settings.h Take the #define JumpWidth out and add it as an int in the CSettings class. Then in settings.cpp Add JumpWidth to the load/save routines for the manifest. Create a getJumpWidth() method that returns the value. In PDFPortraitView.cpp and PDFLandscapeView.cpp Change the references from JumpWidth to settings.getJumpWidth(). That would make controlling the behavior of the long press jump easier on the users (just modify the manifest on their iLiad), rather than having to install a specific binary version that is hard coded to the behavior they want. |
![]() |
![]() |
![]() |
#17 |
Computational Linguist
![]() ![]() Posts: 110
Karma: 100
Join Date: Feb 2009
Device: iLiad BE, iPhone, Kindle DX
|
Shaggy,
I do think your suggestion is a much better way of doing things than hard coding things. If no one else gets to it, I will give this a shot once my development environment is set up properly. Thanks! |
![]() |
![]() |
Advert | |
|
![]() |
#18 | |
JSR FFD2
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 305
Karma: 1045
Join Date: Aug 2008
Location: Rotterdam, Netherlands, Europe, Sol 3
Device: iliad
|
Hi DesiLinguist,
Quote:
h.t.h. Hansel. |
|
![]() |
![]() |
![]() |
#19 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 4,293
Karma: 529619
Join Date: May 2007
Device: iRex iLiad, DR800SG
|
Although, I think the manifest used is unique per book, not global. So you'd have to set the JumpWidth for each book. I don't know if that's a good thing or a bad thing??? Greater flexibility, but more of a pain to change it each time.
![]() There's probably a way of doing the same thing in a global config, but I'd have to look at it more to work out the details. |
![]() |
![]() |
![]() |
#20 |
Computational Linguist
![]() ![]() Posts: 110
Karma: 100
Join Date: Feb 2009
Device: iLiad BE, iPhone, Kindle DX
|
hansel, thank you so much for that pointer! This is what I was looking for
![]() BTW, I am guessing this setup would only work on a linux system, right? Which distro are you using? I am on a Mac so I will probably set up the same distro on virtualbox. Thanks again. |
![]() |
![]() |
Advert | |
|
![]() |
#21 |
JSR FFD2
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 305
Karma: 1045
Join Date: Aug 2008
Location: Rotterdam, Netherlands, Europe, Sol 3
Device: iliad
|
|
![]() |
![]() |
![]() |
#22 |
Member
![]() Posts: 10
Karma: 14
Join Date: Dec 2008
Location: China
Device: irex iliad
|
If you want, you can try my touch version ipdfhttps://www.mobileread.com/forums/sho...462#post338462, it won't have problem with stylus touch when flip page.
|
![]() |
![]() |
![]() |
#23 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 4,293
Karma: 529619
Join Date: May 2007
Device: iRex iLiad, DR800SG
|
FYI,
An iRex developer recently posted on their forum that they already have a patch available for the iLiad that disables the "long jump" feature, essentially making all page turns a 1 page jump. He said that you can contact their tech support via the website and request the patch. |
![]() |
![]() |
![]() |
#24 |
Fanatic
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 557
Karma: 400004
Join Date: Feb 2009
Device: ONYX M96
|
|
![]() |
![]() |
![]() |
#25 |
JSR FFD2
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 305
Karma: 1045
Join Date: Aug 2008
Location: Rotterdam, Netherlands, Europe, Sol 3
Device: iliad
|
It is probably enough to change button.c for contenLister:
http://iliad.hpelbers.org/irexdox/co...6e2d2304e0e51f
Code:
... 00783 00784 case PAGETURN_FORWARD: 00785 CL_LOGPRINTF("PAGETURN_FORWARD"); 00786 gdk_threads_enter(); 00787 pm_SendKey(GDK_Page_Down); 00788 gdk_threads_leave(); 00789 break; 00790 00791 case PAGETURN_FORWARD | BUTTON_LONG_PRESS: 00792 CL_LOGPRINTF("PAGETURN_FORWARD LONG"); 00793 gdk_threads_enter(); 00794 pm_SendKey(GDK_F1); 00795 gdk_threads_leave(); 00796 break; 00797 00798 case PAGETURN_BACK: 00799 CL_LOGPRINTF("PAGETURN_BACK"); 00800 gdk_threads_enter(); 00801 pm_SendKey(GDK_Page_Up); 00802 gdk_threads_leave(); 00803 break; 00804 00805 case PAGETURN_BACK | BUTTON_LONG_PRESS: 00806 CL_LOGPRINTF("PAGETURN_BACK LONG"); 00807 gdk_threads_enter(); 00808 pm_SendKey(GDK_F2); 00809 gdk_threads_leave(); 00810 break; 00811 00812 case OVERVIEW: ... |
![]() |
![]() |
![]() |
#26 | |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 4,293
Karma: 529619
Join Date: May 2007
Device: iRex iLiad, DR800SG
|
Quote:
|
|
![]() |
![]() |
![]() |
#27 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 4,293
Karma: 529619
Join Date: May 2007
Device: iRex iLiad, DR800SG
|
I assume that's the way iRex did it in their patch. This method disables it entirely, rather than making it user configurable. That's probably why they only offer it as a user requested patch, rather than a global update.
|
![]() |
![]() |
![]() |
#28 | |
"Assume a can opener..."
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 755
Karma: 1942109
Join Date: Mar 2008
Location: Local Cluster
Device: iLiad v2, DR1000
|
Quote:
Last edited by zerospinboson; 03-02-2010 at 03:46 AM. |
|
![]() |
![]() |
![]() |
#29 |
Connoisseur
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 84
Karma: 1110
Join Date: Aug 2009
Location: Netherlands
Device: iRex iLiad v2
|
Instant buttons
I've been playing with the sources a few months ago and the way I changed it was as follows (code below):
For buttons that don't have a (useful) long press it instantly sends the key (instead of waiting for key_up) So now I can hold the flipbar for ages and the nextpage changes as fast as the screen & software are able too. The only thing I notice is that sometimes the flipbar wont register at all. I suspect that that's when it used to jump 5 pages instead of 1. Since this is probably related with the kb-driver I'm not gonna try to fix that since it doesn't bother me. The function of button.c (contentlister) which I changed: Code:
static void *buttonStateMachine(void *arg) { int button; struct timespec times; struct timeval timev; enum { buttonReleased, buttonPressed } state = buttonReleased; button = -1; while (1) { CL_LOGPRINTF("smthread: start of loop, state %d", state); switch (state) { case buttonReleased: pthread_mutex_lock(&buttonCondMutex); CL_LOGPRINTF("smthread: waiting for press"); pthread_cond_wait(&buttonCond, &buttonCondMutex); if (protectedButton == 0xFF) { CL_LOGPRINTF("smthread: release in released"); pthread_mutex_unlock(&buttonCondMutex); } else { CL_LOGPRINTF("smthread: press in released"); button = protectedButton; state = buttonPressed; pthread_mutex_unlock(&buttonCondMutex); } break; case buttonPressed: pthread_mutex_lock(&buttonCondMutex); // get current time, and add BUTTON_LONG_PRESS_TIMEOUT ms // a timeval -> timespec conversion is needed (nanosec to microsec) // ------------- Instant Buttons ---------------- if ( (button != MODE) && (button != OVERVIEW) && (button != CONNECT) && (button != POWER) ) { pthread_mutex_unlock(&buttonCondMutex); CL_LOGPRINTF("smthread: short flipbar button handler"); button_handler(button, arg); // short flipbar button = -1; state = buttonReleased; } else { // ------------- Regular buttons ----------------- gettimeofday(&timev, NULL); times.tv_sec = timev.tv_sec + g_timoutValue.tv_sec; times.tv_nsec = (timev.tv_usec * 1000) + g_timoutValue.tv_nsec; if (times.tv_nsec >= 1000000000) { times.tv_nsec -= 1000000000; times.tv_sec += 1; } CL_LOGPRINTF("smthread: timed waiting for release"); if (pthread_cond_timedwait(&buttonCond, &buttonCondMutex, ×) == ETIMEDOUT) { CL_LOGPRINTF("smthread: timeout in pressed"); pthread_mutex_unlock(&buttonCondMutex); if (button >= 0 && button < NUM_BUTTONS) { CL_LOGPRINTF("smthread: long button handler"); button_handler(button | BUTTON_LONG_PRESS, arg); // long } button = -1; state = buttonReleased; } else { if (protectedButton == 0xFF) { CL_LOGPRINTF("smthread: release in pressed"); state = buttonReleased; pthread_mutex_unlock(&buttonCondMutex); if (button >= 0 && button < NUM_BUTTONS) { CL_LOGPRINTF("smthread: short button handler"); button_handler(button, arg); // short } button = -1; } else { CL_LOGPRINTF("smthread: press in pressed"); button = protectedButton; pthread_mutex_unlock(&buttonCondMutex); } } } // from instant flipbar break; } } pthread_exit(NULL); } |
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
DR800 Strange flipbar behavior | penartur | iRex | 8 | 08-05-2010 09:17 PM |
multiple page turns when pressing flipbar | bazmi | iRex | 27 | 06-14-2009 01:19 PM |
Flipbar Poll | axel77 | iRex | 17 | 04-25-2008 09:12 PM |
Iliad flipbar landscape use/price/hanlin | johngreen99 | iRex | 4 | 03-09-2008 06:56 AM |
Flipbar question | JWLaRue | iRex | 9 | 03-09-2008 12:09 AM |