summaryrefslogtreecommitdiff
path: root/lirc.c
diff options
context:
space:
mode:
authorKlaus Schmidinger <kls (at) cadsoft (dot) de>2006-05-28 18:00:00 +0200
committerKlaus Schmidinger <kls (at) cadsoft (dot) de>2006-05-28 18:00:00 +0200
commit177b875945e5898ebc07d79527e0ddc5e4e0f93d (patch)
tree2227730ee8d6e28c918b8fdb59f8c4a680ed12d0 /lirc.c
parent5d8e3b18dc610e2696606092ba66e1477eccce88 (diff)
downloadvdr-patch-lnbsharing-177b875945e5898ebc07d79527e0ddc5e4e0f93d.tar.gz
vdr-patch-lnbsharing-177b875945e5898ebc07d79527e0ddc5e4e0f93d.tar.bz2
Version 1.4.0-2vdr-1.4.0-2
- Removed leftover LSMOD=... line from 'runvdr'. - Modified the Makefile to copy additional libraries a plugin might provide (suggested by Wayne Keer). See PLUGINS.html for details. - Fixed handling Transfer Mode when replaying Dolby Digital audio and the option '-a' was given (based on a patch from Werner Fink). To avoid having to increment the API version, several #if checks have been introduced around this. These will be removed once the API version actually needs to be incremented. - Fixed deleting the 'skinDescriptions' in cMenuSetupOSD::~cMenuSetupOSD() (thanks to Tobias Grimm). - Fixed calculating the start time of repeated timers with "first day" (thanks to Udo Richter). - Now setting a timer's cached start time to 0 after a call to Skip() (thanks to Udo Richter). - Fixed handling the running status of EPG events in case the "Schedule" menu is currently open (i.e. a write lock on the schedules data can't be achieved). - Fixed handling VPS timers in case the EPG event hasn't been 'seen' in a while. - Fixed calculating the cache size in cUnbufferedFile::Read() (thanks to Artur Skawina). - Removed -fPIC from VDR's and libsi's Makefile (suggested by Prakash Punnoor). - Modifed the device selection to better handle timer conflicts (reported by Christian Wieninger). - Avoiding a compiler warning in libsi's TypeLoop::operator[]. - Now processing the "frequency list descriptor" (based on a patch from Anssi Hannula). - Improved the repeat function for LIRC remote controls (thanks to Joerg Riechardt). - Fixed moving channels, which sometimes stopped the current replay session (reported by Mirko Dölle). - Fixed deleting channels in case the current channel's number changes (reported by Mirko Dölle).
Diffstat (limited to 'lirc.c')
-rw-r--r--lirc.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/lirc.c b/lirc.c
index 9bb8328..c4838b1 100644
--- a/lirc.c
+++ b/lirc.c
@@ -6,16 +6,16 @@
*
* LIRC support added by Carsten Koch <Carsten.Koch@icem.de> 2000-06-16.
*
- * $Id: lirc.c 1.14 2006/01/27 15:59:47 kls Exp $
+ * $Id: lirc.c 1.15 2006/05/28 08:48:13 kls Exp $
*/
#include "lirc.h"
#include <netinet/in.h>
#include <sys/socket.h>
-#define REPEATLIMIT 20 // ms
#define REPEATDELAY 350 // ms
-#define KEYPRESSDELAY 150 // ms
+#define REPEATFREQ 100 // ms
+#define REPEATTIMEOUT 500 // ms
#define RECONNECTDELAY 3000 // ms
cLircRemote::cLircRemote(const char *DeviceName)
@@ -94,7 +94,7 @@ void cLircRemote::Action(void)
continue;
}
if (count == 0) {
- if (strcmp(KeyName, LastKeyName) == 0 && FirstTime.Elapsed() < KEYPRESSDELAY)
+ if (strcmp(KeyName, LastKeyName) == 0 && FirstTime.Elapsed() < REPEATDELAY)
continue; // skip keys coming in too fast
if (repeat)
Put(LastKeyName, false, true);
@@ -104,8 +104,10 @@ void cLircRemote::Action(void)
timeout = -1;
}
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; // repeat function kicks in after a short delay
+ continue; // skip keys coming in too fast (for count != 0 as well)
repeat = true;
timeout = REPEATDELAY;
}
@@ -113,7 +115,7 @@ void cLircRemote::Action(void)
Put(KeyName, repeat);
}
else if (repeat) { // the last one was a repeat, so let's generate a release
- if (LastTime.Elapsed() >= REPEATDELAY) {
+ if (LastTime.Elapsed() >= REPEATTIMEOUT) {
Put(LastKeyName, false, true);
repeat = false;
*LastKeyName = 0;