From 95bdb15ae9b77c50b6d459152e200b21cbf0339d Mon Sep 17 00:00:00 2001 From: gemu2015 Date: Mon, 15 Feb 2021 17:26:55 +0100 Subject: [PATCH] upd --- tasmota/support.ino | 2 +- tasmota/support_tasmota.ino | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/tasmota/support.ino b/tasmota/support.ino index 56ba71ab2..0cb0daf5a 100644 --- a/tasmota/support.ino +++ b/tasmota/support.ino @@ -1338,7 +1338,7 @@ int ICACHE_RAM_ATTR Pin(uint32_t gpio, uint32_t index) { bool PinUsed(uint32_t gpio, uint32_t index = 0); bool PinUsed(uint32_t gpio, uint32_t index) { - return (Pin(gpio, index) > -1); + return (Pin(gpio, index) >= 0); } uint32_t GetPin(uint32_t lpin) { diff --git a/tasmota/support_tasmota.ino b/tasmota/support_tasmota.ino index 8579c16c9..37f36b673 100644 --- a/tasmota/support_tasmota.ino +++ b/tasmota/support_tasmota.ino @@ -412,7 +412,7 @@ void SetLedLink(uint32_t state) if (-1 == led_pin) { // Legacy - LED1 is status SetLedPowerIdx(0, state); } - else if (led_pin > -1) { + else if (led_pin >= 0) { if (state) { state = 1; } digitalWrite(led_pin, (led_inv) ? !state : state); } @@ -717,7 +717,7 @@ void MqttPublishTeleState(void) MqttShowState(); MqttPublishPrefixTopic_P(TELE, PSTR(D_RSLT_STATE), MQTT_TELE_RETAIN); -#ifdef USE_DT_VARS +#ifdef USE_DT_VARS DTVarsTeleperiod(); #endif // USE_DT_VARS