fixed issue with with compiling when using no alexa stuff, added espalexa.loop() to the main loop
This commit is contained in:
parent
fd5a5a70de
commit
b4afca5630
@ -486,7 +486,9 @@ void setup() {
|
|||||||
String g = webServer.arg("g");
|
String g = webServer.arg("g");
|
||||||
String b = webServer.arg("b");
|
String b = webServer.arg("b");
|
||||||
setSolidColor(r.toInt(), g.toInt(), b.toInt());
|
setSolidColor(r.toInt(), g.toInt(), b.toInt());
|
||||||
|
#ifdef ENABLE_ALEXA_SUPPORT
|
||||||
alexa_main->setColor(r.toInt(), g.toInt(), b.toInt());
|
alexa_main->setColor(r.toInt(), g.toInt(), b.toInt());
|
||||||
|
#endif
|
||||||
sendString(String(solidColor.r) + "," + String(solidColor.g) + "," + String(solidColor.b));
|
sendString(String(solidColor.r) + "," + String(solidColor.g) + "," + String(solidColor.b));
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -517,7 +519,9 @@ void setup() {
|
|||||||
webServer.on("/brightness", HTTP_POST, []() {
|
webServer.on("/brightness", HTTP_POST, []() {
|
||||||
String value = webServer.arg("value");
|
String value = webServer.arg("value");
|
||||||
setBrightness(value.toInt());
|
setBrightness(value.toInt());
|
||||||
|
#ifdef ENABLE_ALEXA_SUPPORT
|
||||||
alexa_main->setValue(brightness);
|
alexa_main->setValue(brightness);
|
||||||
|
#endif
|
||||||
sendInt(brightness);
|
sendInt(brightness);
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -617,8 +621,11 @@ void loop() {
|
|||||||
|
|
||||||
// dnsServer.processNextRequest();
|
// dnsServer.processNextRequest();
|
||||||
// webSocketsServer.loop();
|
// webSocketsServer.loop();
|
||||||
|
#ifdef ENABLE_ALEXA_SUPPORT
|
||||||
|
espalexa.loop();
|
||||||
|
#else
|
||||||
webServer.handleClient();
|
webServer.handleClient();
|
||||||
|
#endif
|
||||||
// handleIrInput();
|
// handleIrInput();
|
||||||
|
|
||||||
if (power == 0) {
|
if (power == 0) {
|
||||||
|
Loading…
Reference in New Issue
Block a user