Skip to content

Commit 545c3ab

Browse files
committed
Add traffic management module to the config.
1 parent fee2b6c commit 545c3ab

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

meshtastic/mesh_interface.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1455,6 +1455,10 @@ def _handleFromRadio(self, fromRadioBytes):
14551455
self.localNode.moduleConfig.paxcounter.CopyFrom(
14561456
fromRadio.moduleConfig.paxcounter
14571457
)
1458+
elif fromRadio.moduleConfig.HasField("traffic_management"):
1459+
self.localNode.moduleConfig.traffic_management.CopyFrom(
1460+
fromRadio.moduleConfig.traffic_management
1461+
)
14581462

14591463
else:
14601464
logger.debug("Unexpected FromRadio payload")

meshtastic/node.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -245,6 +245,8 @@ def writeConfig(self, config_name):
245245
p.set_module_config.ambient_lighting.CopyFrom(self.moduleConfig.ambient_lighting)
246246
elif config_name == "paxcounter":
247247
p.set_module_config.paxcounter.CopyFrom(self.moduleConfig.paxcounter)
248+
elif config_name == "traffic_management":
249+
p.set_module_config.traffic_management.CopyFrom(self.moduleConfig.traffic_management)
248250
else:
249251
our_exit(f"Error: No valid config with name {config_name}")
250252

0 commit comments

Comments
 (0)