mirror of
https://github.com/wled/WLED.git
synced 2025-07-23 10:46:33 +00:00
Bugfix.
- pushbutton inverted not saving - mqtt on/off message
This commit is contained in:
parent
2f9eacdf66
commit
0a0a766c0d
@ -76,7 +76,7 @@ void handleSwitch(uint8_t b)
|
|||||||
if (WLED_MQTT_CONNECTED) {
|
if (WLED_MQTT_CONNECTED) {
|
||||||
char subuf[64];
|
char subuf[64];
|
||||||
sprintf_P(subuf, PSTR(_mqtt_topic_button), mqttDeviceTopic, (int)b);
|
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
|
buttonLongPressed[b] = buttonPressedBefore[b]; //save the last "long term" switch state
|
||||||
|
@ -303,7 +303,7 @@ Reverse (rotated 180°): <input type="checkbox" name="CV${i}">
|
|||||||
c += `<select name="${be}">`
|
c += `<select name="${be}">`
|
||||||
c += `<option value="0" ${t==0?"selected":""}>Disabled</option>`;
|
c += `<option value="0" ${t==0?"selected":""}>Disabled</option>`;
|
||||||
c += `<option value="2" ${t==2?"selected":""}>Pushbutton</option>`;
|
c += `<option value="2" ${t==2?"selected":""}>Pushbutton</option>`;
|
||||||
c += `<option value="2" ${t==3?"selected":""}>Push inverted</option>`;
|
c += `<option value="3" ${t==3?"selected":""}>Push inverted</option>`;
|
||||||
c += `<option value="4" ${t==4?"selected":""}>Switch</option>`;
|
c += `<option value="4" ${t==4?"selected":""}>Switch</option>`;
|
||||||
c += `<option value="5" ${t==5?"selected":""}>Switch inverted</option>`;
|
c += `<option value="5" ${t==5?"selected":""}>Switch inverted</option>`;
|
||||||
c += `<option value="6" ${t==6?"selected":""}>Touch</option>`;
|
c += `<option value="6" ${t==6?"selected":""}>Touch</option>`;
|
||||||
|
File diff suppressed because one or more lines are too long
@ -8,7 +8,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
// version code in format yymmddb (b = daily build)
|
// version code in format yymmddb (b = daily build)
|
||||||
#define VERSION 2106011
|
#define VERSION 2106021
|
||||||
|
|
||||||
//uncomment this if you have a "my_config.h" file you'd like to use
|
//uncomment this if you have a "my_config.h" file you'd like to use
|
||||||
//#define WLED_USE_MY_CONFIG
|
//#define WLED_USE_MY_CONFIG
|
||||||
|
Loading…
x
Reference in New Issue
Block a user