mirror of
https://github.com/arendst/Tasmota.git
synced 2025-07-23 18:56:38 +00:00
add Speed2 !
to cancel pending one-shot speed setting
This commit is contained in:
parent
554a49e520
commit
bc6d65c725
@ -3130,6 +3130,14 @@ void CmndFade(void)
|
|||||||
void CmndSpeed(void)
|
void CmndSpeed(void)
|
||||||
{
|
{
|
||||||
if (2 == XdrvMailbox.index) {
|
if (2 == XdrvMailbox.index) {
|
||||||
|
// Speed2 ! cancels use of Speed2 in the future
|
||||||
|
if ((1 == XdrvMailbox.data_len) && ('!' == XdrvMailbox.data[0])) {
|
||||||
|
Light.fade_once_enabled = false;
|
||||||
|
Light.speed_once_enabled = false;
|
||||||
|
ResponseCmndDone();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
// Speed2 setting will be used only once, then revert to fade/speed
|
// Speed2 setting will be used only once, then revert to fade/speed
|
||||||
if ((XdrvMailbox.payload >= 0) && (XdrvMailbox.payload <= 40)) {
|
if ((XdrvMailbox.payload >= 0) && (XdrvMailbox.payload <= 40)) {
|
||||||
Light.fade_once_enabled = true;
|
Light.fade_once_enabled = true;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user