mirror of
https://github.com/meshtastic/python.git
synced 2025-12-31 11:57:57 -05:00
0.7.3
This commit is contained in:
@@ -123,6 +123,7 @@ import google.protobuf.json_format
|
||||
import serial
|
||||
import threading
|
||||
import logging
|
||||
import time
|
||||
import sys
|
||||
import traceback
|
||||
from . import mesh_pb2
|
||||
@@ -418,9 +419,17 @@ class StreamInterface(MeshInterface):
|
||||
self.stream = serial.Serial(
|
||||
devPath, 921600, exclusive=True, timeout=0.5)
|
||||
self._rxThread = threading.Thread(target=self.__reader, args=())
|
||||
self._rxThread.start()
|
||||
|
||||
# Send some bogus UART characters to force a sleeping device to wake
|
||||
self.stream.write(bytes([START1, START1, START1, START1]))
|
||||
self.stream.flush()
|
||||
time.sleep(0.1) # wait 100ms to give device time to start running
|
||||
|
||||
MeshInterface.__init__(self, debugOut=debugOut, noProto=noProto)
|
||||
|
||||
# Start the reader thread after superclass constructor completes init
|
||||
self._rxThread.start()
|
||||
|
||||
def _sendToRadio(self, toRadio):
|
||||
"""Send a ToRadio protobuf to the device"""
|
||||
logging.debug(f"Sending: {toRadio}")
|
||||
@@ -969,9 +978,17 @@ debugOut {stream} – If a stream is provided, any debug serial output from
|
||||
self.stream = serial.Serial(
|
||||
devPath, 921600, exclusive=True, timeout=0.5)
|
||||
self._rxThread = threading.Thread(target=self.__reader, args=())
|
||||
self._rxThread.start()
|
||||
|
||||
# Send some bogus UART characters to force a sleeping device to wake
|
||||
self.stream.write(bytes([START1, START1, START1, START1]))
|
||||
self.stream.flush()
|
||||
time.sleep(0.1) # wait 100ms to give device time to start running
|
||||
|
||||
MeshInterface.__init__(self, debugOut=debugOut, noProto=noProto)
|
||||
|
||||
# Start the reader thread after superclass constructor completes init
|
||||
self._rxThread.start()
|
||||
|
||||
def _sendToRadio(self, toRadio):
|
||||
"""Send a ToRadio protobuf to the device"""
|
||||
logging.debug(f"Sending: {toRadio}")
|
||||
|
||||
2
setup.py
2
setup.py
@@ -10,7 +10,7 @@ with open("README.md", "r") as fh:
|
||||
# This call to setup() does all the work
|
||||
setup(
|
||||
name="meshtastic",
|
||||
version="0.7.2",
|
||||
version="0.7.3",
|
||||
description="Python API & client shell for talking to Meshtastic devices",
|
||||
long_description=long_description,
|
||||
long_description_content_type="text/markdown",
|
||||
|
||||
Reference in New Issue
Block a user