You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: components/led/lightbulb_driver/include/lightbulb.h
+25-5Lines changed: 25 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -146,6 +146,19 @@ typedef struct {
146
146
Used to define the perceived warmth or coolness of the light emitted. */
147
147
} lightbulb_cct_mapping_data_t;
148
148
149
+
/**
150
+
* @brief Color mode mapping data
151
+
*
152
+
* @note Used for calibrating color accuracy in color mode.
153
+
*
154
+
*/
155
+
typedefstruct {
156
+
floatrgbcw_100[5]; /**< The RGBCW components required when saturation is 100 at a specific hue. */
157
+
floatrgbcw_50[5]; /**< The RGBCW components required when saturation is 50 at a specific hue. */
158
+
floatrgbcw_0[5]; /**< The RGBCW components required when saturation is 10 at a specific hue. */
159
+
uint16_thue;
160
+
} lightbulb_color_mapping_data_t;
161
+
149
162
/**
150
163
* @brief Gamma correction and color balance configuration
151
164
*
@@ -263,6 +276,7 @@ typedef struct {
263
276
boolenable_status_storage : 1; /**< Enable this option to store the lightbulb state in NVS. */
264
277
boolenable_hardware_cct : 1; /**< Enable this option if your driver uses hardware CCT. Some PWM type drivers may need to set this option. */
265
278
boolenable_precise_cct_control : 1; /**< Enable this option if you need precise CCT control. Must set 'enable_hardware_cct' to false in order to enable it.*/
279
+
boolenable_precise_color_control : 1; /**< Enable this option if you need precise Color control. */
266
280
boolsync_change_brightness_value : 1; /**< Enable this option if you need to use a parameter to mark the brightness of the white and color output. */
267
281
booldisable_auto_on : 1; /**< Enable this option if you don't need automatic on when the color/white value is set. */
268
282
} lightbulb_capability_t;
@@ -326,6 +340,13 @@ typedef struct {
326
340
} precise;
327
341
} cct_mix_mode;
328
342
343
+
union {
344
+
struct {
345
+
lightbulb_color_mapping_data_t*table;
346
+
inttable_size;
347
+
} precise;
348
+
} color_mix_mode;
349
+
329
350
lightbulb_gamma_config_t*gamma_conf; /**< Pointer to the gamma configuration data. */
330
351
lightbulb_power_limit_t*external_limit; /**< Pointer to the external power limit configuration. */
331
352
@@ -357,12 +378,11 @@ typedef struct {
357
378
typedefstruct {
358
379
lightbulb_effect_teffect_type; /**< Type of the effect to be configured. */
359
380
lightbulb_works_mode_tmode; /**< Working mode of the lightbulb during the effect. */
360
-
uint8_tred; /**< Red component value for the effect (0-255). */
361
-
uint8_tgreen; /**< Green component value for the effect (0-255). */
362
-
uint8_tblue; /**< Blue component value for the effect (0-255). */
381
+
uint16_thue; /**< Hue component value for the effect (0-360). */
382
+
uint8_tsaturation; /**< Saturation component value for the effect (0-100). */
363
383
uint16_tcct; /**< Color temperature value for the effect. */
364
-
uint8_tmin_brightness; /**< Minimum brightness level for the effect (0-100). */
365
-
uint8_tmax_brightness; /**< Maximum brightness level for the effect (0-100). */
384
+
uint8_tmin_value_brightness; /**< Minimum brightness level for the effect (0-100). */
385
+
uint8_tmax_value_brightness; /**< Maximum brightness level for the effect (0-100). */
366
386
uint16_teffect_cycle_ms; /**< Cycle time for the effect in milliseconds (ms). */
0 commit comments