mirror of https://github.com/arendst/Tasmota.git
Change light scheme 2,3,4 cycle time
Change light scheme 2,3,4 cycle time speed from 24,48,72,... seconds to 4,6,12,24,36,48,... seconds (#8034)
This commit is contained in:
parent
7ebb5f3cb9
commit
39d8011c89
|
@ -55,6 +55,7 @@ The following binary downloads have been compiled with ESP8266/Arduino library c
|
||||||
### Version 8.2.0.3
|
### Version 8.2.0.3
|
||||||
|
|
||||||
- Change HM-10 sensor type detection and add features (#7962)
|
- Change HM-10 sensor type detection and add features (#7962)
|
||||||
|
- Change light scheme 2,3,4 cycle time speed from 24,48,72,... seconds to 4,6,12,24,36,48,... seconds (#8034)
|
||||||
- Fix possible Relay toggle on (OTA) restart
|
- Fix possible Relay toggle on (OTA) restart
|
||||||
- Fix Zigbee sending wrong Sat value with Hue emulation
|
- Fix Zigbee sending wrong Sat value with Hue emulation
|
||||||
- Add Zigbee command ``ZbRestore`` to restore device configuration dumped with ``ZbStatus 2``
|
- Add Zigbee command ``ZbRestore`` to restore device configuration dumped with ``ZbStatus 2``
|
||||||
|
|
|
@ -2,6 +2,7 @@
|
||||||
|
|
||||||
### 8.2.0.3 20200329
|
### 8.2.0.3 20200329
|
||||||
|
|
||||||
|
- Change light scheme 2,3,4 cycle time speed from 24,48,72,... seconds to 4,6,12,24,36,48,... seconds (#8034)
|
||||||
- Add support for longer template names
|
- Add support for longer template names
|
||||||
- Add Zigbee command ``ZbBindState`` and ``manuf``attribute
|
- Add Zigbee command ``ZbBindState`` and ``manuf``attribute
|
||||||
- Add commands ``CounterDebounceLow`` and ``CounterDebounceHigh`` to control debouncing (#8021)
|
- Add commands ``CounterDebounceLow`` and ``CounterDebounceHigh`` to control debouncing (#8021)
|
||||||
|
|
|
@ -1612,8 +1612,9 @@ void LightPreparePower(power_t channels = 0xFFFFFFFF) { // 1 = only RGB, 2 =
|
||||||
|
|
||||||
void LightCycleColor(int8_t direction)
|
void LightCycleColor(int8_t direction)
|
||||||
{
|
{
|
||||||
if (Light.strip_timer_counter % (Settings.light_speed * 2)) {
|
if (Settings.light_speed > 3) {
|
||||||
return;
|
// if (Light.strip_timer_counter % (Settings.light_speed * 2)) { return; }
|
||||||
|
if (Light.strip_timer_counter % (Settings.light_speed - 2)) { return; } // Speed 4: 24sec, 5: 36sec, 6: 48sec, etc
|
||||||
}
|
}
|
||||||
|
|
||||||
if (0 == direction) {
|
if (0 == direction) {
|
||||||
|
@ -1630,7 +1631,11 @@ void LightCycleColor(int8_t direction)
|
||||||
// direction = (Light.random < Light.wheel) ? -1 : 1;
|
// direction = (Light.random < Light.wheel) ? -1 : 1;
|
||||||
direction = (Light.random &0x01) ? 1 : -1;
|
direction = (Light.random &0x01) ? 1 : -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (Settings.light_speed < 3) { direction *= (4 - Settings.light_speed); } // Speed 1: 12/3=4sec, 2: 12/2=6sec, 3: 12sec
|
||||||
|
// if (Settings.light_speed < 3) { direction <<= (3 - Settings.light_speed); } // Speed 1: 12/4=3sec, 2: 12/2=6sec, 3: 12sec
|
||||||
Light.wheel += direction;
|
Light.wheel += direction;
|
||||||
|
|
||||||
uint16_t hue = changeUIntScale(Light.wheel, 0, 255, 0, 359); // Scale to hue to keep amount of steps low (max 255 instead of 359)
|
uint16_t hue = changeUIntScale(Light.wheel, 0, 255, 0, 359); // Scale to hue to keep amount of steps low (max 255 instead of 359)
|
||||||
|
|
||||||
// AddLog_P2(LOG_LEVEL_DEBUG, PSTR("LGT: random %d, wheel %d, hue %d"), Light.random, Light.wheel, hue);
|
// AddLog_P2(LOG_LEVEL_DEBUG, PSTR("LGT: random %d, wheel %d, hue %d"), Light.random, Light.wheel, hue);
|
||||||
|
|
Loading…
Reference in New Issue