mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-30 00:41:17 +02:00
- simple-display: try to fix time in standby mode
Signed-off-by: Thilo Graf <dbt@novatux.de>
This commit is contained in:
@@ -105,18 +105,22 @@ static void replace_umlauts(std::string &s)
|
|||||||
CLCD::CLCD()
|
CLCD::CLCD()
|
||||||
{
|
{
|
||||||
/* do not show menu in neutrino...,at Line Display true, because there is th GLCD Menu */
|
/* do not show menu in neutrino...,at Line Display true, because there is th GLCD Menu */
|
||||||
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_type == HW_DISPLAY_LINE_TEXT
|
||||||
|
|| g_info.hw_caps->display_type == HW_DISPLAY_LED_NUM
|
||||||
|
|| g_info.hw_caps->display_type == HW_DISPLAY_LED_ONLY
|
||||||
|
)
|
||||||
{
|
{
|
||||||
if (g_info.hw_caps->display_type == HW_DISPLAY_LINE_TEXT)
|
if (g_info.hw_caps->display_type == HW_DISPLAY_LINE_TEXT)
|
||||||
has_lcd = true;
|
has_lcd = true;
|
||||||
else
|
else
|
||||||
has_lcd = false;
|
has_lcd = false;
|
||||||
mode = MODE_TVRADIO;
|
|
||||||
switch_name_time_cnt = 0;
|
|
||||||
timeout_cnt = 0;
|
|
||||||
} else
|
} else
|
||||||
has_lcd = false;
|
has_lcd = false;
|
||||||
|
|
||||||
|
mode = MODE_TVRADIO;
|
||||||
|
switch_name_time_cnt = 0;
|
||||||
|
timeout_cnt = 0;
|
||||||
servicename = "";
|
servicename = "";
|
||||||
servicenumber = -1;
|
servicenumber = -1;
|
||||||
thread_running = false;
|
thread_running = false;
|
||||||
@@ -142,7 +146,11 @@ CLCD* CLCD::getInstance()
|
|||||||
|
|
||||||
void CLCD::wake_up()
|
void CLCD::wake_up()
|
||||||
{
|
{
|
||||||
if (g_info.hw_caps->display_can_set_brightness)
|
if (
|
||||||
|
g_info.hw_caps->display_type == HW_DISPLAY_LINE_TEXT
|
||||||
|
|| g_info.hw_caps->display_type == HW_DISPLAY_LED_NUM
|
||||||
|
|| g_info.hw_caps->display_type == HW_DISPLAY_LED_ONLY
|
||||||
|
)
|
||||||
{
|
{
|
||||||
if (atoi(g_settings.lcd_setting_dim_time.c_str()) > 0)
|
if (atoi(g_settings.lcd_setting_dim_time.c_str()) > 0)
|
||||||
{
|
{
|
||||||
@@ -166,7 +174,10 @@ void* CLCD::TimeThread(void *)
|
|||||||
while (CLCD::getInstance()->thread_running)
|
while (CLCD::getInstance()->thread_running)
|
||||||
{
|
{
|
||||||
sleep(1);
|
sleep(1);
|
||||||
if (g_info.hw_caps->display_can_set_brightness)
|
if (
|
||||||
|
g_info.hw_caps->display_type == HW_DISPLAY_LINE_TEXT
|
||||||
|
|| g_info.hw_caps->display_type == HW_DISPLAY_LED_NUM
|
||||||
|
)
|
||||||
{
|
{
|
||||||
struct stat buf;
|
struct stat buf;
|
||||||
if (stat("/tmp/vfd.locked", &buf) == -1)
|
if (stat("/tmp/vfd.locked", &buf) == -1)
|
||||||
@@ -319,7 +330,10 @@ void CLCD::showTime(bool force)
|
|||||||
ret = ioctl(fd, VFDSETTIME2, &now);
|
ret = ioctl(fd, VFDSETTIME2, &now);
|
||||||
close(fd);
|
close(fd);
|
||||||
#endif
|
#endif
|
||||||
if ((g_info.hw_caps->display_type == HW_DISPLAY_LINE_TEXT) || (g_info.hw_caps->display_type == HW_DISPLAY_LED_NUM))
|
if (
|
||||||
|
g_info.hw_caps->display_type == HW_DISPLAY_LINE_TEXT
|
||||||
|
|| g_info.hw_caps->display_type == HW_DISPLAY_LED_NUM
|
||||||
|
)
|
||||||
{
|
{
|
||||||
#if HAVE_ARM_HARDWARE || HAVE_MIPS_HARDWARE
|
#if HAVE_ARM_HARDWARE || HAVE_MIPS_HARDWARE
|
||||||
if (mode == MODE_STANDBY || (g_settings.lcd_info_line && mode == MODE_TVRADIO))
|
if (mode == MODE_STANDBY || (g_settings.lcd_info_line && mode == MODE_TVRADIO))
|
||||||
@@ -608,7 +622,11 @@ void CLCD::setPower(int)
|
|||||||
|
|
||||||
int CLCD::getPower()
|
int CLCD::getPower()
|
||||||
{
|
{
|
||||||
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_type == HW_DISPLAY_LINE_TEXT
|
||||||
|
|| g_info.hw_caps->display_type == HW_DISPLAY_LED_NUM
|
||||||
|
|| g_info.hw_caps->display_type == HW_DISPLAY_LED_ONLY
|
||||||
|
)
|
||||||
return g_settings.lcd_setting[SNeutrinoSettings::LCD_POWER];
|
return g_settings.lcd_setting[SNeutrinoSettings::LCD_POWER];
|
||||||
else
|
else
|
||||||
return 0;
|
return 0;
|
||||||
|
Reference in New Issue
Block a user