diff --git a/sonoff/settings.h b/sonoff/settings.h index 99591d6bf..9b627fdf7 100644 --- a/sonoff/settings.h +++ b/sonoff/settings.h @@ -78,7 +78,7 @@ typedef union { // Restricted by MISRA-C Rule 18.4 bu uint32_t no_hold_retain : 1; // bit 12 (v6.4.1.19) - SetOption62 - Don't use retain flag on HOLD messages uint32_t no_power_feedback : 1; // bit 13 (v6.5.0.9) - SetOption63 - Don't scan relay power state at restart uint32_t use_underscore : 1; // bit 14 (v6.5.0.12) - SetOption64 - Enable "_" instead of "-" as sensor index separator - uint32_t tuya_show_dimmer : 1; // bit 15 (v6.5.0.15) - SetOption65 - Enable or Disable Dimmer slider control + uint32_t tuya_disable_dimmer : 1; // bit 15 (v6.5.0.15) - SetOption65 - Enable or Disable Tuya Serial Dimmer control uint32_t tuya_dimmer_range_255 : 1; // bit 16 (v6.6.0.1) - SetOption66 - Enable or Disable Dimmer range 255 slider control uint32_t buzzer_enable : 1; // bit 17 (v6.6.0.1) - SetOption67 - Enable buzzer when available uint32_t pwm_multi_channels : 1; // bit 18 (v6.6.0.3) - SetOption68 - Enable multi-channels PWM instead of Color PWM diff --git a/sonoff/xdrv_01_webserver.ino b/sonoff/xdrv_01_webserver.ino index 351e8dce9..695043b15 100644 --- a/sonoff/xdrv_01_webserver.ino +++ b/sonoff/xdrv_01_webserver.ino @@ -942,7 +942,7 @@ void HandleRoot(void) if ((LST_COLDWARM == (light_type &7)) || (LST_RGBWC == (light_type &7))) { WSContentSend_P(HTTP_MSG_SLIDER1, LightGetColorTemp()); } - if (!Settings.flag3.tuya_show_dimmer) { + if (!Settings.flag3.tuya_disable_dimmer) { WSContentSend_P(HTTP_MSG_SLIDER2, Settings.light_dimmer); } } diff --git a/sonoff/xdrv_16_tuyadimmer.ino b/sonoff/xdrv_16_tuyadimmer.ino index b3b2ca0ea..4abdcdeac 100644 --- a/sonoff/xdrv_16_tuyadimmer.ino +++ b/sonoff/xdrv_16_tuyadimmer.ino @@ -149,7 +149,7 @@ void LightSerialDuty(uint8_t duty) if (duty < 25) { duty = 25; } // dimming acts odd below 25(10%) - this mirrors the threshold set on the faceplate itself } - if (Settings.flag3.tuya_show_dimmer == 0) { + if (Settings.flag3.tuya_disable_dimmer == 0) { if(Settings.flag3.tuya_dimmer_range_255 == 0) { duty = changeUIntScale(duty, 0, 255, 0, 100); } @@ -160,7 +160,7 @@ void LightSerialDuty(uint8_t duty) } } else { Tuya.ignore_dim = false; // reset flag - if (Settings.flag3.tuya_show_dimmer == 0) { + if (Settings.flag3.tuya_disable_dimmer == 0) { if(Settings.flag3.tuya_dimmer_range_255 == 0) { duty = changeUIntScale(duty, 0, 255, 0, 100); } @@ -216,7 +216,7 @@ void TuyaPacketProcess(void) else if (Tuya.buffer[5] == 8) { // dim packet AddLog_P2(LOG_LEVEL_DEBUG, PSTR("TYA: RX Dim State=%d"), Tuya.buffer[13]); - if (Settings.flag3.tuya_show_dimmer == 0) { + if (Settings.flag3.tuya_disable_dimmer == 0) { if (!Settings.param[P_TUYA_DIMMER_ID]) { AddLog_P2(LOG_LEVEL_DEBUG, PSTR("TYA: Autoconfiguring Dimmer ID %d"), Tuya.buffer[6]); Settings.param[P_TUYA_DIMMER_ID] = Tuya.buffer[6];