diff --git a/src/driver/lcdd.h b/src/driver/lcdd.h index 86254cee7..6c82ab543 100644 --- a/src/driver/lcdd.h +++ b/src/driver/lcdd.h @@ -260,6 +260,8 @@ class CLCD void setBrightnessStandby(int); int getBrightnessStandby(); + void setScrollMode(int) { return; } + void setContrast(int); int getContrast(); diff --git a/src/driver/simple_display.cpp b/src/driver/simple_display.cpp index 19a7d0c9d..a10d3ec33 100644 --- a/src/driver/simple_display.cpp +++ b/src/driver/simple_display.cpp @@ -579,6 +579,25 @@ int CLCD::getBrightnessStandby() return 0; } +void CLCD::setScrollMode(int scroll) +{ + printf("CLCD::%s scroll:%d\n", __func__, scroll); + if (scroll) + { + proc_put("/proc/stb/lcd/initial_scroll_delay", "1000", 4); + proc_put("/proc/stb/lcd/final_scroll_delay", "1000", 4); + proc_put("/proc/stb/lcd/scroll_delay", "150", 3); + proc_put("/proc/stb/lcd/scroll_repeats", "3", 1); + } + else + { + proc_put("/proc/stb/lcd/initial_scroll_delay", "0", 1); + proc_put("/proc/stb/lcd/final_scroll_delay", "0", 1); + proc_put("/proc/stb/lcd/scroll_delay", "0", 1); + proc_put("/proc/stb/lcd/scroll_repeats", "0", 1); + } +} + void CLCD::setPower(int) { } diff --git a/src/driver/simple_display.h b/src/driver/simple_display.h index 6b17daadd..03e9f9de4 100644 --- a/src/driver/simple_display.h +++ b/src/driver/simple_display.h @@ -186,6 +186,8 @@ class CLCD void setBrightnessDeepStandby(int) { return ; }; int getBrightnessDeepStandby() { return 0; }; + void setScrollMode(int scoll); + void setContrast(int); int getContrast(); diff --git a/src/driver/vfd.h b/src/driver/vfd.h index 4e96f03e9..9c4fe3987 100644 --- a/src/driver/vfd.h +++ b/src/driver/vfd.h @@ -138,6 +138,8 @@ class CVFD void setBrightnessDeepStandby(int); int getBrightnessDeepStandby(); + void setScrollMode(int) { return; } + void setPower(int); int getPower(); diff --git a/src/gui/vfd_setup.cpp b/src/gui/vfd_setup.cpp index 64852009b..68060f97f 100644 --- a/src/gui/vfd_setup.cpp +++ b/src/gui/vfd_setup.cpp @@ -164,7 +164,7 @@ 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); + 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); @@ -305,6 +305,8 @@ 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)) { + CVFD::getInstance()->setScrollMode(g_settings.lcd_scroll); } return false;