mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-31 01:11:12 +02:00
simple_display.cpp: fix LED NUM for H7 and BRE2ZE4K
This commit is contained in:
@@ -1090,6 +1090,7 @@ lcd4l_support_on ein
|
||||
lcd4l_weather Wetter im Standby-Modus
|
||||
lcd_info_line Zeige in Infozeile
|
||||
lcd_info_line_channel Kanalname
|
||||
lcd_info_line_channel_no Kanalnummer
|
||||
lcd_info_line_clock Uhrzeit
|
||||
lcdcontroler.brightness Normalbetrieb
|
||||
lcdcontroler.brightnessdeepstandby Deep-Standby
|
||||
@@ -1698,11 +1699,11 @@ menu.hint_vfd_brightnessdeepstandby Definiert die Helligkeit im Deep-Standby
|
||||
menu.hint_vfd_brightnessdim Definiert den Wert für das Dimmen des Display nach Ablauf der eingestellten Zeit
|
||||
menu.hint_vfd_brightnessstandby Definiert die Helligkeit im Standby-Modus
|
||||
menu.hint_vfd_defaults Zurücksetzen der Helligkeitswerte auf die Standardeinstellungen
|
||||
menu.hint_vfd_dimtime Geben Sie einen Wert in Sekunden ein, nachdem sich das Display automatisch auf den gewünschten Wert dimmt
|
||||
menu.hint_vfd_dimtime Zeit in Sekunden, nachdem sich das Display autom. im Normalbetrieb auf den gewünschten Wert dimmt
|
||||
menu.hint_vfd_infoline Wählen Sie, was in der Infozeile angezeigt werden soll
|
||||
menu.hint_vfd_notify_rclock Zeigt eine Meldung im Display, wenn bei gesperrter Fernbedienung eine Taste gedrückt wird
|
||||
menu.hint_vfd_scroll Laufschrift im Display ein- oder ausschalten
|
||||
menu.hint_vfd_statusline Wählen Sie, was in der Statuszeile angezeigt werden soll
|
||||
menu.hint_vfd_statusline Wählen Sie, was in der Statuszeile des VFD/LCD angezeigt werden soll
|
||||
menu.hint_video Video-Ausgang, Auflösung, Format, Seitenverhältnisse usw.
|
||||
menu.hint_video_43mode Anzeige-Modus für 4:3-Inhalte auf 16:9-Fernsehern
|
||||
menu.hint_video_analog_mode Wählen Sie den Modus des Ausgangssignals für den CINCH-Anschluss
|
||||
@@ -2096,7 +2097,7 @@ movieplayer.bookmarkname Bookmark Name
|
||||
movieplayer.bookmarkname_hint1 Geben Sie den Namen für das neue Lesezeichen ein
|
||||
movieplayer.bookmarkname_hint2
|
||||
movieplayer.chapters Kapitel
|
||||
movieplayer.display_playtime Zeige Spielzeit im VFD
|
||||
movieplayer.display_playtime Zeige Spielzeit im VFD/LCD
|
||||
movieplayer.fileplayback_audio Multiformat-Audiowiedergabe
|
||||
movieplayer.fileplayback_video Multiformat-Videowiedergabe
|
||||
movieplayer.head Movieplayer
|
||||
|
@@ -1051,6 +1051,10 @@ lcdmenu.statusline Status line
|
||||
lcdmenu.statusline.both Volume and playtime
|
||||
lcdmenu.statusline.playtime Playtime
|
||||
lcdmenu.statusline.volume Volume
|
||||
lcd_num.info.line Show in infoline
|
||||
lcd_num.info.line_channel Channelname
|
||||
lcd_num.info.line_channel_no Channelnumber
|
||||
lcd_num.info.line_clock Clock
|
||||
ledcontroler.backlight Buttons backlight
|
||||
ledcontroler.backlight.tv TV mode
|
||||
ledcontroler.blink Blink in deep-standby, if timer set
|
||||
@@ -1385,7 +1389,7 @@ menu.hint_misc_zapit Initial TV/Radio channels
|
||||
menu.hint_movie Play movies
|
||||
menu.hint_moviebrowser_fonts Change moviebrowser (My recordings) font sizes
|
||||
menu.hint_moviebrowser_setup Set selection and display options.
|
||||
menu.hint_movieplayer_display_playtime While playback show playtime instead of movietitle on VFD
|
||||
menu.hint_movieplayer_display_playtime While playback show playtime instead of movietitle on VFD/LCD
|
||||
menu.hint_movieplayer_plugin Choose a plugin that's executed with the one touch key in movieplayer mode
|
||||
menu.hint_net_broadcast Enter broadcast address\nif unsure, use IP address with last .255
|
||||
menu.hint_net_dhcp Use DHCP server to auto-configure
|
||||
@@ -1644,11 +1648,11 @@ menu.hint_vfd_brightnessdeepstandby Brightness in deep-standby mode
|
||||
menu.hint_vfd_brightnessdim Auto-dim brightness
|
||||
menu.hint_vfd_brightnessstandby Brightness in soft-standby mode
|
||||
menu.hint_vfd_defaults Restore default brightness values
|
||||
menu.hint_vfd_dimtime Auto-dim time, in seconds
|
||||
menu.hint_vfd_infoline Choose what to display in main VFD line
|
||||
menu.hint_vfd_dimtime Auto-dim time in seconds for normal mode
|
||||
menu.hint_vfd_infoline Choose what to display in main VFD/LCD line
|
||||
menu.hint_vfd_notify_rclock Displays a notification when a key is pressed while remote control is locked
|
||||
menu.hint_vfd_scroll Enable or disable text scrolling on VFD
|
||||
menu.hint_vfd_statusline Choose what to display in short\nVFD status line
|
||||
menu.hint_vfd_statusline Choose what to display in short\nVFD/LCD status line
|
||||
menu.hint_video Video output, resolution, format\nAspect ratio, fast mode switch options
|
||||
menu.hint_video_43mode Display mode for 4:3 content\non 16:9 TV
|
||||
menu.hint_video_analog_mode Select analog output mode\nfor SCART and CINCH connectors
|
||||
|
@@ -133,6 +133,7 @@ CLCD::CLCD()
|
||||
has_lcd = false;
|
||||
|
||||
servicename = "";
|
||||
servicenumber = -1;
|
||||
thread_running = false;
|
||||
}
|
||||
|
||||
@@ -156,7 +157,7 @@ CLCD* CLCD::getInstance()
|
||||
|
||||
void CLCD::wake_up()
|
||||
{
|
||||
if (g_info.hw_caps->display_type == HW_DISPLAY_LINE_TEXT || g_info.hw_caps->display_type == HW_DISPLAY_LED_ONLY)
|
||||
if (g_info.hw_caps->display_can_set_brightness)
|
||||
{
|
||||
if (atoi(g_settings.lcd_setting_dim_time.c_str()) > 0)
|
||||
{
|
||||
@@ -180,7 +181,7 @@ void* CLCD::TimeThread(void *)
|
||||
while (CLCD::getInstance()->thread_running)
|
||||
{
|
||||
sleep(1);
|
||||
if (g_info.hw_caps->display_type == HW_DISPLAY_LINE_TEXT || g_info.hw_caps->display_type == HW_DISPLAY_LED_ONLY)
|
||||
if (g_info.hw_caps->display_can_set_brightness)
|
||||
{
|
||||
struct stat buf;
|
||||
if (stat("/tmp/vfd.locked", &buf) == -1)
|
||||
@@ -220,7 +221,7 @@ void CLCD::init(const char *, const char *, const char *, const char *, const ch
|
||||
|
||||
void CLCD::setlcdparameter(void)
|
||||
{
|
||||
if (g_info.hw_caps->display_type == HW_DISPLAY_LINE_TEXT || g_info.hw_caps->display_type == HW_DISPLAY_LED_ONLY)
|
||||
if (g_info.hw_caps->display_can_set_brightness)
|
||||
{
|
||||
last_toggle_state_power = g_settings.lcd_setting[SNeutrinoSettings::LCD_POWER];
|
||||
|
||||
@@ -233,19 +234,35 @@ void CLCD::setlcdparameter(void)
|
||||
}
|
||||
}
|
||||
|
||||
void CLCD::showServicename(std::string name, bool)
|
||||
void CLCD::showServicename(std::string name, const int num, bool)
|
||||
{
|
||||
if (g_info.hw_caps->display_type == HW_DISPLAY_LED_NUM)
|
||||
return;
|
||||
|
||||
servicename = name;
|
||||
servicenumber = num;
|
||||
|
||||
if (mode != MODE_TVRADIO && mode != MODE_AUDIO)
|
||||
return;
|
||||
|
||||
replace_umlauts(servicename);
|
||||
strncpy(display_text, servicename.c_str(), sizeof(display_text) - 1);
|
||||
display_text[sizeof(display_text) - 1] = '\0';
|
||||
if (g_info.hw_caps->display_type == HW_DISPLAY_LED_NUM)
|
||||
{
|
||||
std::string s;
|
||||
if (num > 0) // dont show channel 0 at boot
|
||||
{
|
||||
s = to_string(servicenumber);
|
||||
while ((int)s.length() < g_info.hw_caps->display_xres) {
|
||||
s = " " + s;
|
||||
}
|
||||
}
|
||||
else
|
||||
return;
|
||||
strncpy(display_text, s.c_str(), sizeof(display_text) - 1);
|
||||
display_text[sizeof(display_text) - 1] = '\0';
|
||||
}
|
||||
else
|
||||
{
|
||||
replace_umlauts(servicename);
|
||||
strncpy(display_text, servicename.c_str(), sizeof(display_text) - 1);
|
||||
display_text[sizeof(display_text) - 1] = '\0';
|
||||
}
|
||||
upd_display = true;
|
||||
#if HAVE_ARM_HARDWARE || HAVE_MIPS_HARDWARE
|
||||
wake_up();
|
||||
@@ -345,10 +362,12 @@ void CLCD::showTime(bool force)
|
||||
#if HAVE_ARM_HARDWARE || HAVE_MIPS_HARDWARE
|
||||
if (mode == MODE_STANDBY || (g_settings.lcd_info_line && mode == MODE_TVRADIO))
|
||||
#else
|
||||
if (ret < 0 && servicename.empty())
|
||||
if (ret < 0 && servicename.empty() && servicenumber == -1)
|
||||
#endif
|
||||
{
|
||||
if (g_info.hw_caps->display_xres < 5)
|
||||
if (g_info.hw_caps->display_xres == 4 && g_info.hw_caps->display_has_colon == 1)
|
||||
sprintf(timestr, "%02d:%02d", hour, minute);
|
||||
else if (g_info.hw_caps->display_xres < 5)
|
||||
sprintf(timestr, "%02d%02d", hour, minute);
|
||||
else /* pad with spaces on the left side to center the time string */
|
||||
sprintf(timestr, "%*s%02d:%02d",(g_info.hw_caps->display_xres - 5)/2, "", hour, minute);
|
||||
@@ -358,7 +377,7 @@ void CLCD::showTime(bool force)
|
||||
{
|
||||
if (vol_active)
|
||||
{
|
||||
showServicename(servicename);
|
||||
showServicename(servicename, servicenumber);
|
||||
vol_active = false;
|
||||
}
|
||||
}
|
||||
@@ -392,7 +411,7 @@ void CLCD::showRCLock(int duration)
|
||||
|
||||
ShowText(g_Locale->getText(LOCALE_RCLOCK_LOCKED));
|
||||
sleep(duration);
|
||||
ShowText(servicename.c_str());
|
||||
ShowText(servicename.c_str(), servicenumber);
|
||||
}
|
||||
|
||||
/* update is default true, the mute code sets it to false
|
||||
@@ -400,9 +419,9 @@ void CLCD::showRCLock(int duration)
|
||||
void CLCD::showVolume(const char vol, const bool update)
|
||||
{
|
||||
char s[32];
|
||||
const int type = (g_info.hw_caps->display_xres < 5);
|
||||
const char *vol_fmt[] = { "Vol:%3d%%", "%4d" };
|
||||
const char *mutestr[] = { "Vol:MUTE", "mute" };
|
||||
const int type = (g_info.hw_caps->display_xres < 5) + (g_info.hw_caps->display_type == HW_DISPLAY_LED_NUM);
|
||||
const char *vol_fmt[] = { "Vol:%3d%%", "%4d", "%4d" };
|
||||
const char *mutestr[] = { "Vol:MUTE", "mute", " -0-"};
|
||||
if (vol == volume && update)
|
||||
return;
|
||||
volume = vol;
|
||||
@@ -487,9 +506,7 @@ void CLCD::setMode(const MODES m, const char * const title)
|
||||
setled(0, 0);
|
||||
showclock = true;
|
||||
power = true;
|
||||
if (g_info.hw_caps->display_type != HW_DISPLAY_LED_NUM) {
|
||||
showServicename(servicename);
|
||||
}
|
||||
showServicename(servicename, servicenumber);
|
||||
showTime();
|
||||
if (g_settings.lcd_info_line)
|
||||
switch_name_time_cnt = 10;
|
||||
@@ -510,6 +527,7 @@ void CLCD::setMode(const MODES m, const char * const title)
|
||||
showclock = true;
|
||||
showTime(true);
|
||||
proc_put("/proc/stb/lcd/show_symbols", false);
|
||||
timeout_cnt = 0;
|
||||
break;
|
||||
default:
|
||||
showclock = true;
|
||||
@@ -573,7 +591,7 @@ void CLCD::setBrightness(int dimm)
|
||||
|
||||
int CLCD::getBrightness()
|
||||
{
|
||||
if (g_info.hw_caps->display_type == HW_DISPLAY_LINE_TEXT || g_info.hw_caps->display_type == HW_DISPLAY_LED_ONLY)
|
||||
if (g_info.hw_caps->display_can_set_brightness)
|
||||
{
|
||||
if (g_settings.lcd_setting[SNeutrinoSettings::LCD_BRIGHTNESS] > 15)
|
||||
g_settings.lcd_setting[SNeutrinoSettings::LCD_BRIGHTNESS] = 15;
|
||||
@@ -584,7 +602,7 @@ int CLCD::getBrightness()
|
||||
|
||||
void CLCD::setBrightnessStandby(int bright)
|
||||
{
|
||||
if (g_info.hw_caps->display_type == HW_DISPLAY_LINE_TEXT || g_info.hw_caps->display_type == HW_DISPLAY_LED_ONLY)
|
||||
if (g_info.hw_caps->display_can_set_brightness)
|
||||
{
|
||||
g_settings.lcd_setting[SNeutrinoSettings::LCD_STANDBY_BRIGHTNESS] = bright;
|
||||
setlcdparameter();
|
||||
@@ -593,7 +611,7 @@ void CLCD::setBrightnessStandby(int bright)
|
||||
|
||||
int CLCD::getBrightnessStandby()
|
||||
{
|
||||
if (g_info.hw_caps->display_type == HW_DISPLAY_LINE_TEXT || g_info.hw_caps->display_type == HW_DISPLAY_LED_ONLY)
|
||||
if (g_info.hw_caps->display_can_set_brightness)
|
||||
{
|
||||
if (g_settings.lcd_setting[SNeutrinoSettings::LCD_STANDBY_BRIGHTNESS] > 15)
|
||||
g_settings.lcd_setting[SNeutrinoSettings::LCD_STANDBY_BRIGHTNESS] = 15;
|
||||
@@ -642,7 +660,7 @@ void CLCD::togglePower(void)
|
||||
else
|
||||
showTime(true);
|
||||
|
||||
if (g_info.hw_caps->display_type == HW_DISPLAY_LINE_TEXT || g_info.hw_caps->display_type == HW_DISPLAY_LED_ONLY)
|
||||
if (g_info.hw_caps->display_can_set_brightness)
|
||||
{
|
||||
last_toggle_state_power = 1 - last_toggle_state_power;
|
||||
|
||||
@@ -695,6 +713,7 @@ void CLCD::Clear()
|
||||
SetIcons(SPARK_CLOCK, timer_icon);
|
||||
}
|
||||
servicename.clear();
|
||||
servicenumber = -1;
|
||||
printf("CLCD::%s\n", __func__);
|
||||
}
|
||||
#else
|
||||
@@ -719,7 +738,8 @@ void CLCD::count_down()
|
||||
}
|
||||
}
|
||||
}
|
||||
if (g_settings.lcd_info_line && switch_name_time_cnt > 0) {
|
||||
|
||||
if (switch_name_time_cnt > 0) {
|
||||
switch_name_time_cnt--;
|
||||
if (switch_name_time_cnt == 0) {
|
||||
if (g_settings.lcd_setting_dim_brightness > -1) {
|
||||
|
@@ -136,6 +136,7 @@ class CLCD
|
||||
CLCD();
|
||||
std::string menutitle;
|
||||
std::string servicename;
|
||||
int servicenumber;
|
||||
MODES mode;
|
||||
void setled(int red, int green);
|
||||
static void *TimeThread(void *);
|
||||
@@ -164,7 +165,7 @@ class CLCD
|
||||
MODES getMode() { return mode; };
|
||||
void setHddUsage(int perc);
|
||||
|
||||
void showServicename(const std::string name, const bool clear_epg = false);
|
||||
void showServicename(const std::string name, const int num, const bool clear_epg = false);
|
||||
std::string getServicename(void) { return servicename; }
|
||||
void setEPGTitle(const std::string title);
|
||||
void setMovieInfo(const AUDIOMODES playmode, const std::string big, const std::string small, const bool centered = false);
|
||||
|
@@ -537,14 +537,26 @@ void CMoviePlayerGui::updateLcd(bool display_playtime)
|
||||
std::string lcd;
|
||||
std::string name;
|
||||
|
||||
if (display_playtime && g_info.hw_caps->display_xres >= 8)
|
||||
if (display_playtime)
|
||||
{
|
||||
int ss = position/1000;
|
||||
int hh = ss/3600;
|
||||
ss -= hh * 3600;
|
||||
int mm = ss/60;
|
||||
ss -= mm * 60;
|
||||
lcd = to_string(hh/10) + to_string(hh%10) + ":" + to_string(mm/10) + to_string(mm%10) + ":" + to_string(ss/10) + to_string(ss%10);
|
||||
|
||||
if (g_info.hw_caps->display_xres >= 8)
|
||||
lcd = to_string(hh/10) + to_string(hh%10) + ":" + to_string(mm/10) + to_string(mm%10) + ":" + to_string(ss/10) + to_string(ss%10);
|
||||
else
|
||||
{
|
||||
std::string colon = g_info.hw_caps->display_has_colon ? ":" : "";
|
||||
if (hh < 1) {
|
||||
lcd = to_string(mm/10) + to_string(mm%10) + colon + to_string(ss/10) + to_string(ss%10);
|
||||
}
|
||||
else {
|
||||
lcd = to_string(hh/10) + to_string(hh%10) + colon + to_string(mm/10) + to_string(mm%10);
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -1676,9 +1688,10 @@ void CMoviePlayerGui::PlayFileLoop(void)
|
||||
#endif
|
||||
while (playstate >= CMoviePlayerGui::PLAY)
|
||||
{
|
||||
if (update_lcd || g_settings.movieplayer_display_playtime) {
|
||||
bool show_playtime = (g_settings.movieplayer_display_playtime || g_info.hw_caps->display_type == HW_DISPLAY_LED_NUM);
|
||||
if (update_lcd || show_playtime) {
|
||||
update_lcd = false;
|
||||
updateLcd(g_settings.movieplayer_display_playtime);
|
||||
updateLcd(show_playtime);
|
||||
}
|
||||
if (first_start) {
|
||||
usleep(50000);
|
||||
|
@@ -110,7 +110,11 @@ const CMenuOptionChooser::keyval LEDMENU_OPTIONS[LEDMENU_OPTION_COUNT] =
|
||||
#define LCD_INFO_OPTION_COUNT 2
|
||||
const CMenuOptionChooser::keyval LCD_INFO_OPTIONS[LCD_INFO_OPTION_COUNT] =
|
||||
{
|
||||
#if BOXMODEL_H7 || BOXMODEL_BRE2ZE4K
|
||||
{ 0, LOCALE_LCD_INFO_LINE_CHANNEL_NO },
|
||||
#else
|
||||
{ 0, LOCALE_LCD_INFO_LINE_CHANNEL },
|
||||
#endif
|
||||
{ 1, LOCALE_LCD_INFO_LINE_CLOCK }
|
||||
};
|
||||
|
||||
@@ -192,6 +196,15 @@ int CVfdSetup::showSetup()
|
||||
vfds->addItem(oj);
|
||||
}
|
||||
|
||||
if (g_info.hw_caps->display_type == HW_DISPLAY_LED_NUM)
|
||||
{
|
||||
//LED NUM info line options
|
||||
CMenuOptionChooser* led_num;
|
||||
led_num = new CMenuOptionChooser(LOCALE_LCD_INFO_LINE, &g_settings.lcd_info_line, LCD_INFO_OPTIONS, LCD_INFO_OPTION_COUNT, vfd_enabled);
|
||||
led_num->setHint("", LOCALE_MENU_HINT_VFD_INFOLINE);
|
||||
vfds->addItem(led_num);
|
||||
}
|
||||
|
||||
CMenuItem* glcd_setup = NULL;
|
||||
#ifdef ENABLE_GRAPHLCD
|
||||
GLCD_Menu glcdMenu;
|
||||
|
@@ -1117,6 +1117,7 @@ typedef enum
|
||||
LOCALE_LCD4L_WEATHER,
|
||||
LOCALE_LCD_INFO_LINE,
|
||||
LOCALE_LCD_INFO_LINE_CHANNEL,
|
||||
LOCALE_LCD_INFO_LINE_CHANNEL_NO,
|
||||
LOCALE_LCD_INFO_LINE_CLOCK,
|
||||
LOCALE_LCDCONTROLER_BRIGHTNESS,
|
||||
LOCALE_LCDCONTROLER_BRIGHTNESSDEEPSTANDBY,
|
||||
|
@@ -1117,6 +1117,7 @@ const char * locale_real_names[] =
|
||||
"lcd4l_weather",
|
||||
"lcd_info_line",
|
||||
"lcd_info_line_channel",
|
||||
"lcd_info_line_channel_no",
|
||||
"lcd_info_line_clock",
|
||||
"lcdcontroler.brightness",
|
||||
"lcdcontroler.brightnessdeepstandby",
|
||||
|
Reference in New Issue
Block a user