mirror of
https://github.com/VDR4Arch/vdr.git
synced 2023-10-10 13:36:52 +02:00
Improved LIRC timing for repeat function
This commit is contained in:
parent
7fa0d338eb
commit
d95804fec3
1
HISTORY
1
HISTORY
@ -7557,3 +7557,4 @@ Video Disk Recorder Revision History
|
||||
avoid a black screen while such a message is displayed in case the channel will be
|
||||
switched (reported by Uwe Scheffler).
|
||||
- Updated the Slovakian language texts (thanks to Milan Hrala).
|
||||
- Improved LIRC timing for repeat function.
|
||||
|
16
lirc.c
16
lirc.c
@ -6,16 +6,16 @@
|
||||
*
|
||||
* LIRC support added by Carsten Koch <Carsten.Koch@icem.de> 2000-06-16.
|
||||
*
|
||||
* $Id: lirc.c 2.1 2011/03/08 15:35:13 kls Exp $
|
||||
* $Id: lirc.c 2.2 2013/01/30 11:56:38 kls Exp $
|
||||
*/
|
||||
|
||||
#include "lirc.h"
|
||||
#include <netinet/in.h>
|
||||
#include <sys/socket.h>
|
||||
|
||||
#define REPEATDELAY 350 // ms
|
||||
#define REPEATDELAY 300 // ms
|
||||
#define REPEATFREQ 100 // ms
|
||||
#define REPEATTIMEOUT 500 // ms
|
||||
#define REPEATTIMEOUT 150 // ms
|
||||
#define RECONNECTDELAY 3000 // ms
|
||||
|
||||
cLircRemote::cLircRemote(const char *DeviceName)
|
||||
@ -104,13 +104,13 @@ void cLircRemote::Action(void)
|
||||
FirstTime.Set();
|
||||
timeout = -1;
|
||||
}
|
||||
else if (FirstTime.Elapsed() < REPEATDELAY)
|
||||
continue; // repeat function kicks in after a short delay
|
||||
else if (LastTime.Elapsed() < REPEATFREQ)
|
||||
continue; // skip same keys coming in too fast
|
||||
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; // skip keys coming in too fast (for count != 0 as well)
|
||||
repeat = true;
|
||||
timeout = REPEATDELAY;
|
||||
timeout = REPEATTIMEOUT;
|
||||
}
|
||||
LastTime.Set();
|
||||
Put(KeyName, repeat);
|
||||
|
Loading…
Reference in New Issue
Block a user