From 0931959c98e5858e29ca617f3ea0f46c26c12aa7 Mon Sep 17 00:00:00 2001 From: vanhofen Date: Mon, 20 Nov 2017 23:30:56 +0100 Subject: [PATCH] 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. Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/51ce12c3ee4133cda671360871da874300ac61b2 Author: vanhofen 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. ------------------ This commit was generated by Migit --- src/neutrino.cpp | 28 +++++++++++++--------------- 1 file changed, 13 insertions(+), 15 deletions(-) diff --git a/src/neutrino.cpp b/src/neutrino.cpp index 397eb7529..b9ae865d4 100644 --- a/src/neutrino.cpp +++ b/src/neutrino.cpp @@ -4112,7 +4112,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); @@ -4132,22 +4132,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;