diff --git a/interface.c b/interface.c index a6b7e8f3..82f955dc 100644 --- a/interface.c +++ b/interface.c @@ -4,7 +4,7 @@ * See the main source file 'vdr.c' for copyright information and * how to reach the author. * - * $Id: interface.c 1.8 2000/05/06 15:24:18 kls Exp $ + * $Id: interface.c 1.9 2000/05/07 09:28:39 kls Exp $ */ #include "interface.h" @@ -336,6 +336,13 @@ void cInterface::DisplayChannel(int Number, const char *Name) } } +void cInterface::DisplayRecording(int Index, bool On) +{ +#ifndef DEBUG_REMOTE + RcIo.SetPoints(1 << Index, On); +#endif +} + bool cInterface::Recording(void) { // This is located here because the Interface has to do with the "PrimaryDvbApi" anyway diff --git a/interface.h b/interface.h index 9c47a44b..2a1c1560 100644 --- a/interface.h +++ b/interface.h @@ -4,7 +4,7 @@ * See the main source file 'vdr.c' for copyright information and * how to reach the author. * - * $Id: interface.h 1.8 2000/05/01 10:10:08 kls Exp $ + * $Id: interface.h 1.9 2000/05/06 15:39:23 kls Exp $ */ #ifndef __INTERFACE_H @@ -43,6 +43,7 @@ public: void Help(const char *Red, const char *Green = NULL, const char *Yellow = NULL, const char *Blue = NULL); void LearnKeys(void); void DisplayChannel(int Number, const char *Name = NULL); + void DisplayRecording(int Index, bool On); bool Recording(void); }; diff --git a/menu.c b/menu.c index 2d738445..b6e3adfc 100644 --- a/menu.c +++ b/menu.c @@ -4,7 +4,7 @@ * See the main source file 'vdr.c' for copyright information and * how to reach the author. * - * $Id: menu.c 1.13 2000/05/01 16:29:46 kls Exp $ + * $Id: menu.c 1.14 2000/05/06 15:43:57 kls Exp $ */ #include "menu.h" @@ -1056,12 +1056,14 @@ cRecordControl::cRecordControl(cDvbApi *DvbApi, cTimer *Timer) cChannel::SwitchTo(timer->channel - 1, dvbApi); cRecording Recording(timer); dvbApi->StartRecord(Recording.FileName()); + Interface.DisplayRecording(dvbApi->Index(), true); } cRecordControl::~cRecordControl() { Stop(true); delete instantId; + Interface.DisplayRecording(dvbApi->Index(), false); } void cRecordControl::Stop(bool KeepInstant) diff --git a/remote.c b/remote.c index 2ba5b22b..eb495e15 100644 --- a/remote.c +++ b/remote.c @@ -4,7 +4,7 @@ * See the main source file 'vdr.c' for copyright information and * how to reach the author. * - * $Id: remote.c 1.6 2000/04/24 09:45:56 kls Exp $ + * $Id: remote.c 1.7 2000/05/07 09:28:18 kls Exp $ */ #include "remote.h" @@ -29,6 +29,7 @@ cRcIo::cRcIo(char *DeviceName) t = 0; firstTime = lastTime = 0; lastCommand = 0; + lastNumber = 0; if ((f = open(DeviceName, O_RDWR | O_NONBLOCK)) >= 0) { struct termios t; if (tcgetattr(f, &t) == 0) { @@ -206,6 +207,7 @@ bool cRcIo::Number(int n, bool Hex) n = (n << 4) | ((*d - '0') & 0x0F); } } + lastNumber = n; for (int i = 0; i < 4; i++) { if (!Digit(i, n)) return false; @@ -231,6 +233,15 @@ bool cRcIo::String(char *s) return Number(n, true); } +void cRcIo::SetPoints(unsigned char Dp, bool On) +{ + if (On) + dp |= Dp; + else + dp &= ~Dp; + Number(lastNumber, true); +} + bool cRcIo::DetectCode(unsigned char *Code, unsigned short *Address) { // Caller should initialize 'Code' to 0 and call DetectCode() diff --git a/remote.h b/remote.h index 73e50eb7..1d0a1cce 100644 --- a/remote.h +++ b/remote.h @@ -4,7 +4,7 @@ * See the main source file 'vdr.c' for copyright information and * how to reach the author. * - * $Id: remote.h 1.4 2000/04/24 09:46:00 kls Exp $ + * $Id: remote.h 1.5 2000/05/07 09:27:54 kls Exp $ */ #ifndef __REMOTE_H @@ -21,10 +21,12 @@ private: time_t t; int firstTime, lastTime; unsigned int lastCommand; + int lastNumber; bool SendCommand(unsigned char Cmd); int ReceiveByte(bool Wait = true); bool SendByteHandshake(unsigned char c); bool SendByte(unsigned char c); + bool Digit(int n, int v); public: enum { modeH = 'h', modeB = 'b', modeS = 's' }; cRcIo(char *DeviceName); @@ -34,9 +36,8 @@ public: bool SetCode(unsigned char Code, unsigned short Address); bool SetMode(unsigned char Mode); bool GetCommand(unsigned int *Command, unsigned short *Address = NULL); - bool Digit(int n, int v); bool Number(int n, bool Hex = false); - void Points(unsigned char Dp) { dp = Dp; } + void SetPoints(unsigned char Dp, bool On); bool String(char *s); bool DetectCode(unsigned char *Code, unsigned short *Address); };