From 8977c35100dbfba2beeb7dd832dd90daef2922ec Mon Sep 17 00:00:00 2001 From: Florent de Lamotte Date: Mon, 3 Feb 2025 17:32:46 +0100 Subject: [PATCH] fixed push codes and added sleep cmd (to wait for msgs) --- mc-cli.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/mc-cli.py b/mc-cli.py index dfac313..63f28be 100755 --- a/mc-cli.py +++ b/mc-cli.py @@ -103,13 +103,13 @@ class MeshCore: res["text"] = data[13:].decode() self.result.set_result(res) # push notifications - case 80: + case 0x80: print ("Advertisment received") - case 81: + case 0x81: print("Code path update") - case 82: + case 0x82: print("Received ACK") - case 83: + case 0x83: print("Msgs are waiting") # unhandled case _: @@ -192,5 +192,7 @@ async def main(args): print(await mc.send_advert()) case "set_name" : print(await mc.set_name(args[2])) + case "sleep" : + await asyncio.sleep(int(args[2])) asyncio.run(main(sys.argv))