mirror of
https://github.com/arendst/Tasmota.git
synced 2025-07-24 03:06:33 +00:00
Merge pull request #15954 from dgwynne/Speed2Cancel
add `Speed2 !` to cancel pending one-shot speed setting
This commit is contained in:
commit
53a36c1fa2
@ -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