mirror of https://github.com/arendst/Tasmota.git
Merge pull request #6228 from shantur/tuya-dimmer-min-limit
Tuya Dimmer: Make dimmer lower limit optional.
This commit is contained in:
commit
78c61031da
|
@ -82,7 +82,7 @@ typedef union { // Restricted by MISRA-C Rule 18.4 bu
|
|||
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
|
||||
uint32_t spare19 : 1;
|
||||
uint32_t tuya_dimmer_min_limit : 1; // bit 19 (v6.6.0.5) - SetOption69 - Limits Tuya dimmers to minimum of 10% (25) when enabled.
|
||||
uint32_t spare20 : 1;
|
||||
uint32_t spare21 : 1;
|
||||
uint32_t spare22 : 1;
|
||||
|
|
|
@ -143,7 +143,9 @@ bool TuyaSetChannels(void)
|
|||
void LightSerialDuty(uint8_t duty)
|
||||
{
|
||||
if (duty > 0 && !tuya_ignore_dim && TuyaSerial) {
|
||||
if (duty < 25) { duty = 25; } // dimming acts odd below 25(10%) - this mirrors the threshold set on the faceplate itself
|
||||
if (Settings.flag3.tuya_dimmer_min_limit) { // Enable dimming limit SetOption69: Enabled by default
|
||||
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_dimmer_range_255 == 0) {
|
||||
|
|
Loading…
Reference in New Issue