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