diff --git a/src/cmnds/cmd_newLEDDriver.c b/src/cmnds/cmd_newLEDDriver.c index 635d89358..5a56de648 100644 --- a/src/cmnds/cmd_newLEDDriver.c +++ b/src/cmnds/cmd_newLEDDriver.c @@ -1077,6 +1077,14 @@ commandResult_t LED_SetBaseColor(const void *context, const char *cmd, const cha if(c[0] == '#') c++; + + if (CFG_HasFlag(OBK_LED_SETTING_WHITE_RGB_ENABLES_CW_MODE)) { + if (!stricmp(c, "FFFFFF")) { + SET_LightMode(Light_Temperature); + return; + } + } + if(bAll) { SET_LightMode(Light_All); } else { diff --git a/src/httpserver/http_fns.c b/src/httpserver/http_fns.c index a16ec6997..bd899cdea 100644 --- a/src/httpserver/http_fns.c +++ b/src/httpserver/http_fns.c @@ -2738,10 +2738,10 @@ const char* g_obk_flagNames[] = { "[UART] Use alternate UART for BL0942, CSE, TuyaMCU, etc", #endif "[HASS] Invoke HomeAssistant discovery on change to ip address, configuration", + "[LED] Setting RGB white (FFFFFF) enables temperature mode", "error", "error", - "error", -}; +}; int http_fn_cfg_generic(http_request_t* request) { int i; char tmpA[64]; diff --git a/src/new_pins.h b/src/new_pins.h index c05f6e4d2..7d6c924f0 100644 --- a/src/new_pins.h +++ b/src/new_pins.h @@ -185,8 +185,9 @@ typedef struct pinsState_s { #define OBK_FLAG_POWER_ALLOW_NEGATIVE 25 #define OBK_FLAG_USE_SECONDARY_UART 26 #define OBK_FLAG_AUTOMAIC_HASS_DISCOVERY 27 +#define OBK_LED_SETTING_WHITE_RGB_ENABLES_CW_MODE 28 -#define OBK_TOTAL_FLAGS 28 +#define OBK_TOTAL_FLAGS 29 #define CGF_MQTT_CLIENT_ID_SIZE 64