From a9ce0906c37254be47c8a93bb687126629d18f4d Mon Sep 17 00:00:00 2001 From: Stefan Seyfried Date: Tue, 1 May 2012 20:24:49 +0200 Subject: [PATCH] spark_fp: improve wakeup time for short timeouts Origin commit data ------------------ Branch: master Commit: https://github.com/neutrino-images/ni-libstb-hal/commit/2f1ee80b8e44f2b84ad0c3ca02596aec2d65d83c Author: Stefan Seyfried Date: 2012-05-01 (Tue, 01 May 2012) ------------------ No further description and justification available within origin commit message! ------------------ This commit was generated by Migit --- tools/spark_fp.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/tools/spark_fp.c b/tools/spark_fp.c index a011386..37824cc 100644 --- a/tools/spark_fp.c +++ b/tools/spark_fp.c @@ -188,11 +188,8 @@ int main(int argc, char **argv) aotom.u.led.on = LOG_ON; aotom.u.led.led_nr = 0; ioctl(fd, VFDSETLED, &aotom); - if (t < t2) - { - /* no valid wakeup time -> clear... */ - t = 0; - } + if (t == 1) + t = 0; /* t = 1 is magic for "no time" -> clear... */ else { /* green LED on */ @@ -205,6 +202,8 @@ int main(int argc, char **argv) perror("ioctl VFDGETTIME"); break; } + if (t < t2 + 20) + diff = 20; t += diff; } tmp = gmtime(&t2);