diff options
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); |