Compare commits

...

8 Commits

Author SHA1 Message Date
Ben Meadors
055da95b8a Update protos and remove old max_channels check 2023-07-25 19:46:17 -05:00
Ben Meadors
0c2ad5c77c Merge pull request #453 from luzpaz/typos
Fix various source comment typos
2023-07-25 19:42:44 -05:00
luzpaz
0a88ca6a5c Fix various source comment typos
Found via `codespell -q 3`
2023-07-15 01:04:47 +00:00
github-actions
51079d4f25 bump version 2023-07-09 11:26:51 +00:00
Ben Meadors
4ca3b4bf58 Update protobufs 2023-07-09 06:25:24 -05:00
Ben Meadors
25d42d3361 Merge pull request #451 from hhartzer/python-3.11
Update Github CI removing end-of-lifed Python 3.6 and 3.7, add 3.11
2023-07-07 19:43:51 -05:00
Henrich Hartzer
a1bffe4f26 Update Github CI removing end-of-lifed Python 3.6 and 3.7, add 3.11 2023-07-07 15:44:19 +00:00
github-actions
b87630803f bump version 2023-06-28 01:16:18 +00:00
12 changed files with 110 additions and 93 deletions

View File

@@ -13,11 +13,10 @@ jobs:
strategy:
matrix:
python-version:
- "3.6"
- "3.7"
- "3.8"
- "3.9"
- "3.10"
- "3.11"
steps:
- uses: actions/checkout@v2
- name: Install Python 3
@@ -55,11 +54,10 @@ jobs:
strategy:
matrix:
python-version:
- "3.6"
- "3.7"
- "3.8"
- "3.9"
- "3.10"
- "3.11"
steps:
- uses: actions/checkout@v2
- name: Install Python 3

View File

@@ -1,4 +1,4 @@
# Note: Docs are generated from this command below, albeit from Vercel.
# The docs/ dir is not used and is no longer commited.
# The docs/ dir is not used and is no longer committed.
# see sachaw if you have questions
pdoc3 --html -f --output-dir docs meshtastic

View File

@@ -98,7 +98,7 @@ LOCAL_ADDR = "^local"
"""A special ID that means the local node"""
BROADCAST_NUM = 0xFFFFFFFF
"""if using 8 bit nodenums this will be shortend on the target"""
"""if using 8 bit nodenums this will be shortened on the target"""
BROADCAST_ADDR = "^all"
"""A special ID that means broadcast"""
@@ -172,7 +172,7 @@ def _onNodeInfoReceive(iface, asDict):
# update node DB as needed
n = iface._getOrCreateByNum(asDict["from"])
n["user"] = p
# We now have a node ID, make sure it is uptodate in that table
# We now have a node ID, make sure it is up-to-date in that table
iface.nodes[p["id"]] = n
_receiveInfoUpdate(iface, asDict)

View File

@@ -130,7 +130,7 @@ class MeshInterface:
"""Show table summary of nodes in mesh"""
def formatFloat(value, precision=2, unit=""):
"""Format a float value with precsion."""
"""Format a float value with precision."""
return f"{value:.{precision}f}{unit}" if value else None
def getLH(ts):
@@ -704,13 +704,6 @@ class MeshInterface:
"For more information see https://tinyurl.com/5bjsxu32"
)
# check for firmware too old
if self.myInfo.max_channels == 0:
failmsg = (
"This version of meshtastic-python requires device firmware version 1.2 or later. "
"For more information see https://tinyurl.com/5bjsxu32"
)
if failmsg:
self.failure = Exception(failmsg)
self.isConnected.set() # let waitConnected return this exception
@@ -843,7 +836,7 @@ class MeshInterface:
if nodeNum in self.nodesByNum:
return self.nodesByNum[nodeNum]
else:
n = {"num": nodeNum} # Create a minimial node db entry
n = {"num": nodeNum} # Create a minimal node db entry
self.nodesByNum[nodeNum] = n
return n

View File

File diff suppressed because one or more lines are too long

View File

File diff suppressed because one or more lines are too long

View File

@@ -221,7 +221,7 @@ class Node:
return ch
def deleteChannel(self, channelIndex):
"""Delete the specifed channelIndex and shift other channels up"""
"""Delete the specified channelIndex and shift other channels up"""
ch = self.channels[channelIndex]
if ch.role not in (
channel_pb2.Channel.Role.SECONDARY,
@@ -654,7 +654,7 @@ class Node:
return
c = p["decoded"]["admin"]["raw"].get_device_metadata_response
self._timeout.reset() # We made foreward progress
self._timeout.reset() # We made forward progress
logging.debug(f"Received metadata {stripnl(c)}")
print(f"\nfirmware_version: {c.firmware_version}")
print(f"device_state_version: {c.device_state_version}")
@@ -681,7 +681,7 @@ class Node:
c = p["decoded"]["admin"]["raw"].get_channel_response
self.partialChannels.append(c)
self._timeout.reset() # We made foreward progress
self._timeout.reset() # We made forward progress
logging.debug(f"Received channel {stripnl(c)}")
index = c.index

View File

@@ -60,7 +60,7 @@ class StreamInterface(MeshInterface):
# Send some bogus UART characters to force a sleeping device to wake, and
# if the reading statemachine was parsing a bad packet make sure
# we write enought start bytes to force it to resync (we don't use START1
# we write enough start bytes to force it to resync (we don't use START1
# because we want to ensure it is looking for START1)
p = bytearray([START2] * 32)
self._writeBytes(p)

View File

@@ -6,7 +6,7 @@ import subprocess
import time
# Do not like using hard coded sleeps, but it probably makes
# sense to pause for the radio at apprpriate times
# sense to pause for the radio at appropriate times
import pytest
from ..util import findPorts

View File

@@ -14,7 +14,7 @@ import subprocess
import time
# Do not like using hard coded sleeps, but it probably makes
# sense to pause for the radio at apprpriate times
# sense to pause for the radio at appropriate times
import pytest
from ..util import findPorts

View File

@@ -13,7 +13,7 @@ with open("README.md", "r") as fh:
# This call to setup() does all the work
setup(
name="meshtastic",
version="2.1.8",
version="2.1.10",
description="Python API & client shell for talking to Meshtastic devices",
long_description=long_description,
long_description_content_type="text/markdown",
@@ -28,6 +28,7 @@ setup(
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
],
packages=["meshtastic"],
include_package_data=True,