mirror of
https://git.mirrors.martin98.com/https://github.com/luc-github/ESP3D.git
synced 2025-08-14 06:55:54 +08:00
Enable mDNS for SoftAP
as now feature is working
This commit is contained in:
parent
57b6fb2131
commit
9c04635e15
@ -98,10 +98,7 @@ void setup() {
|
||||
|
||||
#ifdef MDNS_FEATURE
|
||||
// Check for any mDNS queries and send responses
|
||||
if (wifi_get_opmode()==WIFI_STA )
|
||||
{
|
||||
wifi_config.mdns.addService("http", "tcp", wifi_config.iweb_port);
|
||||
}
|
||||
wifi_config.mdns.addService("http", "tcp", wifi_config.iweb_port);
|
||||
#endif
|
||||
|
||||
#ifdef SSDP_FEATURE
|
||||
|
@ -524,12 +524,9 @@ void handle_web_interface_root()
|
||||
LABEL_UNITS(FPSTR(FREE_MEM_TITLE),String(system_get_free_heap_size()).c_str(),FPSTR(UNIT_OCTET))
|
||||
LABEL(FPSTR(SDK_VERSION_TITLE),system_get_sdk_version())
|
||||
#ifdef MDNS_FEATURE
|
||||
if (wifi_get_opmode()==WIFI_STA )
|
||||
{
|
||||
sstatus = FPSTR(HTTP_START);
|
||||
sstatus+=FPSTR(LOCAL_NAME);
|
||||
LABEL_UNITS(FPSTR(HTTP_MDNS_NAME),sstatus.c_str(),FPSTR(HTTP_END))
|
||||
}
|
||||
sstatus = FPSTR(HTTP_START);
|
||||
sstatus+=FPSTR(LOCAL_NAME);
|
||||
LABEL_UNITS(FPSTR(HTTP_MDNS_NAME),sstatus.c_str(),FPSTR(HTTP_END))
|
||||
#endif
|
||||
#ifdef SSDP_FEATURE
|
||||
LABEL(FPSTR(SSDP_PROTOCOL_NAME),FPSTR(VALUE_YES))
|
||||
@ -544,7 +541,6 @@ void handle_web_interface_root()
|
||||
else if (istatus==LIGHT_SLEEP_T) sstatus=FPSTR(VALUE_LIGHT);
|
||||
else sstatus=FPSTR(VALUE_MODEM);
|
||||
LABEL(FPSTR(SLEEP_MODE_TITLE),sstatus.c_str())
|
||||
//LABEL(sbuf,"Boot mode: ",String(system_get_boot_mode())) //no meaning so far
|
||||
LABEL(FPSTR(BOOT_VERSION_TITLE),String(system_get_boot_version()).c_str())
|
||||
istatus=0;
|
||||
if (!CONFIG::read_buffer(EP_BAUD_RATE, (byte *)&lstatus , INTEGER_LENGH))lstatus=0;
|
||||
|
@ -159,11 +159,10 @@ bool WIFI_CONFIG::Setup()
|
||||
}
|
||||
#ifdef MDNS_FEATURE
|
||||
// Set up mDNS responder:
|
||||
if (wifi_get_opmode()==WIFI_STA )
|
||||
if (!mdns.begin(String(FPSTR(LOCAL_NAME)).c_str())) {
|
||||
Serial.println(F("M117 Error with mDNS!"));
|
||||
delay(1000);
|
||||
}
|
||||
if (!mdns.begin(String(FPSTR(LOCAL_NAME)).c_str())) {
|
||||
Serial.println(F("M117 Error with mDNS!"));
|
||||
delay(1000);
|
||||
}
|
||||
#endif
|
||||
//Get IP
|
||||
if (wifi_get_opmode()==WIFI_STA)currentIP=WiFi.localIP();
|
||||
|
Loading…
x
Reference in New Issue
Block a user