diff options
author | Klaus Schmidinger <vdr@tvdr.de> | 2013-01-30 13:03:00 +0100 |
---|---|---|
committer | Klaus Schmidinger <vdr@tvdr.de> | 2013-01-30 13:03:00 +0100 |
commit | d95804fec37c778db08b724d409665eabf20138a (patch) | |
tree | f8fe54d2707107d7ea37a1c2bfaeeec9605f08fa /lirc.c | |
parent | 7fa0d338ebf6c5ff5b9a5b08d8e6cdf819a1f931 (diff) | |
download | vdr-d95804fec37c778db08b724d409665eabf20138a.tar.gz vdr-d95804fec37c778db08b724d409665eabf20138a.tar.bz2 |
Improved LIRC timing for repeat function
Diffstat (limited to 'lirc.c')
-rw-r--r-- | lirc.c | 16 |
1 files changed, 8 insertions, 8 deletions
@@ -6,16 +6,16 @@ * * LIRC support added by Carsten Koch <Carsten.Koch@icem.de> 2000-06-16. * - * $Id: lirc.c 2.1 2011/03/08 15:35:13 kls Exp $ + * $Id: lirc.c 2.2 2013/01/30 11:56:38 kls Exp $ */ #include "lirc.h" #include <netinet/in.h> #include <sys/socket.h> -#define REPEATDELAY 350 // ms +#define REPEATDELAY 300 // ms #define REPEATFREQ 100 // ms -#define REPEATTIMEOUT 500 // ms +#define REPEATTIMEOUT 150 // ms #define RECONNECTDELAY 3000 // ms cLircRemote::cLircRemote(const char *DeviceName) @@ -104,13 +104,13 @@ void cLircRemote::Action(void) FirstTime.Set(); timeout = -1; } + else if (FirstTime.Elapsed() < REPEATDELAY) + continue; // repeat function kicks in after a short delay + else if (LastTime.Elapsed() < REPEATFREQ) + continue; // skip same keys coming in too fast else { - if (LastTime.Elapsed() < REPEATFREQ) - continue; // repeat function kicks in after a short delay (after last key instead of first key) - if (FirstTime.Elapsed() < REPEATDELAY) - continue; // skip keys coming in too fast (for count != 0 as well) repeat = true; - timeout = REPEATDELAY; + timeout = REPEATTIMEOUT; } LastTime.Set(); Put(KeyName, repeat); |