From 432d68ef91e13831bd592fe87dd0875a77047a3a Mon Sep 17 00:00:00 2001 From: Jon Date: Wed, 28 Jun 2023 11:05:28 -0400 Subject: [PATCH 1/3] AmbientLightingModule --- meshtastic/module_config.options | 5 +++++ meshtastic/module_config.proto | 20 ++++++++++++++++++++ 2 files changed, 25 insertions(+) diff --git a/meshtastic/module_config.options b/meshtastic/module_config.options index 32647b3..ed45932 100644 --- a/meshtastic/module_config.options +++ b/meshtastic/module_config.options @@ -18,3 +18,8 @@ *RemoteHardwareConfig.available_pins max_count:4 *RemoteHardwarePin.name max_size:15 *RemoteHardwarePin.gpio_pin int_size:8 + +*AmbientLightingConfig.current int_size:8 +*AmbientLightingConfig.red int_size:8 +*AmbientLightingConfig.green int_size:8 +*AmbientLightingConfig.blue int_size:8 \ No newline at end of file diff --git a/meshtastic/module_config.proto b/meshtastic/module_config.proto index 5008afb..ad055d7 100644 --- a/meshtastic/module_config.proto +++ b/meshtastic/module_config.proto @@ -583,6 +583,26 @@ message ModuleConfig { */ NeighborInfoConfig neighbor_info = 10; } + + /*Ambient Lighting Module - Settings for control of onboard LEDs to allow users to adjust the brightness levels and respective color levels. +Initially created for the RAK14001 RGB LED module. +*/ + +message AmblientLightingConfig { + +/*Sets the overall current for the LED, range for the RAK14001 is 1-31*/ + uint32 current = 1; + +/*Sets the red level of the LED, values are 0-255*/ + + uint32 red = 2; // Red level + +/*Sets the green level of the LED, values are 0-255*/ + uint32 green = 3; // Green level + +/*Sets the blue level of the LED, values are 0-255*/ + uint32 blue = 4; // Blue level +} } /* From 6f0aeb756f210f61814b9511bb25c31511678e60 Mon Sep 17 00:00:00 2001 From: Jon Date: Wed, 28 Jun 2023 19:59:12 -0400 Subject: [PATCH 2/3] PR edits --- meshtastic/module_config.proto | 42 +++++++++++++++++++--------------- 1 file changed, 24 insertions(+), 18 deletions(-) diff --git a/meshtastic/module_config.proto b/meshtastic/module_config.proto index ad055d7..07659cb 100644 --- a/meshtastic/module_config.proto +++ b/meshtastic/module_config.proto @@ -529,6 +529,25 @@ message ModuleConfig { bool send_bell = 11; } + /*Ambient Lighting Module - Settings for control of onboard LEDs to allow users to adjust the brightness levels and respective color levels. + Initially created for the RAK14001 RGB LED module. + */ + message AmbientLightingConfig { + + /*Sets the overall current for the LED, firmware side range for the RAK14001 is 1-31, but users should be given a range of 0-100% */ + uint32 current = 1; + + /*Sets the red level of the LED, firmware side values are 0-255, but users should be given a range of 0-100% */ + + uint32 red = 2; // Red level + + /*Sets the green level of the LED, firmware side values are 0-255, but users should be given a range of 0-100% */ + uint32 green = 3; // Green level + + /*Sets the blue level of the LED, firmware side values are 0-255, but users should be given a range of 0-100% */ + uint32 blue = 4; // Blue level + } + /* * TODO: REPLACE */ @@ -582,27 +601,14 @@ message ModuleConfig { * TODO: REPLACE */ NeighborInfoConfig neighbor_info = 10; + + /* + * TODO: REPLACE + */ + AmbientLightingConfig ambient_lighting = 11; } - /*Ambient Lighting Module - Settings for control of onboard LEDs to allow users to adjust the brightness levels and respective color levels. -Initially created for the RAK14001 RGB LED module. -*/ -message AmblientLightingConfig { - -/*Sets the overall current for the LED, range for the RAK14001 is 1-31*/ - uint32 current = 1; - -/*Sets the red level of the LED, values are 0-255*/ - - uint32 red = 2; // Red level - -/*Sets the green level of the LED, values are 0-255*/ - uint32 green = 3; // Green level - -/*Sets the blue level of the LED, values are 0-255*/ - uint32 blue = 4; // Blue level -} } /* From 4c648a82470cf480f9c4b0d3cc04667bc20a3fc0 Mon Sep 17 00:00:00 2001 From: Jon Date: Wed, 28 Jun 2023 20:04:35 -0400 Subject: [PATCH 3/3] On/Off function added --- meshtastic/module_config.proto | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/meshtastic/module_config.proto b/meshtastic/module_config.proto index 07659cb..e60820f 100644 --- a/meshtastic/module_config.proto +++ b/meshtastic/module_config.proto @@ -534,18 +534,21 @@ message ModuleConfig { */ message AmbientLightingConfig { + /*Sets LED to on or off. */ + bool led_state = 1; + /*Sets the overall current for the LED, firmware side range for the RAK14001 is 1-31, but users should be given a range of 0-100% */ - uint32 current = 1; + uint32 current = 2; /*Sets the red level of the LED, firmware side values are 0-255, but users should be given a range of 0-100% */ - uint32 red = 2; // Red level + uint32 red = 3; // Red level /*Sets the green level of the LED, firmware side values are 0-255, but users should be given a range of 0-100% */ - uint32 green = 3; // Green level + uint32 green = 4; // Green level /*Sets the blue level of the LED, firmware side values are 0-255, but users should be given a range of 0-100% */ - uint32 blue = 4; // Blue level + uint32 blue = 5; // Blue level } /*