View unanswered posts    View active topics

All times are UTC - 6 hours





Post new topic Reply to topic  [ 21 posts ] 
Go to page Previous  1, 2

Print view Previous topic   Next topic  
Author Message
Search for:
 Post subject:
PostPosted: Wed Jul 04, 2007 12:30 am 
Offline
Joined: Fri Jul 21, 2006 11:12 pm
Posts: 1194
Location: SC
You are right I did -pl by accident. However using -p1 gives me this:
Code:
patching file daemons/hw_hiddev.c
Hunk #1 FAILED at 172.
Hunk #2 FAILED at 199.
2 out of 2 hunks FAILED -- saving rejects to file daemons/hw_hiddev.c.rej

The hw_hiddev.c.reg contains:
Code:
***************
*** 172,177 ****
         /* Remotec Mediamaster specific */
         static int wheel_count = 0;
         static int x_movement = 0;
         int y_movement=0;
         int x_direction=0;
         int y_direction=0;
--- 172,178 ----
         /* Remotec Mediamaster specific */
         static int wheel_count = 0;
         static int x_movement = 0;
+        static struct timeval time_of_last_code;
         int y_movement=0;
         int x_direction=0;
         int y_direction=0;
***************
*** 198,205 ****
          *
          */
         if (event.hid == 0x10046) {
                 repeat_flag = (main_code & dvico_repeat_mask);
                 main_code = (main_code & ~dvico_repeat_mask);
                 return decode_all(remotes);
  #if 0
                 /* the following code could be used to recreate the
--- 199,228 ----
          *
          */
         if (event.hid == 0x10046) {
+                struct timeval now;
                 repeat_flag = (main_code & dvico_repeat_mask);
                 main_code = (main_code & ~dvico_repeat_mask);
+
+                gettimeofday (&now, NULL);
+
+                /* The hardware dongle for the dvico remote sends spurious */
+                /* repeats of the last code received it it gets a false    */
+                /* trigger from some other IR source, or if it misses      */
+                /* receiving the first code of a new button press. To      */
+                /* minimise the impact of this hardware bug, ignore any    */
+                /* repeats that occur more than half a second after the    */
+                /* previous valid code because it is likely that they are  */
+                /* spurious.                                               */
+
+                if (repeat_flag)
+                {
+                  if (((now.tv_sec - time_of_last_code.tv_sec) +
+                       (1.0e-6 * (now.tv_usec - time_of_last_code.tv_usec))) >
+                      0.5)
+                    return NULL;
+                }
+
+                time_of_last_code = now;
                 return decode_all(remotes);
  #if 0
                 /* the following code could be used to recreate the


I know it is probably something stupid I am doing.

Britney


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jul 04, 2007 1:00 am 
Offline
Joined: Mon May 10, 2004 8:08 pm
Posts: 1891
Location: Adelaide, Australia
Try again starting from scratch. Otherwise, it may be a white space formatting issue or something crazy like that in the patch file you have created. Perhaps if you send me your email address I can send you the patch file as an attachment. The other alternative is just to edit the daemons/hw_hiddev.c file yourself and add the lines from the patch manually. The lines beginning with a + need to be added (without adding the +) in the context in which you see them.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jul 04, 2007 9:01 am 
Offline
Joined: Fri Jul 21, 2006 11:12 pm
Posts: 1194
Location: SC
Greg,

You are correct it was a whitespace issue of some kind. Using the patch file you sent worked great.

This fix seems to have fixed the issue of repeats for me.

Thanks for your work on this Greg! This has been an annoyance to me for the last 6 months.

Britney


Top
 Profile  
 
 Post subject:
PostPosted: Tue Sep 11, 2007 6:25 am 
Offline
Joined: Mon May 10, 2004 8:08 pm
Posts: 1891
Location: Adelaide, Australia
My patch has been committed to lirc CVS.

Quote:
Revision 5.14 - (view) (download) (annotate) - [select for diffs]
Sun Sep 9 14:31:01 2007 UTC (45 hours, 49 minutes ago) by lirc
Branch: MAIN
CVS Tags: HEAD
Changes since 5.13: +22 -0 lines
Diff to previous 5.13

fix spurious repeats (hardware bug)


Top
 Profile  
 
 Post subject:
PostPosted: Tue Sep 11, 2007 3:25 pm 
Offline
Joined: Fri Jul 21, 2006 11:12 pm
Posts: 1194
Location: SC
This patch made it into R5F27 correct?

Britney


Top
 Profile  
 
 Post subject:
PostPosted: Tue Sep 11, 2007 3:48 pm 
Offline
Joined: Mon May 10, 2004 8:08 pm
Posts: 1891
Location: Adelaide, Australia
I'm not running F27 yet. I was just making the point that it is in CVS now, so once knoppmyth moves up to a newer version of lirc, the patch will be included automatically without the need for cesman to remember to apply it as a knoppmyth tweak.

Cesman did include the patch in the testers release I am using. It's easy to check if it is in F27 simply by holding your hand in front of the remote while holding a button and then taking your hand away.


Top
 Profile  
 

Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 21 posts ] 
Go to page Previous  1, 2



All times are UTC - 6 hours




Who is online

Users browsing this forum: No registered users and 5 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
Powered by phpBB® Forum Software © phpBB Group

Theme Created By ceyhansuyu