summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CONTRIBUTORS3
-rw-r--r--HISTORY1
-rw-r--r--lirc.c5
3 files changed, 8 insertions, 1 deletions
diff --git a/CONTRIBUTORS b/CONTRIBUTORS
index 1c08be39..1a29cda7 100644
--- a/CONTRIBUTORS
+++ b/CONTRIBUTORS
@@ -609,3 +609,6 @@ Manuel Hartl <icecep@gmx.net>
Benjamin Harling <benjamin.harling@web.de>
for suggesting to add a note regarding non-VDR files in the /videoX directories to
INSTALL
+
+Christian Jacobsen <christian.jacobsen@stageholding.de>
+ for making the LIRC interface skip keys that come in too fast
diff --git a/HISTORY b/HISTORY
index 49fa95cc..acadbb5b 100644
--- a/HISTORY
+++ b/HISTORY
@@ -2076,3 +2076,4 @@ Video Disk Recorder Revision History
start/stop time and the file name (suggested by Manuel Hartl).
- Added a note regarding non-VDR files in the /videoX directories to INSTALL
(suggested by Benjamin Harling).
+- Skipping keys that come in too fast from LIRC (thanks to Christian Jacobsen).
diff --git a/lirc.c b/lirc.c
index 571e88c4..0774cf81 100644
--- a/lirc.c
+++ b/lirc.c
@@ -6,7 +6,7 @@
*
* LIRC support added by Carsten Koch <Carsten.Koch@icem.de> 2000-06-16.
*
- * $Id: lirc.c 1.5 2003/04/25 13:45:15 kls Exp $
+ * $Id: lirc.c 1.6 2003/04/27 11:39:47 kls Exp $
*/
#include "lirc.h"
@@ -16,6 +16,7 @@
#define REPEATLIMIT 20 // ms
#define REPEATDELAY 350 // ms
+#define KEYPRESSDELAY 150 // ms
cLircRemote::cLircRemote(char *DeviceName)
:cRemote("LIRC")
@@ -77,6 +78,8 @@ void cLircRemote::Action(void)
sscanf(buf, "%*x %x %29s", &count, KeyName); // '29' in '%29s' is LIRC_KEY_BUF-1!
int Now = time_ms();
if (count == 0) {
+ if (strcmp(KeyName, LastKeyName) == 0 && Now - FirstTime < KEYPRESSDELAY)
+ continue; // skip keys coming in too fast
if (repeat)
Put(LastKeyName, false, true);
strcpy(LastKeyName, KeyName);