mirror of
https://github.com/meshcore-dev/meshcore_py.git
synced 2026-06-11 11:56:18 +00:00
Fixed issue with chan messages, waited for MSG_SENT instead of OK
This commit is contained in:
@@ -5,7 +5,7 @@ import json
|
|||||||
from meshcore import MeshCore
|
from meshcore import MeshCore
|
||||||
from meshcore import BLEConnection
|
from meshcore import BLEConnection
|
||||||
|
|
||||||
ADDRESS = "t1000" # node ble adress or name
|
ADDRESS = "echo" # node ble adress or name
|
||||||
DEST = "mchome"
|
DEST = "mchome"
|
||||||
MSG = "Hello World"
|
MSG = "Hello World"
|
||||||
|
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
|
|||||||
|
|
||||||
[project]
|
[project]
|
||||||
name = "meshcore"
|
name = "meshcore"
|
||||||
version = "1.9.3"
|
version = "1.9.4"
|
||||||
authors = [
|
authors = [
|
||||||
{ name="Florent de Lamotte", email="florent@frizoncorrea.fr" },
|
{ name="Florent de Lamotte", email="florent@frizoncorrea.fr" },
|
||||||
{ name="Alex Wolden", email="awolden@gmail.com" },
|
{ name="Alex Wolden", email="awolden@gmail.com" },
|
||||||
|
|||||||
@@ -304,7 +304,7 @@ class CommandHandler:
|
|||||||
timestamp = int(time.time()).to_bytes(4, 'little')
|
timestamp = int(time.time()).to_bytes(4, 'little')
|
||||||
|
|
||||||
data = b"\x03\x00" + chan.to_bytes(1, 'little') + timestamp + msg.encode("ascii")
|
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:
|
async def send_cli(self, cmd) -> Event:
|
||||||
logger.debug(f"Sending CLI command: {cmd}")
|
logger.debug(f"Sending CLI command: {cmd}")
|
||||||
|
|||||||
Reference in New Issue
Block a user