diff options
-rw-r--r-- | README | 17 | ||||
-rw-r--r-- | display.c | 8 | ||||
-rw-r--r-- | display.h | 1 | ||||
-rw-r--r-- | plugin.c | 46 |
4 files changed, 71 insertions, 1 deletions
@@ -187,6 +187,23 @@ Scroll time interval: (Possible values: 100 <= x <= 2000) +SVDRP Commands: +--------------- +svdrpsend.pl "PLUG graphlcd <CMD>", where CMD is: + +ON + Switch Plugin on + +OFF + Switch Plugin off + +UPD + Update LCD Content, Plugin must be active. + +CLS + Clear LCD Content (aka blank screen), Plugin must not be active. + + Changing Fonts: --------------- It's very easy to change the fonts that are used by graphlcd. @@ -732,6 +732,13 @@ void cGraphLCDDisplay::Update() update = true; } +void cGraphLCDDisplay::Clear() +{ + bitmap->Clear(); + mLcd->SetScreen(bitmap->Data(), bitmap->Width(), bitmap->Height(), bitmap->LineSize()); + mLcd->Refresh(false); +} + void cGraphLCDDisplay::DisplayTime() { static char buffer[32]; @@ -2022,3 +2029,4 @@ const char * cGraphLCDDisplay::Convert(const char *s) return s_converted; } + @@ -65,6 +65,7 @@ public: void SetVolume(int Volume, bool Absolute); void Update(); + void Clear(); protected: virtual void Action(); @@ -22,7 +22,7 @@ #include <vdr/plugin.h> -static const char *VERSION = "0.1.9-pre (git 2010/11)"; +static const char *VERSION = "0.1.9-pre (git 20110101)"; static const char *DESCRIPTION = "Output to graphic LCD"; static const char *MAINMENUENTRY = NULL; @@ -52,6 +52,8 @@ public: virtual cOsdObject * MainMenuAction(); virtual cMenuSetupPage * SetupMenu(); virtual bool SetupParse(const char * Name, const char * Value); + virtual const char **SVDRPHelpPages(void); + virtual cString SVDRPCommand(const char *Command, const char *Option, int &ReplyCode); }; cPluginGraphLCD::cPluginGraphLCD() @@ -240,4 +242,46 @@ bool cPluginGraphLCD::SetupParse(const char * Name, const char * Value) return true; } +const char **cPluginGraphLCD::SVDRPHelpPages(void) +{ + static const char *HelpPages[] = { + "CLS Clear Display.", + "UPD Update Display.", + "OFF Switch Plugin off.", + "ON Switch Plugin on.", + NULL + }; + return HelpPages; +} + +cString cPluginGraphLCD::SVDRPCommand(const char *Command, const char *Option, int &ReplyCode) +{ + if (strcasecmp(Command, "CLS") == 0) { + if (GraphLCDSetup.PluginActive == 1) { + return "Error: Plugin is active."; + } else { + mDisplay->Clear(); + return "GraphLCD cleared."; + }; + } + if (strcasecmp(Command, "UPD") == 0) { + if (GraphLCDSetup.PluginActive == 0) { + return "Error: Plugin is not active."; + } else { + mDisplay->Update(); + return "GraphLCD updated."; + }; + } + + if (strcasecmp(Command, "OFF") == 0) { + GraphLCDSetup.PluginActive = 0; + return "GraphLCD Plugin switched off."; + } + if (strcasecmp(Command, "ON") == 0) { + GraphLCDSetup.PluginActive = 1; + return "GraphLCD Plugin switched on."; + } + return NULL; +} + VDRPLUGINCREATOR(cPluginGraphLCD); // Don't touch this! |