-
Notifications
You must be signed in to change notification settings - Fork 186
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PowerMon/StructuredLogging support #607
Changes from all commits
b41cb7d
a3462e0
338f00a
21e5601
a1f86a3
cc60f3e
362c1f3
be74c3e
0e45637
79c65c1
9c657c6
51c6c2c
67e1e7c
46edd78
7b18fd5
b7f7a40
6c0e978
8b781d3
1add293
5ff4025
ea18057
26a672e
dc8348b
43e1f65
7ce7d73
91066f6
9cdfde4
c656171
07fc991
1b045be
8d94458
9b61f11
2202414
402622f
d448ea5
d1aadf0
f8ad4fe
ff20ad5
231bc25
4ca9aa2
8761b32
b063d33
ef4b534
f2c4274
320bb30
047a56d
715a085
1587c31
67bb666
2294546
c935123
119be81
dabb4ea
542f99b
821d3e9
42236f2
1da687c
13ca8fd
8f98878
6da04f7
2f5a736
ae2ef78
5695ec7
6332798
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,4 +16,5 @@ __pycache__ | |
examples/__pycache__ | ||
meshtastic.spec | ||
.hypothesis/ | ||
coverage.xml | ||
coverage.xml | ||
.ipynb_checkpoints |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,16 @@ | ||
{ | ||
"cSpell.words": [ | ||
"bitmask", | ||
"boardid", | ||
"Meshtastic", | ||
"milliwatt", | ||
"portnums", | ||
"powermon", | ||
"POWERSTRESS", | ||
"pyarrow", | ||
"TORADIO", | ||
"Vids" | ||
], | ||
"python.pythonPath": "/usr/bin/python3" | ||
"python.pythonPath": "/usr/bin/python3", | ||
"flake8.enabled" : false // we are using trunk for formatting/linting rules, don't yell at us about line length | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -31,6 +31,7 @@ | |
- meshtastic.receive.user(packet) | ||
- meshtastic.receive.data.portnum(packet) (where portnum is an integer or well known PortNum enum) | ||
- meshtastic.node.updated(node = NodeInfo) - published when a node in the DB changes (appears, location changed, username changed, etc...) | ||
- meshtastic.log.line(line) - a raw unparsed log line from the radio | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I was mentioning before, I think I might change this, if that's okay (would do after merge, and I'd update the spot you've used it as well) -- I'd be changing it to pass the whole There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. yes - I agree, LogRecord is what should be passed (using the automatic KnownProtocol translation). IMO coloring should be done at the end and only for the stdout printer when it is going to an interactive terminal. |
||
We receive position, user, or data packets from the mesh. You probably only care about meshtastic.receive.data. The first argument for | ||
that publish will be the packet. Text or binary data packets (from sendData or sendText) will both arrive this way. If you print packet | ||
|
@@ -96,6 +97,7 @@ def onConnection(interface, topic=pub.AUTO_TOPIC): # called when we (re)connect | |
remote_hardware_pb2, | ||
storeforward_pb2, | ||
telemetry_pb2, | ||
powermon_pb2 | ||
) | ||
from . import ( | ||
util, | ||
|
@@ -228,6 +230,9 @@ def _receiveInfoUpdate(iface, asDict): | |
portnums_pb2.PortNum.TRACEROUTE_APP: KnownProtocol( | ||
"traceroute", mesh_pb2.RouteDiscovery | ||
), | ||
portnums_pb2.PortNum.POWERSTRESS_APP: KnownProtocol( | ||
"powerstress", powermon_pb2.PowerStressMessage | ||
), | ||
portnums_pb2.PortNum.WAYPOINT_APP: KnownProtocol("waypoint", mesh_pb2.Waypoint), | ||
portnums_pb2.PortNum.PAXCOUNTER_APP: KnownProtocol("paxcounter", paxcount_pb2.Paxcount), | ||
portnums_pb2.PortNum.STORE_FORWARD_APP: KnownProtocol("storeforward", storeforward_pb2.StoreAndForward), | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(comment at random line in file)
I know basically nothing about vscode so I'm just gonna trust that these settings make sense. If someone else who actually uses vscode wants to validate, feel free.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yah - these are just vscode warned me that "python" is deprecated and the new recommended string is pydebug...