Bugs removed that prevented the screen from turning on again.:

This commit is contained in:
Florian Streibelt 2011-10-13 19:19:17 +02:00
parent f9550712d8
commit e36d00c393
2 changed files with 7 additions and 2 deletions

View File

@ -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

View File

@ -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)
{