mirror of
https://github.com/meshtastic/python.git
synced 2026-01-04 22:08:00 -05:00
cleanup fixme
This commit is contained in:
@@ -102,10 +102,10 @@ sudo usermod -a -G dialout <username>
|
||||
|
||||
## A note to developers of this lib
|
||||
|
||||
We use the visual-studio-code default python formatting conventions. So if you use that IDE you should be able to use "Format Document" and not generate unrelated diffs. If you use some other editor, please don't change formatting on lines you haven't changed.
|
||||
We use the visual-studio-code default python formatting conventions (autopep8). So if you use that IDE you should be able to use "Format Document" and not generate unrelated diffs. If you use some other editor, please don't change formatting on lines you haven't changed.
|
||||
|
||||
If you need to build a new release you'll need:
|
||||
```
|
||||
apt install pandoc
|
||||
sudo pip3 install markdown pandoc webencodings pyparsing twine
|
||||
sudo pip3 install markdown pandoc webencodings pyparsing twine autopep8
|
||||
```
|
||||
@@ -68,6 +68,7 @@ import base64
|
||||
import platform
|
||||
import socket
|
||||
from . import mesh_pb2, portnums_pb2, apponly_pb2, util
|
||||
from .util import fixme, catchAndIgnore
|
||||
from pubsub import pub
|
||||
from dotmap import DotMap
|
||||
|
||||
@@ -90,14 +91,6 @@ format is Mmmss (where M is 1+the numeric major number. i.e. 20120 means 1.1.20
|
||||
OUR_APP_VERSION = 20200
|
||||
|
||||
|
||||
def catchAndIgnore(reason, closure):
|
||||
"""Call a closure but if it throws an excpetion print it and continue"""
|
||||
try:
|
||||
closure()
|
||||
except BaseException as ex:
|
||||
logging.error(f"Exception thrown in {reason}: {ex}")
|
||||
|
||||
|
||||
class MeshInterface:
|
||||
"""Interface class for meshtastic devices
|
||||
|
||||
@@ -379,8 +372,8 @@ class MeshInterface:
|
||||
"""
|
||||
Done with initial config messages, now send regular MeshPackets to ask for settings and channels
|
||||
"""
|
||||
self._requestSettings()
|
||||
self._requestChannels()
|
||||
# self._requestSettings()
|
||||
# self._requestChannels()
|
||||
# FIXME, the following should only be called after we have settings and channels
|
||||
self._connected() # Tell everone else we are ready to go
|
||||
|
||||
|
||||
@@ -7,6 +7,17 @@ import serial.tools.list_ports
|
||||
blacklistVids = dict.fromkeys([0x1366])
|
||||
|
||||
|
||||
def fixme(message):
|
||||
raise Exception(f"FIXME: {message}")
|
||||
|
||||
|
||||
def catchAndIgnore(reason, closure):
|
||||
"""Call a closure but if it throws an excpetion print it and continue"""
|
||||
try:
|
||||
closure()
|
||||
except BaseException as ex:
|
||||
logging.error(f"Exception thrown in {reason}: {ex}")
|
||||
|
||||
def findPorts():
|
||||
"""Find all ports that might have meshtastic devices
|
||||
|
||||
|
||||
2
proto
2
proto
Submodule proto updated: f6ff4cc0c9...6bb139c0a4
Reference in New Issue
Block a user