mirror of
https://github.com/meshtastic/python.git
synced 2026-01-03 21:37:57 -05:00
add paxcounter moduleConfig
(fixes Bug #485 "No valid config with name paxcounter" for me)
This commit is contained in:
@@ -878,6 +878,10 @@ class MeshInterface:
|
||||
self.localNode.moduleConfig.ambient_lighting.CopyFrom(
|
||||
fromRadio.moduleConfig.ambient_lighting
|
||||
)
|
||||
elif fromRadio.moduleConfig.HasField("paxcounter"):
|
||||
self.localNode.moduleConfig.paxcounter.CopyFrom(
|
||||
fromRadio.moduleConfig.paxcounter
|
||||
)
|
||||
|
||||
else:
|
||||
logging.debug("Unexpected FromRadio payload")
|
||||
|
||||
@@ -194,6 +194,8 @@ class Node:
|
||||
p.set_module_config.detection_sensor.CopyFrom(self.moduleConfig.detection_sensor)
|
||||
elif config_name == "ambient_lighting":
|
||||
p.set_module_config.ambient_lighting.CopyFrom(self.moduleConfig.ambient_lighting)
|
||||
elif config_name == "paxcounter":
|
||||
p.set_module_config.paxcounter.CopyFrom(self.moduleConfig.paxcounter)
|
||||
else:
|
||||
our_exit(f"Error: No valid config with name {config_name}")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user