lcd4l: introduce getInstance()

Origin commit data
------------------
Commit: a1bb64a4d2
Author: vanhofen <vanhofen@gmx.de>
Date: 2021-06-13 (Sun, 13 Jun 2021)

Origin message was:
------------------
- lcd4l: introduce getInstance()
This commit is contained in:
vanhofen
2021-06-13 23:28:24 +02:00
parent 6433d541eb
commit 63d81bbee3
9 changed files with 28 additions and 34 deletions

View File

@@ -49,7 +49,6 @@
#ifdef ENABLE_LCD4LINUX
#include "driver/lcd4l.h"
extern CLCD4l *LCD4l;
#endif
/* the following generic menu items are integrated into multiple menus at the same time */
@@ -255,7 +254,7 @@ void CMenuItem::paintItemCaption(const bool select_mode, const char * right_text
#endif
#ifdef ENABLE_LCD4LINUX
if (g_settings.lcd4l_support)
LCD4l->CreateFile("/tmp/lcd/menu", lcd_text, g_settings.lcd4l_convert);
CLCD4l::getInstance()->CreateFile("/tmp/lcd/menu", lcd_text, g_settings.lcd4l_convert);
#endif
}
@@ -1030,7 +1029,7 @@ int CMenuWidget::exec(CMenuTarget* parent, const std::string &)
cGLCD::unlockChannel();
#endif
#ifdef ENABLE_LCD4LINUX
LCD4l->RemoveFile("/tmp/lcd/menu");
CLCD4l::getInstance()->RemoveFile("/tmp/lcd/menu");
#endif
//exec this item...
@@ -1052,7 +1051,7 @@ int CMenuWidget::exec(CMenuTarget* parent, const std::string &)
#endif
#ifdef ENABLE_LCD4LINUX
if (g_settings.lcd4l_support)
LCD4l->CreateFile("/tmp/lcd/menu", item->lcd_text, g_settings.lcd4l_convert);
CLCD4l::getInstance()->CreateFile("/tmp/lcd/menu", item->lcd_text, g_settings.lcd4l_convert);
#endif
switch ( rv ) {
@@ -1143,7 +1142,7 @@ int CMenuWidget::exec(CMenuTarget* parent, const std::string &)
cGLCD::unlockChannel();
#endif
#ifdef ENABLE_LCD4LINUX
LCD4l->RemoveFile("/tmp/lcd/menu");
CLCD4l::getInstance()->RemoveFile("/tmp/lcd/menu");
#endif
for (unsigned int count = 0; count < items.size(); count++)