Skip to content

Commit b727a83

Browse files
Merge branch 'bugfix/lightbulb_iic' into 'master'
fix(lightbulb): Enable new IIC driver in v5.2.6 instead of v5.2.4 See merge request ae_group/esp-iot-solution!1236
2 parents 5d99133 + c253222 commit b727a83

File tree

6 files changed

+17
-5
lines changed

6 files changed

+17
-5
lines changed

components/led/lightbulb_driver/CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
# ChangeLog
22

3+
## v1.7.1 - 2025-03-05
4+
5+
### Bug Fix:
6+
7+
* Enable new IIC driver in v5.2.6 instead of v5.2.4
8+
* Fixed the color power calculation error
9+
310
## v1.7.0 - 2025-02-24
411

512
### Improve:

components/led/lightbulb_driver/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ set(srcs "src/hal_driver.c"
55

66
set(priv_req nvs_flash driver esp_timer)
77

8-
if("${IDF_VERSION_MAJOR}.${IDF_VERSION_MINOR}" VERSION_GREATER_EQUAL "5.2.4")
8+
if("${IDF_VERSION_MAJOR}.${IDF_VERSION_MINOR}" VERSION_GREATER_EQUAL "5.2.6")
99
list(APPEND priv_req "esp_driver_i2c")
1010
endif()
1111

components/led/lightbulb_driver/Kconfig

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,9 +55,9 @@ menu "LightBulb Driver Config"
5555
depends on ENABLE_KP18058_DRIVER || ENABLE_BP1658CJ_DRIVER || ENABLE_BP57x8D_DRIVER || ENABLE_SM2x35EGH_DRIVER || ENABLE_SM2135EH_DRIVER || ENABLE_SM2135E_DRIVER
5656

5757
config LB_ENABLE_NEW_IIC_DRIVER
58-
depends on ESP_IDF_VERSION >= 5.2.4
58+
depends on ESP_IDF_VERSION >= 5.2.6
5959
bool "Enable new I2C driver"
60-
default "y"
60+
default "n"
6161
help
6262
Enable new I2C driver.
6363

components/led/lightbulb_driver/drivers/common/iic/iic.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
#endif
1212

1313
// Need to include this commit: https://github.com/espressif/esp-idf/commit/a245a316a518215c5655ffd2fe24fc920044b094
14-
#if ((ESP_IDF_VERSION >= ESP_IDF_VERSION_VAL(5, 2, 4)) && (ESP_IDF_VERSION < ESP_IDF_VERSION_VAL(5, 3, 0))) || \
14+
#if ((ESP_IDF_VERSION >= ESP_IDF_VERSION_VAL(5, 2, 6)) && (ESP_IDF_VERSION < ESP_IDF_VERSION_VAL(5, 3, 0))) || \
1515
((ESP_IDF_VERSION >= ESP_IDF_VERSION_VAL(5, 3, 3)) && (ESP_IDF_VERSION < ESP_IDF_VERSION_VAL(5, 4, 0))) || \
1616
(ESP_IDF_VERSION >= ESP_IDF_VERSION_VAL(5, 4, 1)) && \
1717
(CONFIG_LB_ENABLE_NEW_IIC_DRIVER)

components/led/lightbulb_driver/idf_component.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
version: "1.7.0"
1+
version: "1.7.1"
22
description: Provide multiple dimming driver solutions to easily build lightbulb applications
33
url: https://github.com/espressif/esp-iot-solution/tree/master/components/led/lightbulb_driver
44
dependencies:

components/led/lightbulb_driver/src/lightbulb.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1251,6 +1251,11 @@ static esp_err_t _lightbulb_hsv2rgb(uint16_t hue, uint8_t saturation, uint8_t va
12511251
*red = _red / 255.0;
12521252
*green = _green / 255.0;
12531253
*blue = _blue / 255.0;
1254+
1255+
float total = *red + *green + *blue;
1256+
*red = *red / total;
1257+
*green = *green / total;
1258+
*blue = *blue / total;
12541259
*cold = 0;
12551260
*warm = 0;
12561261

0 commit comments

Comments
 (0)