Mailing List archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[vdr] PATCH: runtime configurable lirc parameters



Hi,

My brother requested runtime configurable lirc parameters "repeat
delay" and "key press delay" because different values feel better
with his remote. Maybe others are interested too, patch attached.

cu
Ludwig

-- 
(o_  Ludwig.Nussel@gmx.de
//\  PGP Key ID: FF8135CE
V_/_ ICQ:        52166811
diff -ruN vdr-1.2.5.orig/config.c vdr-1.2.5/config.c
--- vdr-1.2.5.orig/config.c	2003-09-17 23:10:41.000000000 +0200
+++ vdr-1.2.5/config.c	2003-09-17 23:15:07.000000000 +0200
@@ -263,6 +263,8 @@
   EPGBugfixLevel = 2;
   SVDRPTimeout = 300;
   ZapTimeout = 3;
+  LIRCRepeatDelay = 350;
+  LIRCKeyPressDelay = 150;
   SortTimers = 1;
   PrimaryLimit = 0;
   DefaultPriority = 50;
@@ -449,6 +451,8 @@
   else if (!strcasecmp(Name, "EPGBugfixLevel"))      EPGBugfixLevel     = atoi(Value);
   else if (!strcasecmp(Name, "SVDRPTimeout"))        SVDRPTimeout       = atoi(Value);
   else if (!strcasecmp(Name, "ZapTimeout"))          ZapTimeout         = atoi(Value);
+  else if (!strcasecmp(Name, "LIRCRepeatDelay"))     LIRCRepeatDelay    = atoi(Value);
+  else if (!strcasecmp(Name, "LIRCKeyPressDelay"))   LIRCKeyPressDelay  = atoi(Value);
   else if (!strcasecmp(Name, "SortTimers"))          SortTimers         = atoi(Value);
   else if (!strcasecmp(Name, "PrimaryLimit"))        PrimaryLimit       = atoi(Value);
   else if (!strcasecmp(Name, "DefaultPriority"))     DefaultPriority    = atoi(Value);
@@ -530,6 +534,8 @@
   Store("EPGScanTimeout",     EPGScanTimeout);
   Store("EPGBugfixLevel",     EPGBugfixLevel);
   Store("SVDRPTimeout",       SVDRPTimeout);
+  Store("LIRCRepeatDelay",    LIRCRepeatDelay);
+  Store("LIRCKeyPressDelay",  LIRCKeyPressDelay);
   Store("ZapTimeout",         ZapTimeout);
   Store("SortTimers",         SortTimers);
   Store("PrimaryLimit",       PrimaryLimit);
diff -ruN vdr-1.2.5.orig/config.h vdr-1.2.5/config.h
--- vdr-1.2.5.orig/config.h	2003-09-17 23:10:41.000000000 +0200
+++ vdr-1.2.5/config.h	2003-09-17 23:15:07.000000000 +0200
@@ -286,6 +286,8 @@
   int EPGBugfixLevel;
   int SVDRPTimeout;
   int ZapTimeout;
+  int LIRCRepeatDelay;
+  int LIRCKeyPressDelay;
   int SortTimers;
   int PrimaryLimit;
   int DefaultPriority, DefaultLifetime;
diff -ruN vdr-1.2.5.orig/lirc.c vdr-1.2.5/lirc.c
--- vdr-1.2.5.orig/lirc.c	2003-04-27 13:39:47.000000000 +0200
+++ vdr-1.2.5/lirc.c	2003-09-17 23:15:07.000000000 +0200
@@ -14,9 +14,8 @@
 #include <sys/socket.h>
 #include <sys/un.h>
 
-#define REPEATLIMIT  20 // ms
-#define REPEATDELAY 350 // ms
-#define KEYPRESSDELAY 150 // ms
+#define REPEATDELAY Setup.LIRCRepeatDelay // ms
+#define KEYPRESSDELAY Setup.LIRCKeyPressDelay // ms
 
 cLircRemote::cLircRemote(char *DeviceName)
 :cRemote("LIRC")
diff -ruN vdr-1.2.5.orig/menu.c vdr-1.2.5/menu.c
--- vdr-1.2.5.orig/menu.c	2003-09-17 23:10:41.000000000 +0200
+++ vdr-1.2.5/menu.c	2003-09-17 23:15:07.000000000 +0200
@@ -2764,6 +2764,8 @@
   Add(new cMenuEditIntItem( tr("Setup.Miscellaneous$Min. user inactivity (min)"), &data.MinUserInactivity));
   Add(new cMenuEditIntItem( tr("Setup.Miscellaneous$SVDRP timeout (s)"),          &data.SVDRPTimeout));
   Add(new cMenuEditIntItem( tr("Setup.Miscellaneous$Zap timeout (s)"),            &data.ZapTimeout));
+  Add(new cMenuEditIntItem( tr("Setup.Miscellaneous$LIRC repeat delay (ms)"),     &data.LIRCRepeatDelay));
+  Add(new cMenuEditIntItem( tr("Setup.Miscellaneous$LIRC key press delay (ms)"),  &data.LIRCKeyPressDelay));
 }
 
 // --- cMenuSetupPluginItem --------------------------------------------------

Attachment: pgp00003.pgp
Description: PGP signature


Home | Main Index | Thread Index