Mailing List archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[vdr] Re: LIRC problem - remote too sensible
Hallo List,
Rainer wrote :
> >> I just added a simple strcmp between last and new lirc-command and
> >> if the time is too short between two identical commands, the current
> >> one is skipped.
Thanks to Rainer Rosin and Steffen Schlette (per PM) the problem was solved
:)
I changed the patch from Rainer a bit so that it now is possible to get a
better result if you want to be able to faster repeatedly press a key.
For that I introduced KEYPRESSDELAY (maybe someone kan find a better name).
KEYPRESSDELAY sets the minimum time between two key presses (releasing the
key inbetween) so that unwanted repeats are dropped. I have good results
with 150 ms as it drops unwanted repeats but maintans good movement in the
menus.
@Klaus
with a KEYPRESSDELAY of 0 or 1 lirc.c maintains the previous functionallity
so it would be nice if you could add this to the VDR Sources :)
Greetings
Christian
Patch for VDR 1.1.27 :
--- lirc.c.ORG Tue Apr 15 10:23:23 2003
+++ lirc.c Tue Apr 15 10:26:29 2003
@@ -16,6 +16,7 @@
#define REPEATLIMIT 20 // ms
#define REPEATDELAY 350 // ms
+#define KEYPRESSDELAY 150 // ms
cLircRemote::cLircRemote(char *DeviceName)
:cRemote("LIRC")
@@ -76,6 +77,12 @@
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)
+ {
+ if (Now - FirstTime < KEYPRESSDELAY)
+ //Too fast key skipped...
+ continue;
+ }
if (repeat)
Put(LastKeyName, false, true);
strcpy(LastKeyName, KeyName);
--
Info:
To unsubscribe send a mail to listar@linuxtv.org with "unsubscribe vdr" as subject.
Home |
Main Index |
Thread Index