From 7a627ee1f13930adf12207de47eb59d126ed0579 Mon Sep 17 00:00:00 2001 From: jedi Date: Thu, 18 Nov 2021 04:03:53 +0100 Subject: [PATCH] add cli argument for address to otaflash.py --- firmware/otaflash.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/firmware/otaflash.py b/firmware/otaflash.py index c7f51a7..2c52133 100755 --- a/firmware/otaflash.py +++ b/firmware/otaflash.py @@ -8,6 +8,7 @@ from websocket import WebSocketTimeoutException parser = argparse.ArgumentParser(description='Update fiatlux firmware via websocket.') parser.add_argument("binfile") +parser.add_argument("address") args = parser.parse_args() @@ -25,7 +26,7 @@ with open(args.binfile, "rb") as f: try: ws = websocket.WebSocket() print("send {}".format(args.binfile)) - ws.connect("ws://172.16.0.1") + ws.connect("ws://" + args.address) i = 0 bytes = f.read() rolling = zlib.crc32(bytes)