git.ucc.asn.au
/
zanchey
/
dispense2.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
note vis pyserial
[zanchey/dispense2.git]
/
sql-edition
/
servers
/
VendingMachine.py
diff --git
a/sql-edition/servers/VendingMachine.py
b/sql-edition/servers/VendingMachine.py
index
25d375b
..
d73eb4b
100644
(file)
--- a/
sql-edition/servers/VendingMachine.py
+++ b/
sql-edition/servers/VendingMachine.py
@@
-39,8
+39,13
@@
class VendingMachine:
def await_prompt(self):
self.wfh.flush()
state = 1
def await_prompt(self):
self.wfh.flush()
state = 1
+ timeout = 0.5
prefix = ''
s = ''
prefix = ''
s = ''
+ # mtearle - vending machine was dying wait for a response from
+ # the hardware, suspect it was missing characters
+ #
+ # fixed by migration to pyserial - but future good place to start
while True:
try:
s = self.rfh.read(1)
while True:
try:
s = self.rfh.read(1)
UCC
git Repository :: git.ucc.asn.au