Update webserver.ino

This commit is contained in:
Adrian Scillato 2018-04-07 01:02:36 -03:00 committed by GitHub
parent 2983334728
commit 663994148a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 12 additions and 9 deletions

View File

@ -25,10 +25,10 @@
* Based on source by AlexT (https://github.com/tzapu)
\*********************************************************************************************/
#ifdef USE_KNX
#include <esp-knx-ip.h> // Include KNX IP library
#ifdef USE_KNX
#include <esp-knx-ip.h> // Include KNX IP library
#endif // USE_KNX
#define STR_HELPER(x) #x
#define STR(x) STR_HELPER(x)
@ -202,9 +202,9 @@ const char HTTP_BTN_MENU_MQTT[] PROGMEM =
#endif // USE_DOMOTICZ
"";
const char HTTP_BTN_MENU4[] PROGMEM =
#ifdef USE_KNX
"<br/><form action='knx' method='get'><button>" D_CONFIGURE_KNX "</button></form>"
#endif // USE_KNX
#ifdef USE_KNX
"<br/><form action='knx' method='get'><button>" D_CONFIGURE_KNX "</button></form>"
#endif // USE_KNX
"<br/><form action='lg' method='get'><button>" D_CONFIGURE_LOGGING "</button></form>"
"<br/><form action='co' method='get'><button>" D_CONFIGURE_OTHER "</button></form>"
"<br/>"
@ -360,6 +360,9 @@ void StartWebserver(int type, IPAddress ipweb)
WebServer->on("/dm", HandleDomoticzConfiguration);
#endif // USE_DOMOTICZ
}
#ifdef USE_KNX
WebServer->on("/kn", HandleKNXConfiguration);
#endif // USE_KNX
WebServer->on("/lg", HandleLoggingConfiguration);
WebServer->on("/co", HandleOtherConfiguration);
WebServer->on("/dl", HandleBackupConfiguration);
@ -389,9 +392,9 @@ void StartWebserver(int type, IPAddress ipweb)
}
#endif // USE_EMULATION
WebServer->onNotFound(HandleNotFound);
#ifdef USE_KNX
knx.start(WebServer); // Start knx. The /knx link is automatically set inside the KNX library
#endif // USE_KNX
#ifdef USE_KNX
knx.start(WebServer); // Start knx. The /knx link is automatically set inside the KNX library
#endif // USE_KNX
}
reset_web_log_flag = 0;
WebServer->begin(); // Web server start