now starts without display too
This commit is contained in:
parent
8fd3a73d0a
commit
fb80a1a70d
|
@ -28,11 +28,10 @@ class Display(threading.Thread):
|
||||||
self.serialport=None
|
self.serialport=None
|
||||||
|
|
||||||
def open_port(self):
|
def open_port(self):
|
||||||
|
|
||||||
self.mutex_get()
|
|
||||||
try:
|
try:
|
||||||
self.serialport = serial.Serial(self.portname,9600,timeout=2,rtscts=True, dsrdtr=True)
|
self.serialport = serial.Serial(self.portname,9600,timeout=2,rtscts=True, dsrdtr=True)
|
||||||
#print ("Initializing display on port:\n %s\n" % self.serialport )
|
#print ("Initializing display on port:\n %s\n" % self.serialport )
|
||||||
|
self.mutex_get()
|
||||||
self.cmd_reset()
|
self.cmd_reset()
|
||||||
self.mutex_release()
|
self.mutex_release()
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
|
@ -40,8 +39,6 @@ class Display(threading.Thread):
|
||||||
#print ("Ignoring and trying to open it again later\n")
|
#print ("Ignoring and trying to open it again later\n")
|
||||||
#print (e)
|
#print (e)
|
||||||
self.serialport = None
|
self.serialport = None
|
||||||
self.mutex_release()
|
|
||||||
pass
|
|
||||||
|
|
||||||
|
|
||||||
#Helper-Function, scrolls text in a specific line.
|
#Helper-Function, scrolls text in a specific line.
|
||||||
|
|
|
@ -121,9 +121,11 @@ def item_info_page(item):
|
||||||
print('und kostet')
|
print('und kostet')
|
||||||
print()
|
print()
|
||||||
if item.deposit > 0:
|
if item.deposit > 0:
|
||||||
|
myDisplay.display_screen("PREISINFO","%s: %4.2f Euro (%4.2f Euro Pfand)" % (item.name,item.price,item.deposit))
|
||||||
print(indent + '%s%4.2f Euro%s (plus %4.2f Euro Pfand) .' \
|
print(indent + '%s%4.2f Euro%s (plus %4.2f Euro Pfand) .' \
|
||||||
% (COLOR_MUCH, item.price, COLOR_RESET, item.deposit))
|
% (COLOR_MUCH, item.price, COLOR_RESET, item.deposit))
|
||||||
else:
|
else:
|
||||||
|
myDisplay.display_screen("PREISINFO","%s: %4.2f Euro" % (item.name,item.price))
|
||||||
print(indent + '%s%4.2f Euro%s .' \
|
print(indent + '%s%4.2f Euro%s .' \
|
||||||
% (COLOR_MUCH, item.price, COLOR_RESET))
|
% (COLOR_MUCH, item.price, COLOR_RESET))
|
||||||
print()
|
print()
|
||||||
|
|
Loading…
Reference in New Issue