finally usuable(?) again!

This commit is contained in:
Florian Streibelt 2011-10-19 00:27:02 +02:00
parent 4af7594490
commit 67ebf64ffe
2 changed files with 8 additions and 7 deletions

View File

@ -78,7 +78,7 @@ class Display(threading.Thread):
#print "Starting Display thread"
self.screensaver.start()
while(self.runme):
print("display thread loop\n")
#print("display thread loop\n")
self.mutex_get()
#print("display got mutex and handles scroll\n")
self.offset_line1 = self.display_handle_scroll(1,self.scroll_line1,self.offset_line1)
@ -203,6 +203,8 @@ class Display(threading.Thread):
if (not self.serialport == None):
if (idle_reset):
self.screensaver.idle_reset();
self.scroll_line1=None
self.scroll_line2=None
self.serialport.write(text)
else:
self.open_port()
@ -235,20 +237,20 @@ class Screensaver (threading.Thread):
self.display=display
self.runme=True
self.idlecounter=0
self.timeout_dim=10
self.timeout_message=20
self.timeout_off=32
self.timeout_dim=30
self.timeout_message=60
self.timeout_off=300
self.mutex = allocate_lock()
threading.Thread.__init__(self)
def run(self):
print "Starting Screensaver thread"
#print "Starting Screensaver thread"
while(self.runme):
self.mutex.acquire()
self._main_loop()
self.mutex.release()
time.sleep(.5)
print "Exiting Screensaver thread"
#print "Exiting Screensaver thread"
def terminate(self):
self.runme = False

View File

@ -430,7 +430,6 @@ def main():
myDisplay = Display("/dev/ttyUSB0")
myDisplay.start()
myDisplay.cmd_reset()
time.sleep(2)
myDisplay.cmd_cursor_show(False)
myDisplay.display_screen("HINWEIS","Herzlich willkommen bei der Freitagsrunde! *** ")