mirror of
https://github.com/VDR4Arch/vdr.git
synced 2023-10-10 13:36:52 +02:00
Fixed repeat function in LIRC remote control
This commit is contained in:
parent
1c81b279ee
commit
bb03fa2a0c
1
HISTORY
1
HISTORY
@ -378,3 +378,4 @@ Video Disk Recorder Revision History
|
|||||||
- The EPG scanner now scans each transponder only once per cycle.
|
- The EPG scanner now scans each transponder only once per cycle.
|
||||||
- Deleted recordings are now automatically removed from disk after a while (not
|
- Deleted recordings are now automatically removed from disk after a while (not
|
||||||
only when disk space is being needed for a new recording).
|
only when disk space is being needed for a new recording).
|
||||||
|
- Fixed repeat function in LIRC remote control.
|
||||||
|
12
remote.c
12
remote.c
@ -6,7 +6,7 @@
|
|||||||
*
|
*
|
||||||
* Ported to LIRC by Carsten Koch <Carsten.Koch@icem.de> 2000-06-16.
|
* 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"
|
#include "remote.h"
|
||||||
@ -428,6 +428,7 @@ void cRcIoLIRC::Action(void)
|
|||||||
dsyslog(LOG_INFO, "LIRC remote control thread started (pid=%d)", getpid());
|
dsyslog(LOG_INFO, "LIRC remote control thread started (pid=%d)", getpid());
|
||||||
|
|
||||||
int FirstTime = 0;
|
int FirstTime = 0;
|
||||||
|
int LastTime = 0;
|
||||||
char buf[LIRC_BUFFER_SIZE];
|
char buf[LIRC_BUFFER_SIZE];
|
||||||
char LastKeyName[LIRC_KEY_BUF];
|
char LastKeyName[LIRC_KEY_BUF];
|
||||||
|
|
||||||
@ -451,14 +452,17 @@ void cRcIoLIRC::Action(void)
|
|||||||
continue; // repeat function kicks in after a short delay
|
continue; // repeat function kicks in after a short delay
|
||||||
receivedData = receivedRepeat = true;
|
receivedData = receivedRepeat = true;
|
||||||
}
|
}
|
||||||
|
LastTime = Now;
|
||||||
WakeUp();
|
WakeUp();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (receivedData) { // the last data before releasing the key hasn't been fetched yet
|
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
|
if (receivedRepeat) { // it was a repeat, so let's make it a release
|
||||||
receivedRepeat = false;
|
if (time_ms() - LastTime > REPEATDELAY) {
|
||||||
receivedRelease = true;
|
receivedRepeat = false;
|
||||||
WakeUp();
|
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
|
else if (receivedRepeat) { // all data has already been fetched, but the last one was a repeat, so let's generate a release
|
||||||
|
Loading…
Reference in New Issue
Block a user