Skip to content

Commit

Permalink
Merge pull request #463 from GUVWAF/AmbientLighting
Browse files Browse the repository at this point in the history
  • Loading branch information
thebentern authored Nov 2, 2023
2 parents 236d30f + e25b183 commit 5076119
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
4 changes: 4 additions & 0 deletions meshtastic/mesh_interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -874,6 +874,10 @@ def _handleFromRadio(self, fromRadioBytes):
self.localNode.moduleConfig.detection_sensor.CopyFrom(
fromRadio.moduleConfig.detection_sensor
)
elif fromRadio.moduleConfig.HasField("ambient_lighting"):
self.localNode.moduleConfig.ambient_lighting.CopyFrom(
fromRadio.moduleConfig.ambient_lighting
)

else:
logging.debug("Unexpected FromRadio payload")
Expand Down
2 changes: 2 additions & 0 deletions meshtastic/node.py
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,8 @@ def writeConfig(self, config_name):
p.set_module_config.neighbor_info.CopyFrom(self.moduleConfig.neighbor_info)
elif config_name == "detection_sensor":
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)
else:
our_exit(f"Error: No valid config with name {config_name}")

Expand Down

0 comments on commit 5076119

Please sign in to comment.