Skip to content

Commit

Permalink
m1n1.proxy: Default to /dev/m1n1
Browse files Browse the repository at this point in the history
We have udev rules, let's just default to a pretty device name to avoid
conflicts with other devices.

Signed-off-by: Hector Martin <[email protected]>
  • Loading branch information
marcan committed Jul 30, 2022
1 parent 0cf1f39 commit 1247c2b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions proxyclient/m1n1/proxy.py
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ def __init__(self, device=None, debug=False):
self.debug = debug
self.devpath = None
if device is None:
device = os.environ.get("M1N1DEVICE", "/dev/ttyACM0:115200")
device = os.environ.get("M1N1DEVICE", "/dev/m1n1:115200")
if isinstance(device, str):
baud = 115200
if ":" in device:
Expand Down Expand Up @@ -1076,7 +1076,7 @@ def dapf_init(self, path):

if __name__ == "__main__":
import serial
uartdev = os.environ.get("M1N1DEVICE", "/dev/ttyACM0")
uartdev = os.environ.get("M1N1DEVICE", "/dev/m1n1")
usbuart = serial.Serial(uartdev, 115200)
uartif = UartInterface(usbuart, debug=True)
print("Sending NOP...", end=' ')
Expand Down

0 comments on commit 1247c2b

Please sign in to comment.