mirror of
https://github.com/FYSETC/ESPWebDAV.git
synced 2026-03-07 01:06:56 +01:00
Generate ip.gcode after wifi connected
This commit is contained in:
10
network.cpp
10
network.cpp
@@ -6,6 +6,14 @@
|
||||
#include "ESPWebDAV.h"
|
||||
#include "sdControl.h"
|
||||
|
||||
String IpAddress2String(const IPAddress& ipAddress)
|
||||
{
|
||||
return String(ipAddress[0]) + String(".") +\
|
||||
String(ipAddress[1]) + String(".") +\
|
||||
String(ipAddress[2]) + String(".") +\
|
||||
String(ipAddress[3]) ;
|
||||
}
|
||||
|
||||
bool Network::start() {
|
||||
wifiConnected = false;
|
||||
|
||||
@@ -41,6 +49,8 @@ bool Network::start() {
|
||||
wifiConnected = true;
|
||||
|
||||
config.save();
|
||||
String sIp = IpAddress2String(WiFi.localIP());
|
||||
config.save_ip(sIp.c_str());
|
||||
|
||||
SERIAL_ECHOLN("Going to start DAV server");
|
||||
if(startDAVServer() < 0) return false;
|
||||
|
||||
Reference in New Issue
Block a user