From 6fd2d60c2accc3158fc02ab98e39059101bbf2f9 Mon Sep 17 00:00:00 2001 From: anbr Date: Sat, 23 Oct 2010 19:36:36 +0200 Subject: blank the device completely by svdrp off --- imon.h | 5 +++-- imonlcd.c | 4 ++-- watch.c | 5 ++--- watch.h | 2 +- 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 + * (C) 2009-2010 Andreas Brachold * * 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); -- cgit v1.2.3