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

@@ -174,7 +174,6 @@ CInfoIcons *InfoIcons;
#ifdef ENABLE_LCD4LINUX
#include "driver/lcd4l.h"
CLCD4l *LCD4l;
#endif
int allow_flash = 1;
@@ -3128,11 +3127,8 @@ TIMER_START();
SHTDCNT::getInstance()->init();
#ifdef ENABLE_LCD4LINUX
if (LCD4l == NULL)
LCD4l = new CLCD4l();
if (g_settings.lcd4l_support)
LCD4l->StartLCD4l();
CLCD4l::getInstance()->StartLCD4l();
#endif
CZapit::getInstance()->SetScanSDT(g_settings.enable_sdt);
@@ -5494,13 +5490,8 @@ void CNeutrinoApp::stopDaemonsForFlash()
#ifdef ENABLE_LCD4LINUX
void stop_lcd4l_support()
{
if(LCD4l) {
if(g_settings.lcd4l_support) {
LCD4l->StopLCD4l();
}
delete LCD4l;
}
LCD4l = NULL;
if (g_settings.lcd4l_support)
CLCD4l::getInstance()->StopLCD4l();
}
#endif