neutrino: always write /tmp/.timer ...

otherwise the vfd stays blank in deepstandby, if leds are configured off
and no timer is set. HD2's vfd urgently needs the fp.brightness value
which is not written to frontpanel in this case.

Signed-off-by: Thilo Graf <dbt@novatux.de>


Origin commit data
------------------
Commit: f67ddda1f7
Author: vanhofen <vanhofen@gmx.de>
Date: 2017-11-20 (Mon, 20 Nov 2017)

Origin message was:
------------------
- neutrino: always write /tmp/.timer ...

otherwise the vfd stays blank in deepstandby, if leds are configured off
and no timer is set. HD2's vfd urgently needs the fp.brightness value
which is not written to frontpanel in this case.

Signed-off-by: Thilo Graf <dbt@novatux.de>
This commit is contained in:
vanhofen
2017-11-20 23:30:56 +01:00
committed by Thilo Graf
parent a8a27b4403
commit 8decdc5f31

View File

@@ -3877,7 +3877,7 @@ void CNeutrinoApp::ExitRun(int can_shutdown)
if (cs_get_revision() != 10)
bright = g_settings.lcd_setting[SNeutrinoSettings::LCD_DEEPSTANDBY_BRIGHTNESS];
#endif
if (timer_minutes || leds)
if (timer_minutes)
{
time_t t = timer_minutes * 60;
struct tm *tm = localtime(&t);
@@ -3897,22 +3897,20 @@ void CNeutrinoApp::ExitRun(int can_shutdown)
else
perror("fopen /proc/stb/fp/wakeup_time");
}
/* not platform specific */
else
{
FILE *f = fopen("/tmp/.timer", "w");
if (f)
{
fprintf(f, "%ld\n", timer_minutes * 60);
fprintf(f, "%d\n", leds);
fprintf(f, "%d\n", bright);
fclose(f);
}
else
perror("fopen /tmp/.timer");
}
}
/* not platform specific */
FILE *f = fopen("/tmp/.timer", "w");
if (f)
{
fprintf(f, "%ld\n", timer_minutes ? timer_minutes * 60 : 0);
fprintf(f, "%d\n", leds);
fprintf(f, "%d\n", bright);
fclose(f);
}
else
perror("fopen /tmp/.timer");
delete g_RCInput;
g_RCInput = NULL;