add cli argument for address to otaflash.py
This commit is contained in:
parent
24f5e4398d
commit
7a627ee1f1
1 changed files with 2 additions and 1 deletions
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue