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