mirror of https://github.com/arendst/Tasmota.git
Fix compilation for TuyaMCU
This commit is contained in:
parent
488712c3f0
commit
2afc18bac2
|
@ -1221,6 +1221,11 @@ void initCTRange(uint32_t channels) {
|
||||||
}
|
}
|
||||||
#endif // USE_LIGHT_VIRTUAL_CT
|
#endif // USE_LIGHT_VIRTUAL_CT
|
||||||
|
|
||||||
|
void getCTRange(uint16_t * min_ct, uint16_t * max_ct) {
|
||||||
|
if (min_ct != nullptr) { *min_ct = Light.vct_ct[0]; }
|
||||||
|
if (max_ct != nullptr) { *max_ct = Light.vct_ct[CT_PIVOTS-1]; }
|
||||||
|
}
|
||||||
|
|
||||||
void setCTRange(uint16_t ct_min, uint16_t ct_max) {
|
void setCTRange(uint16_t ct_min, uint16_t ct_max) {
|
||||||
Light.vct_ct[0] = ct_min;
|
Light.vct_ct[0] = ct_min;
|
||||||
for (uint32_t i = 1; i < CT_PIVOTS; i++) {
|
for (uint32_t i = 1; i < CT_PIVOTS; i++) {
|
||||||
|
|
|
@ -517,7 +517,7 @@ bool TuyaSetChannels(void)
|
||||||
Tuya.Snapshot[0] = changeUIntScale(Light.current_color[0], 0, 255, 0, 100);
|
Tuya.Snapshot[0] = changeUIntScale(Light.current_color[0], 0, 255, 0, 100);
|
||||||
Tuya.Snapshot[1] = changeUIntScale(Light.current_color[1], 0, 255, 0, 100);
|
Tuya.Snapshot[1] = changeUIntScale(Light.current_color[1], 0, 255, 0, 100);
|
||||||
} else { // CT Light or RGBWC
|
} else { // CT Light or RGBWC
|
||||||
light_state.getCTRange(&Tuya.CTMin, &Tuya.CTMax); // SetOption82 - Reduce the CT range from 153..500 to 200..380 to accomodate with Alexa range
|
getCTRange(&Tuya.CTMin, &Tuya.CTMax); // SetOption82 - Reduce the CT range from 153..500 to 200..380 to accomodate with Alexa range
|
||||||
Tuya.Snapshot[0] = light_state.getDimmer();
|
Tuya.Snapshot[0] = light_state.getDimmer();
|
||||||
Tuya.Snapshot[1] = light_state.getCT();
|
Tuya.Snapshot[1] = light_state.getCT();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue