Merge pull request #6264 from shantur/development

Fix: Legacy Led1 doesn't power up with Relay1.
This commit is contained in:
Theo Arends 2019-08-20 09:28:40 +02:00 committed by GitHub
commit c17bdb028b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -854,7 +854,7 @@ void Every250mSeconds(void)
if (200 == blinks) blinks = 0; // Disable blink 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; 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)) { 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 tstate = (!power) ? 1 : 0; // As requested invert signal for Touch devices to find them in the dark