- vfd-setup: allow to set scroll_repeats if possible

Signed-off-by: Thilo Graf <dbt@novatux.de>
This commit is contained in:
svenhoefer
2017-11-13 22:47:11 +01:00
committed by Thilo Graf
parent bf88e2976f
commit dbf2fa3f18
8 changed files with 28 additions and 9 deletions

View File

@@ -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

View File

@@ -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

View File

@@ -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
{

View File

@@ -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();

View File

@@ -48,6 +48,7 @@
#include <driver/display.h>
#include <system/debug.h>
#include <system/helpers.h>
#include <cs_api.h>
@@ -164,9 +165,22 @@ int CVfdSetup::showSetup()
vfds->addItem(oj);
//scroll options
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);
}

View File

@@ -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();

View File

@@ -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,

View File

@@ -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",