Fix garbage when reset is needed

Fix mDNS failed to start - revert change of start position
Fix wrong name of ini file for SD configuration
This commit is contained in:
Luc 2020-12-13 21:44:12 +01:00
parent 5073327e30
commit 2d58b305a1
3 changed files with 18 additions and 16 deletions

View File

@ -184,6 +184,7 @@ void Esp3D::restart_esp(bool need_restart)
void Esp3D::restart_now()
{
log_esp3d("Restarting");
if (!serial_service.started())serial_service.begin();
serial_service.flush();
#if defined(FILESYSTEM_FEATURE)
ESP_FileSystem::end();

View File

@ -98,6 +98,22 @@ bool NetServices::begin()
}
#endif //TIMESTAMP_FEATURE
#if defined(MDNS_FEATURE) && defined(ARDUINO_ARCH_ESP8266)
if(WiFi.getMode() != WIFI_AP) {
String lhostname =hostname;
lhostname.toLowerCase();
log_esp3d("Start mdsn for %s", hostname.c_str());
if (!MDNS.begin(hostname.c_str())) {
output.printERROR("mDNS failed to start");
_started =false;
} else {
String stmp = "mDNS started with '" + lhostname + ".local'";
if (Settings_ESP3D::isVerboseBoot()) {
output.printMSG(stmp.c_str());
}
}
}
#endif //MDNS_FEATURE && ARDUINO_ARCH_ESP8266
#ifdef OTA_FEATURE
if(WiFi.getMode() != WIFI_AP) {
@ -151,22 +167,7 @@ bool NetServices::begin()
ArduinoOTA.begin();
}
#endif
#if defined(MDNS_FEATURE) && defined(ARDUINO_ARCH_ESP8266)
if(WiFi.getMode() != WIFI_AP) {
String lhostname =hostname;
lhostname.toLowerCase();
log_esp3d("Start mdsn for %s", hostname.c_str());
if (!MDNS.begin(hostname.c_str())) {
output.printERROR("mDNS failed to start");
_started =false;
} else {
String stmp = "mDNS started with '" + lhostname + ".local'";
if (Settings_ESP3D::isVerboseBoot()) {
output.printMSG(stmp.c_str());
}
}
}
#endif //MDNS_FEATURE && ARDUINO_ARCH_ESP8266
#if defined(MDNS_FEATURE) && defined(ARDUINO_ARCH_ESP32)
if(WiFi.getMode() != WIFI_AP) {
String lhostname =hostname;