diff --git a/e32_client/ugv.py b/e32_client/ugv.py index 7cd9907..97f67dc 100755 --- a/e32_client/ugv.py +++ b/e32_client/ugv.py @@ -103,9 +103,13 @@ class UGVComms(E32): continue 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, - timeout=2.0) + timeout=1.0) ugv = UGVComms(ser) ugv.start() time.sleep(0.2)