From 7709620f9ae42ab33759111228cabc6239299298 Mon Sep 17 00:00:00 2001 From: Clive Blackledge Date: Mon, 19 Jan 2026 22:15:00 -0800 Subject: [PATCH] Add traffic management module to the config. --- meshtastic/mesh_interface.py | 4 ++++ meshtastic/node.py | 2 ++ 2 files changed, 6 insertions(+) diff --git a/meshtastic/mesh_interface.py b/meshtastic/mesh_interface.py index 20e43b9d..eb0bdaf0 100644 --- a/meshtastic/mesh_interface.py +++ b/meshtastic/mesh_interface.py @@ -1455,6 +1455,10 @@ def _handleFromRadio(self, fromRadioBytes): self.localNode.moduleConfig.paxcounter.CopyFrom( fromRadio.moduleConfig.paxcounter ) + elif fromRadio.moduleConfig.HasField("traffic_management"): + self.localNode.moduleConfig.traffic_management.CopyFrom( + fromRadio.moduleConfig.traffic_management + ) else: logger.debug("Unexpected FromRadio payload") diff --git a/meshtastic/node.py b/meshtastic/node.py index afb5611a..be27e689 100644 --- a/meshtastic/node.py +++ b/meshtastic/node.py @@ -245,6 +245,8 @@ def writeConfig(self, config_name): p.set_module_config.ambient_lighting.CopyFrom(self.moduleConfig.ambient_lighting) elif config_name == "paxcounter": p.set_module_config.paxcounter.CopyFrom(self.moduleConfig.paxcounter) + elif config_name == "traffic_management": + p.set_module_config.traffic_management.CopyFrom(self.moduleConfig.traffic_management) else: our_exit(f"Error: No valid config with name {config_name}")