summaryrefslogtreecommitdiff
path: root/lirc.c
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2013-02-03 15:58:46 +0100
committerKlaus Schmidinger <vdr@tvdr.de>2013-02-03 15:58:46 +0100
commitb16437e7848218025986e87eb972b742dd7c958b (patch)
treeaada4c5ff2d00e3e8e1c1b225af23fcbbf1a2d87 /lirc.c
parent1bad5d1e6f5a9fbbc09081f07f5b4d9d780fe5db (diff)
downloadvdr-b16437e7848218025986e87eb972b742dd7c958b.tar.gz
vdr-b16437e7848218025986e87eb972b742dd7c958b.tar.bz2
New options 'Setup/Miscellaneous/Remote control repeat delay' and 'Setup/Miscellaneous/Remote control repeat delta'
Diffstat (limited to 'lirc.c')
-rw-r--r--lirc.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/lirc.c b/lirc.c
index d9bcd66b..42f07406 100644
--- a/lirc.c
+++ b/lirc.c
@@ -6,15 +6,13 @@
*
* LIRC support added by Carsten Koch <Carsten.Koch@icem.de> 2000-06-16.
*
- * $Id: lirc.c 2.3 2013/01/31 12:13:39 kls Exp $
+ * $Id: lirc.c 2.4 2013/02/03 11:23:18 kls Exp $
*/
#include "lirc.h"
#include <netinet/in.h>
#include <sys/socket.h>
-#define REPEATDELAY 300 // ms
-#define REPEATFREQ 100 // ms
#define RECONNECTDELAY 3000 // ms
cLircRemote::cLircRemote(const char *DeviceName)
@@ -98,7 +96,7 @@ void cLircRemote::Action(void)
int Delta = ThisTime.Elapsed(); // the time between two subsequent LIRC events
ThisTime.Set();
if (count == 0) {
- if (strcmp(KeyName, LastKeyName) == 0 && FirstTime.Elapsed() < REPEATDELAY)
+ if (strcmp(KeyName, LastKeyName) == 0 && FirstTime.Elapsed() < (uint)Setup.RcRepeatDelay)
continue; // skip keys coming in too fast
if (repeat)
Put(LastKeyName, false, true);
@@ -108,9 +106,9 @@ void cLircRemote::Action(void)
FirstTime.Set();
timeout = -1;
}
- else if (FirstTime.Elapsed() < REPEATDELAY)
+ else if (FirstTime.Elapsed() < (uint)Setup.RcRepeatDelay)
continue; // repeat function kicks in after a short delay
- else if (LastTime.Elapsed() < REPEATFREQ)
+ else if (LastTime.Elapsed() < (uint)Setup.RcRepeatDelta)
continue; // skip same keys coming in too fast
else {
repeat = true;