From bfdb260d3acce5561308111273f07a7b3989dedd Mon Sep 17 00:00:00 2001 From: jdstroy Date: Thu, 16 Sep 2021 18:32:43 -0400 Subject: [PATCH 1/2] Add channelIndex parameter to sendText --- meshtastic/__init__.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/meshtastic/__init__.py b/meshtastic/__init__.py index b54a324..0f2d7a7 100644 --- a/meshtastic/__init__.py +++ b/meshtastic/__init__.py @@ -246,7 +246,8 @@ class MeshInterface: wantAck=False, wantResponse=False, hopLimit=defaultHopLimit, - onResponse=None): + onResponse=None, + channelIndex=0): """Send a utf8 string to some other node, if the node has a display it will also be shown on the device. Arguments: @@ -265,7 +266,8 @@ class MeshInterface: wantAck=wantAck, wantResponse=wantResponse, hopLimit=hopLimit, - onResponse=onResponse) + onResponse=onResponse, + channelIndex=channelIndex); def sendData(self, data, destinationId=BROADCAST_ADDR, portNum=portnums_pb2.PortNum.PRIVATE_APP, wantAck=False, From ea24bbcfafec0fa0bdb1f6568d75dc5ab87f6dd0 Mon Sep 17 00:00:00 2001 From: jdstroy Date: Thu, 16 Sep 2021 18:33:34 -0400 Subject: [PATCH 2/2] Fix a typo in the README --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index cf31c99..cf25508 100644 --- a/README.md +++ b/README.md @@ -37,7 +37,7 @@ For the rough notes/implementation plan see [TODO](https://github.com/meshtastic This pip package will also install a "meshtastic" command line executable, which displays packets sent over the network as JSON and lets you see serial debugging information from the meshtastic devices. The source code for this tool is also a good [example](https://github.com/meshtastic/Meshtastic-python/blob/master/meshtastic/__main__.py) of a 'complete' application that uses the meshtastic python API. -NOTE: This command is not run inside of python, you run it from your operating system shell prompt directly. If when you type "meshtastic" it doesn't find the command and you are using Windows: Check that the python "scripts" directory [is in your path](https://datatofish.com/add-python-to-windows-path/). +NOTE: This command is not run inside of python; you run it from your operating system shell prompt directly. If when you type "meshtastic" it doesn't find the command and you are using Windows: Check that the python "scripts" directory [is in your path](https://datatofish.com/add-python-to-windows-path/). To display a (partial) list of the available commands: @@ -146,7 +146,7 @@ There is a problem with Big Sur and pyserial. The workaround is to install a new pip3 install -U --pre pyserial ``` -Afterwards you can use the meshatstic python client again on MacOS. +Afterwards you can use the Meshtastic python client again on MacOS. ## A note to developers of this lib