update glcd

Origin commit data
------------------
Commit: 0c2dcc9eb1
Author: redblue.pkt <redblue.pkt@orange.pl>
Date: 2020-06-19 (Fri, 19 Jun 2020)
This commit is contained in:
redblue.pkt
2020-06-19 23:56:12 +02:00
committed by vanhofen
parent dc83674540
commit bf183a583a
118 changed files with 6113 additions and 1533 deletions

View File

@@ -75,6 +75,9 @@
#include "gui/favorites.h"
#include "gui/filebrowser.h"
#include "gui/followscreenings.h"
#ifdef ENABLE_GRAPHLCD
#include "gui/glcdthemes.h"
#endif
#include "gui/hdd_menu.h"
#include "gui/infoviewer.h"
#include "gui/mediaplayer.h"
@@ -359,6 +362,11 @@ int CNeutrinoApp::loadSetup(const char * fname)
g_settings.theme_name = configfile.getString("theme_name", !access(NEUTRINO_SETTINGS_FILE, F_OK) ? MIGRATE_THEME_NAME : "");
CThemes::getInstance()->getTheme(configfile);
#ifdef ENABLE_GRAPHLCD
g_settings.glcd_theme_name = configfile.getString("glcd_theme_name", !access(NEUTRINO_SETTINGS_FILE, F_OK) ? MIGRATE_THEME_OLED_NAME : "");
CGLCDThemes::getInstance()->getTheme(configfile);
#endif
//NI
g_settings.inetradio_autostart = configfile.getInt32("inetradio_autostart" , 0);
g_settings.lcd4l_support = configfile.getInt32("lcd4l_support" , 0);
@@ -685,27 +693,17 @@ int CNeutrinoApp::loadSetup(const char * fname)
#ifdef ENABLE_GRAPHLCD
g_settings.glcd_enable = configfile.getInt32("glcd_enable", 1);
g_settings.glcd_color_fg = configfile.getInt32("glcd_color_fg", GLCD::cColor::White);
g_settings.glcd_color_bg = configfile.getInt32("glcd_color_bg", GLCD::cColor::Black);
g_settings.glcd_color_bar = configfile.getInt32("glcd_color_bar", GLCD::cColor::Gray);
g_settings.glcd_percent_channel = configfile.getInt32("glcd_percent_channel", 22);
g_settings.glcd_percent_epg = configfile.getInt32("glcd_percent_epg", 16);
g_settings.glcd_percent_bar = configfile.getInt32("glcd_percent_bar", 8);
g_settings.glcd_percent_time = configfile.getInt32("glcd_percent_time", 35);
g_settings.glcd_percent_time_standby = configfile.getInt32("glcd_percent_time_standby", 50);
g_settings.glcd_percent_logo = configfile.getInt32("glcd_percent_logo", 50);
g_settings.glcd_time_in_standby = configfile.getInt32("glcd_time_in_standby", 1);
g_settings.glcd_standby_weather = configfile.getInt32("glcd_standby_weather", 1);
g_settings.glcd_mirror_osd = configfile.getInt32("glcd_mirror_osd", 0);
g_settings.glcd_mirror_video = configfile.getInt32("glcd_mirror_video", 0);
g_settings.glcd_time_in_standby = configfile.getInt32("glcd_time_in_standby", 1);
g_settings.glcd_show_logo = configfile.getInt32("glcd_show_logo", 1);
g_settings.glcd_font = configfile.getString("glcd_font", FONTDIR "/neutrino.ttf");
#if BOXMODEL_VUUNO4KSE
g_settings.glcd_brightness = configfile.getInt32("glcd_brightness", 25);
g_settings.glcd_brightness_standby = configfile.getInt32("glcd_brightness_standby", 5);
#else
g_settings.glcd_brightness = configfile.getInt32("glcd_brightness", 75);
g_settings.glcd_brightness_standby = configfile.getInt32("glcd_brightness_standby", 45);
#endif
g_settings.glcd_brightness = configfile.getInt32("glcd_brightness", GLCD_DEFAULT_BRIGHTNESS);
g_settings.glcd_brightness_dim = configfile.getInt32("glcd_brightness_dim", GLCD_DEFAULT_BRIGHTNESS_DIM);
g_settings.glcd_brightness_standby = configfile.getInt32("glcd_brightness_standby", GLCD_DEFAULT_BRIGHTNESS_STANDBY);
g_settings.glcd_brightness_dim_time = configfile.getString("glcd_brightness_dim_time", GLCD_DEFAULT_BRIGHTNESS_DIM_TIME);
#if BOXMODEL_VUUNO4KSE
g_settings.glcd_scroll_speed = configfile.getInt32("glcd_scroll_speed", 1);
#elif BOXMODEL_VUSOLO4K || BOXMODEL_VUDUO4K || BOXMODEL_VUULTIMO4K
@@ -713,7 +711,7 @@ int CNeutrinoApp::loadSetup(const char * fname)
#else
g_settings.glcd_scroll_speed = configfile.getInt32("glcd_scroll_speed", 5);
#endif
g_settings.glcd_selected_config = configfile.getInt32("glcd_selected_config", 0);
//g_settings.glcd_selected_config = configfile.getInt32("glcd_selected_config", 0);
#endif
//personalize
@@ -1069,6 +1067,7 @@ int CNeutrinoApp::loadSetup(const char * fname)
g_settings.weather_api_key = configfile.getString("weather_api_key", g_settings.weather_api_key.empty() ? "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" : g_settings.weather_api_key);
#endif
g_settings.weather_enabled = configfile.getInt32("weather_enabled", 1);
g_settings.weather_country = configfile.getInt32("weather_country", 0);
g_settings.weather_enabled = g_settings.weather_enabled && CApiKey::check_weather_api_key();
g_settings.weather_location = configfile.getString("weather_location", "52.52,13.40" );
@@ -1430,6 +1429,11 @@ void CNeutrinoApp::saveSetup(const char * fname)
CThemes::getInstance()->setTheme(configfile);
configfile.setString( "theme_name", g_settings.theme_name );
#ifdef ENABLE_GRAPHLCD
CGLCDThemes::getInstance()->setTheme(configfile);
configfile.setString( "glcd_theme_name", g_settings.glcd_theme_name );
#endif
//NI
configfile.setInt32("inetradio_autostart" , g_settings.inetradio_autostart);
configfile.setInt32("lcd4l_support" , g_settings.lcd4l_support);
@@ -1669,24 +1673,17 @@ void CNeutrinoApp::saveSetup(const char * fname)
#ifdef ENABLE_GRAPHLCD
configfile.setInt32("glcd_enable", g_settings.glcd_enable);
configfile.setInt32("glcd_color_fg", g_settings.glcd_color_fg);
configfile.setInt32("glcd_color_bg", g_settings.glcd_color_bg);
configfile.setInt32("glcd_color_bar", g_settings.glcd_color_bar);
configfile.setInt32("glcd_percent_channel", g_settings.glcd_percent_channel);
configfile.setInt32("glcd_percent_epg", g_settings.glcd_percent_epg);
configfile.setInt32("glcd_percent_bar", g_settings.glcd_percent_bar);
configfile.setInt32("glcd_percent_time", g_settings.glcd_percent_time);
configfile.setInt32("glcd_percent_time_standby", g_settings.glcd_percent_time_standby);
configfile.setInt32("glcd_percent_logo", g_settings.glcd_percent_logo);
configfile.setInt32("glcd_time_in_standby", g_settings.glcd_time_in_standby);
configfile.setInt32("glcd_standby_weather", g_settings.glcd_standby_weather);
configfile.setInt32("glcd_mirror_osd", g_settings.glcd_mirror_osd);
configfile.setInt32("glcd_mirror_video", g_settings.glcd_mirror_video);
configfile.setInt32("glcd_time_in_standby", g_settings.glcd_time_in_standby);
configfile.setInt32("glcd_show_logo", g_settings.glcd_show_logo);
configfile.setString("glcd_font", g_settings.glcd_font);
configfile.setInt32("glcd_brightness", g_settings.glcd_brightness);
configfile.setInt32("glcd_brightness_dim", g_settings.glcd_brightness_dim);
configfile.setInt32("glcd_brightness_standby", g_settings.glcd_brightness_standby);
configfile.setInt32("glcd_scroll_speed", g_settings.glcd_scroll_speed);
configfile.setInt32("glcd_selected_config", g_settings.glcd_selected_config);
configfile.setString("glcd_brightness_dim_time", g_settings.glcd_brightness_dim_time);
//configfile.setInt32("glcd_selected_config", g_settings.glcd_selected_config);
#endif
//personalize
@@ -1935,7 +1932,7 @@ void CNeutrinoApp::saveSetup(const char * fname)
configfile.setString( "weather_api_key", g_settings.weather_api_key );
#endif
configfile.setInt32( "weather_enabled", g_settings.weather_enabled );
configfile.setInt32( "weather_country", g_settings.weather_country );
configfile.setString( "weather_location", g_settings.weather_location );
configfile.setString( "weather_city", g_settings.weather_city );
@@ -2293,36 +2290,51 @@ void CNeutrinoApp::SetChannelMode(int newmode)
switch(newmode) {
case LIST_MODE_FAV:
if (isRadioMode)
if (isRadioMode) {
#ifdef ENABLE_GRAPHLCD
cGLCD::MirrorOSD(false);
#endif
bouquetList = RADIOfavList;
else
} else
bouquetList = TVfavList;
break;
case LIST_MODE_SAT:
if (isRadioMode)
if (isRadioMode) {
#ifdef ENABLE_GRAPHLCD
cGLCD::MirrorOSD(false);
#endif
bouquetList = RADIOsatList;
else
} else
bouquetList = TVsatList;
break;
case LIST_MODE_WEB:
if (isRadioMode)
if (isRadioMode) {
#ifdef ENABLE_GRAPHLCD
cGLCD::MirrorOSD(false);
#endif
bouquetList = RADIOwebList;
else
} else
bouquetList = TVwebList;
break;
case LIST_MODE_ALL:
if (isRadioMode)
if (isRadioMode) {
#ifdef ENABLE_GRAPHLCD
cGLCD::MirrorOSD(false);
#endif
bouquetList = RADIOallList;
else
} else
bouquetList = TVallList;
break;
default:
newmode = LIST_MODE_PROV;
/* fall through */
case LIST_MODE_PROV:
if (isRadioMode)
if (isRadioMode) {
#ifdef ENABLE_GRAPHLCD
cGLCD::MirrorOSD(false);
#endif
bouquetList = RADIObouquetList;
else
} else
bouquetList = TVbouquetList;
break;
}
@@ -2769,7 +2781,7 @@ TIMER_START();
CVFD::getInstance()->setScrollMode(g_settings.lcd_scroll);
#ifdef ENABLE_GRAPHLCD
nGLCD::getInstance();
cGLCD::getInstance();
#endif
if (!scanSettings.loadSettings(NEUTRINO_SCAN_SETTINGS_FILE))
@@ -2951,6 +2963,13 @@ TIMER_START();
CVFD::getInstance()->showVolume(g_settings.current_volume, false);
//CVFD::getInstance()->setMuted(current_muted);
#ifdef ENABLE_GRAPHLCD
if (current_muted)
cGLCD::lockIcon(cGLCD::MUTE);
else
cGLCD::unlockIcon(cGLCD::MUTE);
#endif
if (show_startwizard) {
hintBox->hide();
CStartUpWizard startwizard;
@@ -3433,7 +3452,7 @@ void CNeutrinoApp::RealRun()
}
#ifdef ENABLE_GRAPHLCD
if (msg == NeutrinoMessages::EVT_CURRENTNEXT_EPG) {
nGLCD::Update();
cGLCD::Update();
}
#endif
}
@@ -3718,7 +3737,7 @@ int CNeutrinoApp::handleMsg(const neutrino_msg_t _msg, neutrino_msg_data_t data)
CVFD::getInstance()->UpdateIcons();
#ifdef ENABLE_GRAPHLCD
nGLCD::Update();
cGLCD::Update();
#endif
g_RCInput->killTimer(scrambled_timer);
if (mode != NeutrinoModes::mode_webtv) {
@@ -3901,7 +3920,8 @@ int CNeutrinoApp::handleMsg(const neutrino_msg_t _msg, neutrino_msg_data_t data)
//switch lcd off/on
CVFD::getInstance()->togglePower();
#ifdef ENABLE_GRAPHLCD
nGLCD::TogglePower();
if (g_settings.glcd_enable)
cGLCD::TogglePower();
#endif
}
else {
@@ -4575,7 +4595,7 @@ void CNeutrinoApp::ExitRun(int exit_code)
#ifdef ENABLE_GRAPHLCD
if (exit_code == CNeutrinoApp::EXIT_SHUTDOWN)
nGLCD::SetBrightness(0);
cGLCD::SetBrightness(0);
#endif
Cleanup();
@@ -4746,7 +4766,7 @@ void CNeutrinoApp::standbyMode( bool bOnOff, bool fromDeepStandby )
fclose(f);
#ifdef ENABLE_GRAPHLCD
nGLCD::StandbyMode(true);
cGLCD::StandbyMode(true);
#endif
CVFD::getInstance()->ShowText("Standby ...");
if( mode == NeutrinoModes::mode_scart ) {
@@ -4841,7 +4861,8 @@ void CNeutrinoApp::standbyMode( bool bOnOff, bool fromDeepStandby )
g_RCInput->killTimer(fst_timer);
#ifdef ENABLE_GRAPHLCD
nGLCD::StandbyMode(false);
cGLCD::Resume();
cGLCD::StandbyMode(false);
#endif
if(init_cec_setting){
@@ -5287,7 +5308,7 @@ void stop_daemons(bool stopall, bool for_flash)
tuxtxt_close();
#ifdef ENABLE_GRAPHLCD
nGLCD::Exit();
cGLCD::Exit();
#endif
if (g_Radiotext) {
@@ -5622,7 +5643,7 @@ void CNeutrinoApp::StopSubtitles(bool enable_glcd_mirroring)
}
#ifdef ENABLE_GRAPHLCD
if (enable_glcd_mirroring)
nGLCD::MirrorOSD(g_settings.glcd_mirror_osd);
cGLCD::MirrorOSD(g_settings.glcd_mirror_osd);
#else
(void) enable_glcd_mirroring; // avoid compiler warning
#endif
@@ -5634,7 +5655,7 @@ void CNeutrinoApp::StartSubtitles(bool show)
{
//printf("%s: %s\n", __FUNCTION__, show ? "Show" : "Not show");
#ifdef ENABLE_GRAPHLCD
nGLCD::MirrorOSD(false);
cGLCD::MirrorOSD(false);
#endif
if(!show)
return;