From e9475592b3c1ce4995c61045b784cbbd816c7db3 Mon Sep 17 00:00:00 2001 From: Shantur Rathore Date: Mon, 19 Aug 2019 21:04:27 +0100 Subject: [PATCH] Fix: Legacy Led1 doesn't power up with Relay1. https://github.com/arendst/Sonoff-Tasmota/pull/6246 broke Legacy Led1 power up logic. Make sure the if statement matches the if statement before #6246 --- sonoff/sonoff.ino | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sonoff/sonoff.ino b/sonoff/sonoff.ino index 36bbb61fc..fb028de90 100755 --- a/sonoff/sonoff.ino +++ b/sonoff/sonoff.ino @@ -854,7 +854,7 @@ void Every250mSeconds(void) if (200 == blinks) blinks = 0; // Disable blink } } - if (Settings.ledstate &1 && (pin[GPIO_LEDLNK] < 99 || !(blinkstate || blinks <= 200)) ) { + if (Settings.ledstate &1 && (pin[GPIO_LEDLNK] < 99 || !(blinks || restart_flag || ota_state_flag)) ) { bool tstate = power & Settings.ledmask; if ((SONOFF_TOUCH == my_module_type) || (SONOFF_T11 == my_module_type) || (SONOFF_T12 == my_module_type) || (SONOFF_T13 == my_module_type)) { tstate = (!power) ? 1 : 0; // As requested invert signal for Touch devices to find them in the dark