Ambient lighting (#2779)

* This was already defined and throwing a ton of warnings

* Ambient lighting module feature

* Use local instance type
This commit is contained in:
Ben Meadors
2023-09-07 12:24:47 -05:00
committed by GitHub
parent fd563e41f1
commit dcdf9b64de
6 changed files with 91 additions and 13 deletions

View File

@@ -255,6 +255,13 @@ void NodeDB::installDefaultModuleConfig()
moduleConfig.detection_sensor.detection_triggered_high = true;
moduleConfig.detection_sensor.minimum_broadcast_secs = 45;
moduleConfig.has_ambient_lighting = true;
moduleConfig.ambient_lighting.current = 10;
// Default to a color based on our node number
moduleConfig.ambient_lighting.red = (myNodeInfo.my_node_num & 0xFF0000) >> 16;
moduleConfig.ambient_lighting.green = (myNodeInfo.my_node_num & 0x00FF00) >> 8;
moduleConfig.ambient_lighting.blue = myNodeInfo.my_node_num & 0x0000FF;
initModuleConfigIntervals();
}