|
|
@ -103,9 +103,13 @@ class UGVComms(E32): |
|
|
|
continue |
|
|
|
continue |
|
|
|
|
|
|
|
|
|
|
|
def main(): |
|
|
|
def main(): |
|
|
|
ser = serial.serial_for_url("/dev/ttyUSB2", baudrate=9600, parity=serial.PARITY_NONE, |
|
|
|
if len(sys.argv) >= 2: |
|
|
|
|
|
|
|
ser_url = sys.argv[1] |
|
|
|
|
|
|
|
else: |
|
|
|
|
|
|
|
ser_url = "hwgrep://" |
|
|
|
|
|
|
|
ser = serial.serial_for_url(ser_url, baudrate=9600, parity=serial.PARITY_NONE, |
|
|
|
stopbits=serial.STOPBITS_ONE, bytesize=serial.EIGHTBITS, |
|
|
|
stopbits=serial.STOPBITS_ONE, bytesize=serial.EIGHTBITS, |
|
|
|
timeout=2.0) |
|
|
|
timeout=1.0) |
|
|
|
ugv = UGVComms(ser) |
|
|
|
ugv = UGVComms(ser) |
|
|
|
ugv.start() |
|
|
|
ugv.start() |
|
|
|
time.sleep(0.2) |
|
|
|
time.sleep(0.2) |
|
|
|