diff options
author | Klaus Schmidinger <vdr@tvdr.de> | 2001-02-04 19:19:07 +0100 |
---|---|---|
committer | Klaus Schmidinger <vdr@tvdr.de> | 2001-02-04 19:19:07 +0100 |
commit | bb03fa2a0ca2ef13f58abbea98f50ddc9291f1a5 (patch) | |
tree | acb0cc17c2b07ce6560c0dbd7d5ba3b4e538f4a7 /remote.c | |
parent | 1c81b279eed647bbe938a2e89a66ce6e0d3d2121 (diff) | |
download | vdr-bb03fa2a0ca2ef13f58abbea98f50ddc9291f1a5.tar.gz vdr-bb03fa2a0ca2ef13f58abbea98f50ddc9291f1a5.tar.bz2 |
Fixed repeat function in LIRC remote control
Diffstat (limited to 'remote.c')
-rw-r--r-- | remote.c | 12 |
1 files changed, 8 insertions, 4 deletions
@@ -6,7 +6,7 @@ * * Ported to LIRC by Carsten Koch <Carsten.Koch@icem.de> 2000-06-16. * - * $Id: remote.c 1.20 2000/12/03 11:55:06 kls Exp $ + * $Id: remote.c 1.21 2001/02/04 19:17:59 kls Exp $ */ #include "remote.h" @@ -428,6 +428,7 @@ void cRcIoLIRC::Action(void) dsyslog(LOG_INFO, "LIRC remote control thread started (pid=%d)", getpid()); int FirstTime = 0; + int LastTime = 0; char buf[LIRC_BUFFER_SIZE]; char LastKeyName[LIRC_KEY_BUF]; @@ -451,14 +452,17 @@ void cRcIoLIRC::Action(void) continue; // repeat function kicks in after a short delay receivedData = receivedRepeat = true; } + LastTime = Now; WakeUp(); } } else if (receivedData) { // the last data before releasing the key hasn't been fetched yet if (receivedRepeat) { // it was a repeat, so let's make it a release - receivedRepeat = false; - receivedRelease = true; - WakeUp(); + if (time_ms() - LastTime > REPEATDELAY) { + receivedRepeat = false; + receivedRelease = true; + WakeUp(); + } } } else if (receivedRepeat) { // all data has already been fetched, but the last one was a repeat, so let's generate a release |