Centralized the creation of a hostname to a global variable hostname, set in pitrix.cpp. Added an mDNS record for the webserver.
This commit is contained in:
@ -4,6 +4,8 @@
|
||||
|
||||
#include "http_server.h"
|
||||
#include "effects.h"
|
||||
#include "my_wifi.h"
|
||||
#include "prototypes.h"
|
||||
|
||||
#if defined( ESP8266 )
|
||||
ESP8266WebServer http_server(HTTP_SERVER_PORT);
|
||||
@ -71,6 +73,8 @@ void http_server_setup() {
|
||||
http_server.send_P(400, text_plain, PSTR("Unknown effect."));
|
||||
});
|
||||
http_server.begin();
|
||||
|
||||
MDNS.addService("_http", "_tcp", 80);
|
||||
}
|
||||
|
||||
void http_server_loop() {
|
||||
|
Reference in New Issue
Block a user