Skip to content

Commit d03c785

Browse files
committed
Add missing portnums to the dict for automatic decoding as protocol buffers/text
1 parent 54303b5 commit d03c785

1 file changed

Lines changed: 15 additions & 0 deletions

File tree

meshtastic/__init__.py

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,8 +84,11 @@ def onConnection(interface, topic=pub.AUTO_TOPIC): # called when we (re)connect
8484
channel_pb2,
8585
config_pb2,
8686
mesh_pb2,
87+
mqtt_pb2,
88+
paxcount_pb2,
8789
portnums_pb2,
8890
remote_hardware_pb2,
91+
storeforward_pb2,
8992
telemetry_pb2,
9093
util,
9194
)
@@ -190,6 +193,13 @@ def _receiveInfoUpdate(iface, asDict):
190193
portnums_pb2.PortNum.TEXT_MESSAGE_APP: KnownProtocol(
191194
"text", onReceive=_onTextReceive
192195
),
196+
portnums_pb2.PortNum.RANGE_TEST_APP: KnownProtocol(
197+
"rangetest", onReceive=_onTextReceive
198+
),
199+
portnums_pb2.PortNum.DETECTION_SENSOR_APP: KnownProtocol(
200+
"rangetest", onReceive=_onTextReceive
201+
),
202+
193203
portnums_pb2.PortNum.POSITION_APP: KnownProtocol(
194204
"position", mesh_pb2.Position, _onPositionReceive
195205
),
@@ -208,4 +218,9 @@ def _receiveInfoUpdate(iface, asDict):
208218
portnums_pb2.PortNum.TRACEROUTE_APP: KnownProtocol(
209219
"traceroute", mesh_pb2.RouteDiscovery
210220
),
221+
portnums_pb2.PortNum.WAYPOINT_APP: KnownProtocol("waypoint", mesh_pb2.Waypoint),
222+
portnums_pb2.PortNum.PAXCOUNTER_APP: KnownProtocol("paxcounter", paxcount_pb2.Paxcount),
223+
portnums_pb2.PortNum.STORE_FORWARD_APP: KnownProtocol("storeforward", storeforward_pb2.StoreAndForward),
224+
portnums_pb2.PortNum.NEIGHBORINFO_APP: KnownProtocol("neighborinfo", mesh_pb2.NeighborInfo),
225+
portnums_pb2.PortNum.MAP_REPORT_APP: KnownProtocol("mapreport", mqtt_pb2.MapReport),
211226
}

0 commit comments

Comments
 (0)