mirror of
https://github.com/AsahiLinux/m1n1
synced 2024-09-20 13:11:53 +00:00
proxyclient:m1n1:rely on UartInterface defaults when creating object
- in 'main' section, device name and baud values are redundant as the UartInterface constructor handles it already - Add a comment on how to run proxy.py as script Signed-off-by: Alexis Deruelle <alexis.deruelle@gmail.com>
This commit is contained in:
parent
bd82c5f47a
commit
0673a226c9
1 changed files with 4 additions and 4 deletions
|
@ -1126,11 +1126,11 @@ class M1N1Proxy(Reloadable):
|
|||
__all__.extend(k for k, v in globals().items()
|
||||
if (callable(v) or isinstance(v, type)) and v.__module__ == __name__)
|
||||
|
||||
# To run m1n1/proxy.py as script, use:
|
||||
# $ cd <path to>/m1n1/proxyclient
|
||||
# $ python3 -m m1n1.proxy m1n1/proxy.py
|
||||
if __name__ == "__main__":
|
||||
import serial
|
||||
uartdev = os.environ.get("M1N1DEVICE", "/dev/m1n1")
|
||||
usbuart = serial.Serial(uartdev, 115200)
|
||||
uartif = UartInterface(usbuart, debug=True)
|
||||
uartif = UartInterface(device=None, debug=True)
|
||||
print("Sending NOP...", end=' ')
|
||||
uartif.nop()
|
||||
print("OK")
|
||||
|
|
Loading…
Reference in a new issue