Merge branch 'development' of github.com:arendst/Tasmota into pr2_tm1637

This commit is contained in:
Ajith Vasudevan 2021-02-15 15:11:51 +05:30
commit 9eafb7c040
1 changed files with 2 additions and 1 deletions

View File

@ -2855,6 +2855,7 @@ void CmndFade(void)
void CmndSpeed(void) void CmndSpeed(void)
{ {
if (2 == XdrvMailbox.index) { if (2 == XdrvMailbox.index) {
// 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;
Light.fade_once_value = (XdrvMailbox.payload > 0); Light.fade_once_value = (XdrvMailbox.payload > 0);
@ -2862,7 +2863,7 @@ void CmndSpeed(void)
Light.speed_once_value = XdrvMailbox.payload; Light.speed_once_value = XdrvMailbox.payload;
if (!Light.fade_once_value) { Light.fade_running = false; } if (!Light.fade_once_value) { Light.fade_running = false; }
} }
ResponseCmndNumber(Light.speed_once_value); ResponseCmndIdxNumber(Light.speed_once_value);
} else { } else {
// Speed 1 - Fast // Speed 1 - Fast
// Speed 40 - Very slow // Speed 40 - Very slow