summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoranbr <vdr07@deltab.de>2010-10-23 19:36:36 +0200
committeranbr <vdr07@deltab.de>2010-10-23 19:36:36 +0200
commit6fd2d60c2accc3158fc02ab98e39059101bbf2f9 (patch)
tree4f47cad558fa889bb10761309a425fb9d1895fbc
parent73c4f15f7359e5bc97307a13e7970e9adb8e0406 (diff)
downloadvdr-plugin-imonlcd-6fd2d60c2accc3158fc02ab98e39059101bbf2f9.tar.gz
vdr-plugin-imonlcd-6fd2d60c2accc3158fc02ab98e39059101bbf2f9.tar.bz2
blank the device completely by svdrp off
-rw-r--r--imon.h5
-rw-r--r--imonlcd.c4
-rw-r--r--watch.c5
-rw-r--r--watch.h2
4 files changed, 8 insertions, 8 deletions
diff --git a/imon.h b/imon.h
index 7b77d28..14cff8d 100644
--- a/imon.h
+++ b/imon.h
@@ -1,7 +1,7 @@
/*
* iMON LCD plugin for VDR (C++)
*
- * (C) 2009 Andreas Brachold <vdr07 AT deltab de>
+ * (C) 2009-2010 Andreas Brachold <vdr07 AT deltab de>
*
* This iMON LCD plugin is free software: you can redistribute it and/or
* modify it under the terms of the GNU General Public License as published
@@ -116,12 +116,13 @@ protected:
bool SendCmdInit();
bool SendCmdShutdown();
bool Contrast(int nContrast);
+
+ void close();
public:
ciMonLCD();
virtual ~ciMonLCD();
virtual int open(const char* szDevice, eProtocol pro);
- virtual void close ();
bool isopen() const { return imon_fd >= 0; }
void clear ();
diff --git a/imonlcd.c b/imonlcd.c
index 79a7d20..f17686e 100644
--- a/imonlcd.c
+++ b/imonlcd.c
@@ -169,7 +169,7 @@ bool cPluginImonlcd::resume() {
bool cPluginImonlcd::suspend() {
if(!m_bSuspend) {
- m_dev.close();
+ m_dev.shutdown(eOnExitMode_BLANKSCREEN);
m_bSuspend = true;
return true;
}
@@ -195,7 +195,7 @@ void cPluginImonlcd::Stop(void)
statusMonitor = NULL;
}
- m_dev.close();
+ m_dev.shutdown(theSetup.m_nOnExit);
if(m_szDevice) {
free(m_szDevice);
diff --git a/watch.c b/watch.c
index 9e04d81..f56c391 100644
--- a/watch.c
+++ b/watch.c
@@ -78,7 +78,6 @@ ciMonWatch::ciMonWatch()
ciMonWatch::~ciMonWatch()
{
- close();
if(chName) {
delete chName;
chName = NULL;
@@ -131,7 +130,7 @@ int ciMonWatch::open(const char* szDevice, eProtocol pro) {
return iRet;
}
-void ciMonWatch::close() {
+void ciMonWatch::shutdown(int nExitMode) {
if(Running()) {
m_bShutdown = true;
@@ -142,7 +141,7 @@ void ciMonWatch::close() {
if(this->isopen()) {
cTimer* t = Timers.GetNextActiveTimer();
- switch(theSetup.m_nOnExit) {
+ switch(nExitMode) {
case eOnExitMode_NEXTTIMER: {
isyslog("iMonLCD: closing, show only next timer.");
this->setLineLength(0,0,0,0);
diff --git a/watch.h b/watch.h
index f84367a..54e3f5b 100644
--- a/watch.h
+++ b/watch.h
@@ -137,7 +137,7 @@ public:
virtual ~ciMonWatch();
virtual int open(const char* szDevice, eProtocol pro);
- virtual void close ();
+ virtual void shutdown(int nExitMode);
void Replaying(const cControl *pControl, const char *szName, const char *szFileName, bool bOn);
void Recording(const cDevice *pDevice, const char *szName, const char *szFileName, bool bOn);