diff --git a/tasmota/include/tasmota.h b/tasmota/include/tasmota.h index c1771dc83..1d66157c2 100644 --- a/tasmota/include/tasmota.h +++ b/tasmota/include/tasmota.h @@ -430,7 +430,7 @@ enum Ws2812Color { WS_RED, WS_GREEN, WS_BLUE }; enum LightSubtypes { LST_NONE, LST_SINGLE, LST_COLDWARM, LST_RGB, LST_RGBW, LST_RGBCW, LST_MAX=5 }; // Do not insert new fields enum LightTypes { LT_BASIC, LT_PWM1, LT_PWM2, LT_PWM3, LT_PWM4, LT_PWM5, LT_PWM6, LT_PWM7, - LT_NU8, LT_SERIAL1, LT_SERIAL2, LT_RGB, LT_RGBW, LT_RGBWC, LT_NU14, LT_NU15 }; // Do not insert new fields + LT_NU8, LT_W, LT_CW, LT_RGB, LT_RGBW, LT_RGBWC, LT_NU14, LT_NU15 }; // Do not insert new fields enum XsnsFunctions { FUNC_SETTINGS_OVERRIDE, FUNC_SETUP_RING1, FUNC_SETUP_RING2, FUNC_PRE_INIT, FUNC_INIT, FUNC_ACTIVE, FUNC_ABOUT_TO_RESTART, FUNC_LOOP, FUNC_SLEEP_LOOP, FUNC_EVERY_50_MSECOND, FUNC_EVERY_100_MSECOND, FUNC_EVERY_200_MSECOND, FUNC_EVERY_250_MSECOND, FUNC_EVERY_SECOND, diff --git a/tasmota/tasmota_xdrv_driver/xdrv_04_light.ino b/tasmota/tasmota_xdrv_driver/xdrv_04_light.ino index 0829cd4ee..f3ade2495 100644 --- a/tasmota/tasmota_xdrv_driver/xdrv_04_light.ino +++ b/tasmota/tasmota_xdrv_driver/xdrv_04_light.ino @@ -32,8 +32,8 @@ * 6 PWM6 * 7 PWM7 * 8 reserved - * 9 SERIAL1 no - * 10 SERIAL2 yes + * 9 Serial1 W no + * 10 Serial2 CW yes * 11 +WS2812 RGB no (One WS2812 RGB or RGBW ledstrip) * 12 AiLight RGBW no * 13 Sonoff B1 RGBCW yes diff --git a/tasmota/tasmota_xdrv_driver/xdrv_16_tuyamcu_v1.ino b/tasmota/tasmota_xdrv_driver/xdrv_16_tuyamcu_v1.ino index 2a6a686b0..6cb482d52 100644 --- a/tasmota/tasmota_xdrv_driver/xdrv_16_tuyamcu_v1.ino +++ b/tasmota/tasmota_xdrv_driver/xdrv_16_tuyamcu_v1.ino @@ -641,12 +641,12 @@ bool TuyaSetChannels(void) uint8_t idx = 0; snprintf_P(hex_char, sizeof(hex_char), PSTR("000000000000")); - if (LT_SERIAL1 == TasmotaGlobal.light_type) { + if (LT_W == TasmotaGlobal.light_type) { Tuya.Snapshot[0] = light_state.getDimmer(); } - if (LT_SERIAL2 == TasmotaGlobal.light_type || LT_RGBWC == TasmotaGlobal.light_type) { + if (LT_CW == TasmotaGlobal.light_type || LT_RGBWC == TasmotaGlobal.light_type) { idx = 1; - if (LT_SERIAL2 == TasmotaGlobal.light_type && Settings->flag3.pwm_multi_channels && (TuyaGetDpId(TUYA_MCU_FUNC_DIMMER2) != 0)) { + if (LT_CW == TasmotaGlobal.light_type && Settings->flag3.pwm_multi_channels && (TuyaGetDpId(TUYA_MCU_FUNC_DIMMER2) != 0)) { // Special setup for dual dimmer (like the MOES 2 Way Dimmer) emulating 2 PWM channels Tuya.Snapshot[0] = changeUIntScale(Light.current_color[0], 0, 255, 0, 100); Tuya.Snapshot[1] = changeUIntScale(Light.current_color[1], 0, 255, 0, 100); @@ -1227,9 +1227,9 @@ bool TuyaModuleSelected(void) { // Possible combinations for Lights: // 0: NONE = LT_BASIC - // 1: DIMMER = LT_SERIAL1 - Common one channel dimmer - // 2: DIMMER, DIMMER2 = LT_SERIAL2 - Two channels dimmer (special setup used with SetOption68) - // 3: DIMMER, CT = LT_SERIAL2 - Dimmable light and White Color Temperature + // 1: DIMMER = LT_W - Common one channel dimmer + // 2: DIMMER, DIMMER2 = LT_CW - Two channels dimmer (special setup used with SetOption68) + // 3: DIMMER, CT = LT_CW - Dimmable light and White Color Temperature // 4: DIMMER, RGB = LT_RGB - RGB Light // 5: DIMMER, RGB, CT = LT_RGBWC - RGB LIght and White Color Temperature // 6: DIMMER, RGB, WHITE = LT_RGBW - RGB LIght and White @@ -1244,8 +1244,8 @@ bool TuyaModuleSelected(void) { } else if (TuyaGetDpId(TUYA_MCU_FUNC_CT) != 0 || TuyaGetDpId(TUYA_MCU_FUNC_DIMMER2) != 0) { if (TuyaGetDpId(TUYA_MCU_FUNC_RGB) != 0) { TasmotaGlobal.light_type = LT_RGBWC; - } else { TasmotaGlobal.light_type = LT_SERIAL2; } - } else { TasmotaGlobal.light_type = LT_SERIAL1; } + } else { TasmotaGlobal.light_type = LT_CW; } + } else { TasmotaGlobal.light_type = LT_W; } } else { TasmotaGlobal.light_type = LT_BASIC; } diff --git a/tasmota/tasmota_xdrv_driver/xdrv_16_tuyamcu_v2.ino b/tasmota/tasmota_xdrv_driver/xdrv_16_tuyamcu_v2.ino index 0684718e2..f67d32aed 100644 --- a/tasmota/tasmota_xdrv_driver/xdrv_16_tuyamcu_v2.ino +++ b/tasmota/tasmota_xdrv_driver/xdrv_16_tuyamcu_v2.ino @@ -1272,13 +1272,13 @@ bool TuyaSetChannels(void) uint8_t idx = 0; snprintf_P(hex_char, sizeof(hex_char), PSTR("000000000000")); - if (LT_SERIAL1 == TasmotaGlobal.light_type) { + if (LT_W == TasmotaGlobal.light_type) { pTuya->Snapshot[0] = light_state.getDimmer(); } - if (LT_SERIAL2 == TasmotaGlobal.light_type || LT_RGBWC == TasmotaGlobal.light_type) { + if (LT_CW == TasmotaGlobal.light_type || LT_RGBWC == TasmotaGlobal.light_type) { idx = 1; - if (LT_SERIAL2 == TasmotaGlobal.light_type && + if (LT_CW == TasmotaGlobal.light_type && Settings->flag3.pwm_multi_channels && (TuyaGetDpId(TUYA_MCU_FUNC_DIMMER2) != 0)) { // Special setup for dual dimmer (like the MOES 2 Way Dimmer) emulating 2 PWM channels @@ -1978,9 +1978,9 @@ bool TuyaModuleSelected(void) { // Possible combinations for Lights: // 0: NONE = LT_BASIC - // 1: DIMMER = LT_SERIAL1 - Common one channel dimmer - // 2: DIMMER, DIMMER2 = LT_SERIAL2 - Two channels dimmer (special setup used with SetOption68) - // 3: DIMMER, CT = LT_SERIAL2 - Dimmable light and White Color Temperature + // 1: DIMMER = LT_W - Common one channel dimmer + // 2: DIMMER, DIMMER2 = LT_CW - Two channels dimmer (special setup used with SetOption68) + // 3: DIMMER, CT = LT_CW - Dimmable light and White Color Temperature // 4: DIMMER, RGB = LT_RGB - RGB Light // 5: DIMMER, RGB, CT = LT_RGBWC - RGB LIght and White Color Temperature // 6: DIMMER, RGB, WHITE = LT_RGBW - RGB LIght and White @@ -1995,8 +1995,8 @@ bool TuyaModuleSelected(void) { } else if (TuyaGetDpId(TUYA_MCU_FUNC_CT) != 0 || TuyaGetDpId(TUYA_MCU_FUNC_DIMMER2) != 0) { if (TuyaGetDpId(TUYA_MCU_FUNC_RGB) != 0) { TasmotaGlobal.light_type = LT_RGBWC; - } else { TasmotaGlobal.light_type = LT_SERIAL2; } - } else { TasmotaGlobal.light_type = LT_SERIAL1; } + } else { TasmotaGlobal.light_type = LT_CW; } + } else { TasmotaGlobal.light_type = LT_W; } } else { TasmotaGlobal.light_type = LT_BASIC; } diff --git a/tasmota/tasmota_xdrv_driver/xdrv_18_armtronix_dimmers.ino b/tasmota/tasmota_xdrv_driver/xdrv_18_armtronix_dimmers.ino index e67a0e542..d205985ac 100644 --- a/tasmota/tasmota_xdrv_driver/xdrv_18_armtronix_dimmers.ino +++ b/tasmota/tasmota_xdrv_driver/xdrv_18_armtronix_dimmers.ino @@ -87,7 +87,7 @@ void ArmtronixRequestState(void) bool ArmtronixModuleSelected(void) { UpdateDevicesPresent(1); - TasmotaGlobal.light_type = LT_SERIAL2; + TasmotaGlobal.light_type = LT_CW; return true; } diff --git a/tasmota/tasmota_xdrv_driver/xdrv_19_ps16dz_dimmer.ino b/tasmota/tasmota_xdrv_driver/xdrv_19_ps16dz_dimmer.ino index 09d4715e9..1546f14ae 100644 --- a/tasmota/tasmota_xdrv_driver/xdrv_19_ps16dz_dimmer.ino +++ b/tasmota/tasmota_xdrv_driver/xdrv_19_ps16dz_dimmer.ino @@ -200,7 +200,7 @@ void PS16DZInit(void) bool PS16DZModuleSelected(void) { UpdateDevicesPresent(1); - TasmotaGlobal.light_type = LT_SERIAL1; + TasmotaGlobal.light_type = LT_W; return true; } diff --git a/tasmota/tasmota_xdrv_driver/xdrv_30_exs_dimmer.ino b/tasmota/tasmota_xdrv_driver/xdrv_30_exs_dimmer.ino index 38981fecb..f8ec5adef 100644 --- a/tasmota/tasmota_xdrv_driver/xdrv_30_exs_dimmer.ino +++ b/tasmota/tasmota_xdrv_driver/xdrv_30_exs_dimmer.ino @@ -355,7 +355,7 @@ bool ExsModuleSelected(void) SetSeriallog(LOG_LEVEL_NONE); UpdateDevicesPresent(2); - TasmotaGlobal.light_type = LT_SERIAL2; + TasmotaGlobal.light_type = LT_CW; return true; } diff --git a/tasmota/tasmota_xdrv_driver/xdrv_37_sonoff_d1.ino b/tasmota/tasmota_xdrv_driver/xdrv_37_sonoff_d1.ino index 0e656fc79..12f0f1d1a 100644 --- a/tasmota/tasmota_xdrv_driver/xdrv_37_sonoff_d1.ino +++ b/tasmota/tasmota_xdrv_driver/xdrv_37_sonoff_d1.ino @@ -164,7 +164,7 @@ bool SonoffD1ModuleSelected(void) SetSerial(9600, TS_SERIAL_8N1); UpdateDevicesPresent(1); - TasmotaGlobal.light_type = LT_SERIAL1; + TasmotaGlobal.light_type = LT_W; return true; } diff --git a/tasmota/tasmota_xdrv_driver/xdrv_45_shelly_dimmer.ino b/tasmota/tasmota_xdrv_driver/xdrv_45_shelly_dimmer.ino index 0d0f7dbce..0c9e3ad5d 100644 --- a/tasmota/tasmota_xdrv_driver/xdrv_45_shelly_dimmer.ino +++ b/tasmota/tasmota_xdrv_driver/xdrv_45_shelly_dimmer.ino @@ -730,7 +730,7 @@ bool ShdSerialInput(void) bool ShdModuleSelected(void) { if (PinUsed(GPIO_SHELLY_DIMMER_BOOT0) && PinUsed(GPIO_SHELLY_DIMMER_RST_INV)) { UpdateDevicesPresent(1); - TasmotaGlobal.light_type = LT_SERIAL1; + TasmotaGlobal.light_type = LT_W; Shd.present = true; } diff --git a/tasmota/tasmota_xdrv_driver/xdrv_75_dali.ino b/tasmota/tasmota_xdrv_driver/xdrv_75_dali.ino index 1ddaf4b4f..c0e7fa3e1 100644 --- a/tasmota/tasmota_xdrv_driver/xdrv_75_dali.ino +++ b/tasmota/tasmota_xdrv_driver/xdrv_75_dali.ino @@ -965,7 +965,7 @@ bool DaliInit(uint32_t function) { Settings->light_correction = 0; // Use Dali light correction UpdateDevicesPresent(1); - TasmotaGlobal.light_type = LT_SERIAL1; // Single channel + TasmotaGlobal.light_type = LT_W; // Single channel #ifdef DALI_LIGHT_COLOR_SUPPORT Dali->target_rgbwaf = DaliQueryRGBWAF(DaliTarget2Address(Dali->Settings.target)); if (Dali->target_rgbwaf > 1) {