Bugfix v pripade ukonceni pulzu

This commit is contained in:
Pavel Brychta 2023-05-15 15:01:57 +02:00
parent df17f44692
commit 3fb6064905

View File

@ -242,6 +242,8 @@ void wsLED::pulse(LEDRGB color, uint32_t duration)
_pulseColor = color; _pulseColor = color;
if (LED_BREATH == _ledState || LED_BLINK == _ledState) { if (LED_BREATH == _ledState || LED_BLINK == _ledState) {
_savedState = _ledState; _savedState = _ledState;
} else {
_savedState = LED_STOP;
} }
_pulseDuration = duration; _pulseDuration = duration;
_ledState = LED_PULSE_START; _ledState = LED_PULSE_START;