mirror of
https://github.com/IoTManagerProject/IoTManager.git
synced 2026-03-26 22:22:16 +03:00
Исправил баг физической кнопки (проверил работает)
This commit is contained in:
@@ -3,9 +3,6 @@
|
||||
Servo myServo1;
|
||||
Servo myServo2;
|
||||
|
||||
boolean but[NUM_BUTTONS];
|
||||
Bounce *buttons;
|
||||
|
||||
void CMD_init() {
|
||||
sCmd.addCommand("button", button);
|
||||
sCmd.addCommand("buttonSet", buttonSet);
|
||||
@@ -257,7 +254,7 @@ void handleButton() {
|
||||
}
|
||||
}
|
||||
switch_number++;
|
||||
if (switch_number == 6) switch_number = 0;
|
||||
if (switch_number == NUM_BUTTONS) switch_number = 0;
|
||||
}
|
||||
|
||||
//=====================================================================================================================================
|
||||
|
||||
@@ -21,6 +21,9 @@ AsyncWebServer server(80);
|
||||
|
||||
DallasTemperature sensors;
|
||||
|
||||
boolean but[NUM_BUTTONS];
|
||||
Bounce *buttons = new Bounce[NUM_BUTTONS];
|
||||
|
||||
/*
|
||||
* Global vars
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user