Revision 300
improved pingTest
common.py | ||
---|---|---|
248 | 248 |
return cmd == TT_ACK |
249 | 249 |
|
250 | 250 |
|
251 |
def initBus(filename): |
|
251 |
def initBus(filename, timeout=1):
|
|
252 | 252 |
global bus |
253 | 253 |
|
254 |
bus = serial.Serial(filename, BAUD_RATE, timeout = 1)
|
|
254 |
bus = serial.Serial(filename, BAUD_RATE, timeout=timeout)
|
|
255 | 255 |
bus.flushInput() |
256 | 256 |
print bus |
257 | 257 |
|
Also available in: Unified diff