From 0a0a766c0db7c518a491ea6f999a9b56449e6f22 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bla=C5=BE=20Kristan?= Date: Wed, 2 Jun 2021 06:21:43 +0200 Subject: [PATCH] Bugfix. - pushbutton inverted not saving - mqtt on/off message --- wled00/button.cpp | 2 +- wled00/data/settings_leds.htm | 2 +- wled00/html_settings.h | 2 +- wled00/wled.h | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/wled00/button.cpp b/wled00/button.cpp index 548d9020b..f0cbcd392 100644 --- a/wled00/button.cpp +++ b/wled00/button.cpp @@ -76,7 +76,7 @@ void handleSwitch(uint8_t b) if (WLED_MQTT_CONNECTED) { char subuf[64]; sprintf_P(subuf, PSTR(_mqtt_topic_button), mqttDeviceTopic, (int)b); - mqtt->publish(subuf, 0, false, buttonPressedBefore[b] ^ (buttonType[b]==BTN_TYPE_SWITCH_ACT_HIGH) ? "on" : "off"); + mqtt->publish(subuf, 0, false, (buttonPressedBefore[b] ^ (buttonType[b]==BTN_TYPE_SWITCH_ACT_HIGH)) ? "on" : "off"); } buttonLongPressed[b] = buttonPressedBefore[b]; //save the last "long term" switch state diff --git a/wled00/data/settings_leds.htm b/wled00/data/settings_leds.htm index 73ecd9713..c2a0bd6ab 100644 --- a/wled00/data/settings_leds.htm +++ b/wled00/data/settings_leds.htm @@ -303,7 +303,7 @@ Reverse (rotated 180°): c += `