diff --git a/display-daemon/Makefile b/display-daemon/Makefile index d242e59..ceff071 100644 --- a/display-daemon/Makefile +++ b/display-daemon/Makefile @@ -2,3 +2,5 @@ CFLAGS=-g -Wall ser: ser.c gcc -ggdb -Wall ser.c -o ser -lpthread #mipsel-linux-uclibc-gcc -o ser.mips ser.c -lpthread +run: ser + ./ser diff --git a/display-daemon/ser.c b/display-daemon/ser.c index 9757d1a..7d3d911 100644 --- a/display-daemon/ser.c +++ b/display-daemon/ser.c @@ -217,6 +217,7 @@ rthread (void *args) { screensaver = 0; + display_dim (4); if (pc == '\n') { @@ -227,7 +228,6 @@ rthread (void *args) display_write (&c, 1); } pc = c; - display_dim (4); } close (pipe); } @@ -322,7 +322,10 @@ main (int argc, char **argv) } //printf ("screensaver = %05d brightness: %d\n", screensaver, brightness); - screensaver = (screensaver + 1) % TIME_CLOCK + TIME_OFF + TIME_DIM; + if (screensaver < (TIME_CLOCK + TIME_OFF + TIME_DIM + 10)){ + screensaver++; + } + //screensaver = (screensaver + 1) % (TIME_CLOCK + TIME_OFF + TIME_DIM + 10); if (screensaver == TIME_CLOCK) {