diff --git a/data/locale/deutsch.locale b/data/locale/deutsch.locale index 0908ea32f..230039c9e 100644 --- a/data/locale/deutsch.locale +++ b/data/locale/deutsch.locale @@ -885,6 +885,7 @@ lcdmenu.head VFD/LED Einstellungen lcdmenu.lcdcontroler Helligkeit lcdmenu.notify_rclock Benachrichtigung bei FB-Sperre lcdmenu.scroll Laufschrift +lcdmenu.scroll_repeats Laufschrift und Wiederholungen lcdmenu.statusline Statuszeile lcdmenu.statusline.both Lautstärke/Fortschritt lcdmenu.statusline.playtime Sendungsfortschritt diff --git a/data/locale/english.locale b/data/locale/english.locale index 8c7cc31a8..c224a6128 100644 --- a/data/locale/english.locale +++ b/data/locale/english.locale @@ -885,6 +885,7 @@ lcdmenu.head VFD/LED Settings lcdmenu.lcdcontroler Brightness lcdmenu.notify_rclock Notify when RC is locked lcdmenu.scroll Enable text scroll +lcdmenu.scroll_repeats Enable text scroll and repeats lcdmenu.statusline status line lcdmenu.statusline.both volume and playtime lcdmenu.statusline.playtime playtime diff --git a/src/driver/simple_display.cpp b/src/driver/simple_display.cpp index 33f9b264f..7d801119c 100644 --- a/src/driver/simple_display.cpp +++ b/src/driver/simple_display.cpp @@ -582,15 +582,15 @@ int CLCD::getBrightnessStandby() return 0; } -void CLCD::setScrollMode(int scroll) +void CLCD::setScrollMode(int scroll_repeats) { - printf("CLCD::%s scroll:%d\n", __func__, scroll); - if (scroll) + printf("CLCD::%s scroll_repeats:%d\n", __func__, scroll_repeats); + if (scroll_repeats) { proc_put("/proc/stb/lcd/initial_scroll_delay", "1000"); proc_put("/proc/stb/lcd/final_scroll_delay", "1000"); proc_put("/proc/stb/lcd/scroll_delay", "150"); - proc_put("/proc/stb/lcd/scroll_repeats", "3"); + proc_put("/proc/stb/lcd/scroll_repeats", to_string(scroll_repeats).c_str()); } else { diff --git a/src/driver/simple_display.h b/src/driver/simple_display.h index 03e9f9de4..4fc2476bf 100644 --- a/src/driver/simple_display.h +++ b/src/driver/simple_display.h @@ -186,7 +186,7 @@ class CLCD void setBrightnessDeepStandby(int) { return ; }; int getBrightnessDeepStandby() { return 0; }; - void setScrollMode(int scoll); + void setScrollMode(int scroll_repeats); void setContrast(int); int getContrast(); diff --git a/src/gui/vfd_setup.cpp b/src/gui/vfd_setup.cpp index 68060f97f..cfe8a7539 100644 --- a/src/gui/vfd_setup.cpp +++ b/src/gui/vfd_setup.cpp @@ -48,6 +48,7 @@ #include #include +#include #include @@ -164,9 +165,22 @@ int CVfdSetup::showSetup() vfds->addItem(oj); //scroll options - oj = new CMenuOptionChooser(LOCALE_LCDMENU_SCROLL, &g_settings.lcd_scroll, OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, vfd_enabled, this); - oj->setHint("", LOCALE_MENU_HINT_VFD_SCROLL); - vfds->addItem(oj); + if (file_exists("/proc/stb/lcd/scroll_repeats")) + { + // allow to set scroll_repeats + CMenuOptionNumberChooser * nc = new CMenuOptionNumberChooser(LOCALE_LCDMENU_SCROLL_REPEATS, &g_settings.lcd_scroll, vfd_enabled, 0, 999, this); + nc->setLocalizedValue(0); + nc->setLocalizedValueName(LOCALE_OPTIONS_OFF); + nc->setHint("", LOCALE_MENU_HINT_VFD_SCROLL); + vfds->addItem(nc); + } + else + { + // simple on/off chooser + oj = new CMenuOptionChooser(LOCALE_LCDMENU_SCROLL, &g_settings.lcd_scroll, OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, vfd_enabled, this); + oj->setHint("", LOCALE_MENU_HINT_VFD_SCROLL); + vfds->addItem(oj); + } //notify rc-lock oj = new CMenuOptionChooser(LOCALE_LCDMENU_NOTIFY_RCLOCK, &g_settings.lcd_notify_rclock, OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, vfd_enabled); @@ -305,7 +319,7 @@ bool CVfdSetup::changeNotify(const neutrino_locale_t OptionName, void * /* data CVFD::getInstance()->setled(); } else if (ARE_LOCALES_EQUAL(OptionName, LOCALE_LEDCONTROLER_BACKLIGHT_TV)) { CVFD::getInstance()->setBacklight(g_settings.backlight_tv); - } else if (ARE_LOCALES_EQUAL(OptionName, LOCALE_LCDMENU_SCROLL)) { + } else if (ARE_LOCALES_EQUAL(OptionName, LOCALE_LCDMENU_SCROLL) || ARE_LOCALES_EQUAL(OptionName, LOCALE_LCDMENU_SCROLL_REPEATS)) { CVFD::getInstance()->setScrollMode(g_settings.lcd_scroll); } diff --git a/src/neutrino.cpp b/src/neutrino.cpp index 6b2f1f015..450d78298 100644 --- a/src/neutrino.cpp +++ b/src/neutrino.cpp @@ -4670,6 +4670,7 @@ void sighandler (int signum) delete CRecordManager::getInstance(); //CNeutrinoApp::getInstance()->saveSetup(NEUTRINO_SETTINGS_FILE); stop_daemons(); + CVFD::getInstance()->setMode(CVFD::MODE_SHUTDOWN); delete CVFD::getInstance(); delete SHTDCNT::getInstance(); stop_video(); diff --git a/src/system/locals.h b/src/system/locals.h index 5b7705c6c..e1ce2a230 100644 --- a/src/system/locals.h +++ b/src/system/locals.h @@ -912,6 +912,7 @@ typedef enum LOCALE_LCDMENU_LCDCONTROLER, LOCALE_LCDMENU_NOTIFY_RCLOCK, LOCALE_LCDMENU_SCROLL, + LOCALE_LCDMENU_SCROLL_REPEATS, LOCALE_LCDMENU_STATUSLINE, LOCALE_LCDMENU_STATUSLINE_BOTH, LOCALE_LCDMENU_STATUSLINE_PLAYTIME, diff --git a/src/system/locals_intern.h b/src/system/locals_intern.h index eb745dace..d435ab2cc 100644 --- a/src/system/locals_intern.h +++ b/src/system/locals_intern.h @@ -912,6 +912,7 @@ const char * locale_real_names[] = "lcdmenu.lcdcontroler", "lcdmenu.notify_rclock", "lcdmenu.scroll", + "lcdmenu.scroll_repeats", "lcdmenu.statusline", "lcdmenu.statusline.both", "lcdmenu.statusline.playtime",