From 2b15337b71d71c5e486efe738a507b550bb28843 Mon Sep 17 00:00:00 2001 From: Klaus Schmidinger Date: Sun, 8 Dec 2002 18:00:00 +0100 Subject: Version 1.1.19 - The character '|' in description texts of EPG records is now interpreted as a newline character (suggested by Gerhard Steiner). - Updated 'channels.conf.cable' (thanks to Andreas Kool). - Improved handling of repeated remote keys. - The RCU now only sets the channel number display when there are no incoming remote control keys, which improves reaction on repeated keys. - The actual tuning is now done in a separate thread, which makes zapping through the channels a lot faster and no longer gets stuck on channels that don't broadcast. This also makes "Motor-DiSEqC" work (thanks to Reinhard Walter Buchner for his help in testing this). Since switching channels now no longer explicitly waits for a channel lock in the foreground thread, the "panic level" mechanism is no longer used (maybe we don't need it any more, anyway). - The keyboard is now by default always active to control VDR. The 'make' option REMOTE=KBD is therefore obsolete. When compiling VDR with REMOTE=RCU or REMOTE=LIRC, the keyboard can thus now be active together with the remote control. If you want to build VDR _without_ keyboard support you can set NO_KBD=1 in the 'make' call. Since the keyboard codes are now different from the ones used previously (which were mapped by the 'ncurses' library) you will need to go through the "Learning keys" procedure again. To do so, either delete the file /video/remote.conf or remove the KBD.* entries from it before starting this version of VDR. (Thanks to Thomas Sailer for pointing out how to set the terminal parameters to read from the keyboard). - The 'ncurses' library is now only necessary when compiling VDR with DEBUG_OSD=1. --- rcu.c | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) (limited to 'rcu.c') diff --git a/rcu.c b/rcu.c index 6345bea..4157c0d 100644 --- a/rcu.c +++ b/rcu.c @@ -4,7 +4,7 @@ * See the main source file 'vdr.c' for copyright information and * how to reach the author. * - * $Id: rcu.c 1.2 2002/10/06 15:49:03 kls Exp $ + * $Id: rcu.c 1.3 2002/12/07 12:22:40 kls Exp $ */ #include "rcu.h" @@ -22,6 +22,7 @@ cRcuRemote::cRcuRemote(char *DeviceName) dp = 0; mode = modeB; code = 0; + numberToSend = -1; lastNumber = 0; receivedCommand = false; if ((f = open(DeviceName, O_RDWR | O_NONBLOCK)) >= 0) { @@ -136,8 +137,13 @@ void cRcuRemote::Action(void) repeat = false; LastCommand = 0; } - else + else { LastCommand = 0; + if (numberToSend >= 0) { + Number(numberToSend); + numberToSend = -1; + } + } if (code && time(NULL) - LastCodeRefresh > 60) { SendCommand(code); // in case the PIC listens to the wrong code LastCodeRefresh = time(NULL); @@ -302,8 +308,10 @@ bool cRcuRemote::DetectCode(unsigned char *Code) void cRcuRemote::ChannelSwitch(const cDevice *Device, int ChannelNumber) { - if (ChannelNumber && Device->IsPrimaryDevice()) - Number(ChannelNumber); + if (ChannelNumber && Device->IsPrimaryDevice()) { + LOCK_THREAD; + numberToSend = ChannelNumber; + } } void cRcuRemote::Recording(const cDevice *Device, const char *Name) -- cgit v1.2.3