Skip to content

Commit 193b8bc

Browse files
authored
Merge pull request #486 from thoherr/add-paxcounter-config
add paxcounter moduleConfig (fixes Bug #485)
2 parents 3321d84 + 22f2168 commit 193b8bc

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
@@ -878,6 +878,10 @@ def _handleFromRadio(self, fromRadioBytes):
878878
self.localNode.moduleConfig.ambient_lighting.CopyFrom(
879879
fromRadio.moduleConfig.ambient_lighting
880880
)
881+
elif fromRadio.moduleConfig.HasField("paxcounter"):
882+
self.localNode.moduleConfig.paxcounter.CopyFrom(
883+
fromRadio.moduleConfig.paxcounter
884+
)
881885

882886
else:
883887
logging.debug("Unexpected FromRadio payload")

meshtastic/node.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -194,6 +194,8 @@ def writeConfig(self, config_name):
194194
p.set_module_config.detection_sensor.CopyFrom(self.moduleConfig.detection_sensor)
195195
elif config_name == "ambient_lighting":
196196
p.set_module_config.ambient_lighting.CopyFrom(self.moduleConfig.ambient_lighting)
197+
elif config_name == "paxcounter":
198+
p.set_module_config.paxcounter.CopyFrom(self.moduleConfig.paxcounter)
197199
else:
198200
our_exit(f"Error: No valid config with name {config_name}")
199201

0 commit comments

Comments
 (0)