mirror of
https://github.com/IoTManagerProject/IoTManager.git
synced 2026-03-30 03:49:13 +03:00
249 button bug fixed
This commit is contained in:
@@ -28,12 +28,12 @@ class ButtonInClass : public LineParsing {
|
|||||||
buttons[switch_number].update();
|
buttons[switch_number].update();
|
||||||
if (buttons[switch_number].fell()) {
|
if (buttons[switch_number].fell()) {
|
||||||
String key = jsonReadStr(configOptionJson, "switch_num_" + String(switch_number));
|
String key = jsonReadStr(configOptionJson, "switch_num_" + String(switch_number));
|
||||||
state = 0;
|
state = 1;
|
||||||
switchChangeVirtual(key, String(state));
|
switchChangeVirtual(key, String(state));
|
||||||
}
|
}
|
||||||
if (buttons[switch_number].rose()) {
|
if (buttons[switch_number].rose()) {
|
||||||
String key = jsonReadStr(configOptionJson, "switch_num_" + String(switch_number));
|
String key = jsonReadStr(configOptionJson, "switch_num_" + String(switch_number));
|
||||||
state = 1;
|
state = 0;
|
||||||
switchChangeVirtual(key, String(state));
|
switchChangeVirtual(key, String(state));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user