From 3db73a88837253167b5e373c988d64e6b86cbfe1 Mon Sep 17 00:00:00 2001 From: Florent de Lamotte Date: Tue, 15 Apr 2025 11:58:47 +0200 Subject: [PATCH] Fixed issue with chan messages, waited for MSG_SENT instead of OK --- examples/ble_t1000_chan_msg.py | 2 +- pyproject.toml | 2 +- src/meshcore/commands.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/examples/ble_t1000_chan_msg.py b/examples/ble_t1000_chan_msg.py index 0eacf7a..c22df3c 100755 --- a/examples/ble_t1000_chan_msg.py +++ b/examples/ble_t1000_chan_msg.py @@ -5,7 +5,7 @@ import json from meshcore import MeshCore from meshcore import BLEConnection -ADDRESS = "t1000" # node ble adress or name +ADDRESS = "echo" # node ble adress or name DEST = "mchome" MSG = "Hello World" diff --git a/pyproject.toml b/pyproject.toml index a120b37..d0ad2ef 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "hatchling.build" [project] name = "meshcore" -version = "1.9.3" +version = "1.9.4" authors = [ { name="Florent de Lamotte", email="florent@frizoncorrea.fr" }, { name="Alex Wolden", email="awolden@gmail.com" }, diff --git a/src/meshcore/commands.py b/src/meshcore/commands.py index 4e034ef..4cb93a6 100644 --- a/src/meshcore/commands.py +++ b/src/meshcore/commands.py @@ -304,7 +304,7 @@ class CommandHandler: timestamp = int(time.time()).to_bytes(4, 'little') data = b"\x03\x00" + chan.to_bytes(1, 'little') + timestamp + msg.encode("ascii") - return await self.send(data, [EventType.MSG_SENT, EventType.ERROR]) + return await self.send(data, [EventType.OK, EventType.ERROR]) async def send_cli(self, cmd) -> Event: logger.debug(f"Sending CLI command: {cmd}")