Start some blinking/breathing effects
Stop the effect in progress and keep the current lighting output
Initialize sm2235egh/sm2335egh output
Register the sm2135eh channel
Deinitialize sm2235egh/sm2335egh and release resources
Enable/Disable the lightbulb fade function
Stop the effect in progress and restore the previous lighting output
Convert RGB model to HSV model
Set output with hardware fade
Deinitialize pwm and release resources
Enable/Disable sleep status
Initialize sm2135e output
Register the sm2135e channel
Deinitialize sm2135e and release resources
Initialize sm2135e output
Register the sm2135eh channel
Deinitialize sm2135eh and release resources
Initialize sm2135e output
Register the bp5758d channel
Deinitialize bp5758d and release resources
Initialize bp1658cj output
Register the bp1658cj channel
Deinitialize bp1658cj and release resources
Deinitialize ws2812 and release resources
Initialize kp18058 output
Register the kp18058 channel
Deinitialize kp18058 and release resources
Deinitialize the lightbulb and release resources
Convert HSV model to RGB model
Convert xyY model to RGB model
Store lightbulb state to nvs.
Set color temperature (CCT)
Set only rgb channel output
Set only cct/brightness or cold/warm channel output
Set only rgb channel output
Set only wy channel output
Set only rgb channel output
Set only wy channel output
Set only rgb channel output
Set only cw channel output
Set only rgb channel output
Set only cw channel output
Set only rgb channel output
Set only cw channel output
Set only rgb channel output
Set only cw channel output
Enable/Disable the lightbulb storage function
Re-update the lightbulb status variable
Get lightbulb fade function enabled status
Convert RGB model to xyY model
Convert CCT kelvin to percentage
Convert percentage to kelvin
Set xyY @attention The xyY color model cannot fully correspond to the HSV color model, so the color may be biased. The grayscale will be recalculated in lightbulb, so we cannot directly operate the underlying driver through the xyY interface.
Get lightbulb status from nvs
Erase lightbulb state stored in nvs.
Used to test lightbulb hardware functionality
fade processing logic fade_data[channel].num -> Fade cycle, This value is related to CHANGE_RATE_MS and fade_ms time fade_data[channel].step -> Fade step, < 0 indicates decrement, otherwise increment. The actual meaning is delta. fade_data[channel].cycle -> This value is used for the actions. fade_data[channel].cur -> Current value fade_data[channel].final -> Final value fade_data[channel].min -> Minimum value Final, min, cur are used to define a set of ranges, which will allow grayscale changes in arbitrary ranges, not from 0% to 100%.
Convert Kelvin to CCT percentage input output 2200k 0 4600k 50 7200k 100
Convert CCT percentage to Kelvin input output 0 2200k 50 4600k 100 7200k
Convert CCT and brightness to cold and warm @attention White power was recalculated at the same time. input output(white_max_power = 100) output(white_max_power = 200) 0,100 0,255 0,255 50,100 127,127 255,255 100,100 255,0 255,0 0,0 0,0 0,0 0,50 0,127 0,127 0,100 0,255 0,255 50,0 0,0 0,0 50,50 63,63 127,127 50,100 127,127 255,255 100,0 0,0 0,0 100,50 127,0 127,0 100,100 255,0 255,0
To resolve some compilation warning issues
Recalculate value input output 100 100 80 82 50 55 11 19 1 10 0 0
Recalculate brightness input output 100 100 80 82 50 55 11 19 1 10 0 0
Recalculate color power @attention 300% = 100% + 100% + 100% : Full power output on each channel. If single channel output is 3w then total output is 9w.
Recalculate white power @attention Please refer to `cct_and_brightness_convert_to_cold_and_warm`