mirror of
https://github.com/HASwitchPlate/openHASP.git
synced 2025-07-26 20:56:37 +00:00
Add Button
This commit is contained in:
parent
3dc9b89fd6
commit
af16164e41
@ -12,6 +12,8 @@
|
|||||||
#define HASP_USE_EEPROM 0
|
#define HASP_USE_EEPROM 0
|
||||||
#define HASP_USE_SDCARD 0
|
#define HASP_USE_SDCARD 0
|
||||||
|
|
||||||
|
#define HASP_USE_BUTTON 1
|
||||||
|
|
||||||
#define HASP_USE_QRCODE 1
|
#define HASP_USE_QRCODE 1
|
||||||
#define HASP_USE_PNGDECODE 0
|
#define HASP_USE_PNGDECODE 0
|
||||||
|
|
||||||
|
12
src/main.cpp
12
src/main.cpp
@ -39,6 +39,10 @@
|
|||||||
#include "hasp_mdns.h"
|
#include "hasp_mdns.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if HASP_USE_BUTTON
|
||||||
|
#include "hasp_button.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
bool isConnected;
|
bool isConnected;
|
||||||
|
|
||||||
void setup()
|
void setup()
|
||||||
@ -83,6 +87,10 @@ void setup()
|
|||||||
httpSetup(settings[F("http")]);
|
httpSetup(settings[F("http")]);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if HASP_USE_BUTTON
|
||||||
|
buttonSetup();
|
||||||
|
#endif
|
||||||
|
|
||||||
// otaSetup(settings[F("ota")]);
|
// otaSetup(settings[F("ota")]);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
@ -123,6 +131,10 @@ void loop()
|
|||||||
mdnsLoop(isConnected);
|
mdnsLoop(isConnected);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if HASP_USE_BUTTON
|
||||||
|
buttonLoop();
|
||||||
|
#endif
|
||||||
|
|
||||||
// otaLoop(wifiIsConnected);
|
// otaLoop(wifiIsConnected);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user