finally{}

This commit is contained in:
Florian Streibelt 2011-10-14 01:48:28 +02:00
parent f0fa719d9f
commit b83d15a461
2 changed files with 12 additions and 3 deletions

View File

@ -234,7 +234,7 @@ class Status:
# Show final balance for some time
clear()
self.dump()
print_display('\x0bDanke,%-14s' % (self.login_name[:13]+"!") )
print_display('\x0bDanke, %-12s' % (self.login_name[:12]+"!") )
delay('Logout', 3)
# Logout

View File

@ -20,6 +20,7 @@
int fd;
int display_dirty=0;
int screensaver;
int brightness = 4;
int offset = 0;
@ -108,9 +109,9 @@ char display_set_timer[] = { 0x1F, 0x54 };
#define TIME_BASE 200000
#define TB_TO_SECS(x) (x*1000000/TIME_BASE)
#define TIME_CLOCK TB_TO_SECS(5)
#define TIME_CLOCK TB_TO_SECS(65)
#define TIME_DIM TB_TO_SECS(90)
#define TIME_OFF TB_TO_SECS(320)
#define TIME_OFF TB_TO_SECS(520)
#define DEVICE "/dev/ttyUSB0"
@ -220,6 +221,11 @@ rthread (void *args)
{
screensaver = 0;
if (display_dirty) {
printf("DEBUG: resetting display\n");
SEND_DISPLAY_INIT;
display_dirty=0;
}
display_dim (4);
if (pc == '\n')
@ -363,10 +369,12 @@ main (int argc, char **argv)
if (screensaver == TIME_CLOCK)
{
display_dirty=1;
showtime ();
}
if (screensaver == TIME_OFF)
{
display_dirty=1;
display_dim (0);
}
@ -374,6 +382,7 @@ main (int argc, char **argv)
//show a scroll text while the screensaver is active...
if ((screensaver > (TIME_CLOCK + 10)) && (screensaver < TIME_OFF))
{
display_dirty=1;
scrolltext();
}