Revert switchmode 6 according to issue 7778

Revert switchmode 6 according to issue 7778 (#7831)
This commit is contained in:
Theo Arends 2020-03-08 13:32:20 +01:00
parent bf86700e90
commit 2603459747
3 changed files with 14 additions and 3 deletions

View File

@ -62,7 +62,6 @@ The following binary downloads have been compiled with ESP8266/Arduino library c
- Change Zigbee command prefix from ``Zigbee*`` to ``Zb*``
- Change MQTT message size with additional 200 characters
- Change display of some date and time messages from "Wed Feb 19 10:45:12 2020" to "2020-02-19T10:45:12"
- Change switchmode 6 according to issue 7778 (#7831)
- Fix Sonoff Bridge, Sc, L1, iFan03 and CSE7766 serial interface to forced speed, config and disable logging
- Fix commands ``Display`` and ``Counter`` from overruling command processing (#7322)
- Fix ``White`` added to light status (#7142)

View File

@ -4,7 +4,7 @@
- Change default my_user_config.h driver and sensor support removing most sensors and adding most drivers
- Change IRremoteESP8266 library updated to v2.7.4
- Change switchmode 6 according to issue 7778 (#7831)
- Revert switchmode 6 according to issue 7778 (#7831)
- Add support for Jarolift rollers by Keeloq algorithm
- Add Zigbee features and improvements and remove support for Zigbee commands starting with ``Zigbee...``
- Add support for MaxBotix HRXL-MaxSonar ultrasonic range finders by Jon Little (#7814)

View File

@ -221,6 +221,17 @@ void SwitchHandler(uint8_t mode)
switchflag = POWER_TOGGLE; // ...and Toggle
}
break;
case PUSHBUTTONHOLD_INV:
if ((NOT_PRESSED == button) && (PRESSED == Switch.last_state[i])) {
Switch.hold_timer[i] = loops_per_second * Settings.param[P_HOLD_TIME] / 10; // Start timer on button press...
}
if ((PRESSED == button) && (NOT_PRESSED == Switch.last_state[i]) && (Switch.hold_timer[i])) {
Switch.hold_timer[i] = 0; // Button released and hold timer not expired : stop timer.
switchflag = POWER_TOGGLE; // ...and Toggle
}
break;
/*
// Reverted Fix switchmode 6 according to issue 7778 (#7831)
case PUSHBUTTONHOLD_INV:
if ((PRESSED == button) && (NOT_PRESSED == Switch.last_state[i])) {
Switch.hold_timer[i] = loops_per_second * Settings.param[P_HOLD_TIME] / 10; // Start timer on button press...
@ -230,6 +241,7 @@ void SwitchHandler(uint8_t mode)
Switch.hold_timer[i] = 0; // Button released : stop timer.
}
break;
*/
case TOGGLEMULTI:
case FOLLOWMULTI:
case FOLLOWMULTI_INV: