mirror of
https://github.com/FYSETC/ESPWebDAV.git
synced 2026-03-18 22:56:53 +01:00
Update serial info
This commit is contained in:
16
gcode.cpp
16
gcode.cpp
@@ -102,7 +102,8 @@ void Gcode::get_serial_commands() {
|
||||
void Gcode::gcode_M50() {
|
||||
for (char *fn = parser.string_arg; *fn; ++fn) if (*fn == ' ') *fn = '\0';
|
||||
config.ssid(parser.string_arg);
|
||||
SERIAL_ECHO(config.ssid());
|
||||
SERIAL_ECHO("ssid:");
|
||||
SERIAL_ECHOLN(config.ssid());
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -111,7 +112,8 @@ void Gcode::gcode_M50() {
|
||||
void Gcode::gcode_M51() {
|
||||
for (char *fn = parser.string_arg; *fn; ++fn) if (*fn == ' ') *fn = '\0';
|
||||
config.password(parser.string_arg);
|
||||
SERIAL_ECHO(config.password());
|
||||
SERIAL_ECHO("password:");
|
||||
SERIAL_ECHOLN(config.password());
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -119,8 +121,11 @@ void Gcode::gcode_M51() {
|
||||
*/
|
||||
void Gcode::gcode_M52() {
|
||||
if(!network.start()) {
|
||||
SERIAL_ECHOLN("");
|
||||
SERIAL_ECHOLN("Connect fail, please set the wifi config and connect again");
|
||||
SERIAL_ECHOLN("- M50: Set the wifi ssid , 'M50 ssid-name'");
|
||||
SERIAL_ECHOLN("- M51: Set the wifi password , 'M51 password'");
|
||||
SERIAL_ECHOLN("- M52: Start to connect the wifi");
|
||||
SERIAL_ECHOLN("- M53: Check the connection status");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -130,7 +135,10 @@ void Gcode::gcode_M52() {
|
||||
void Gcode::gcode_M53() {
|
||||
if(WiFi.status() != WL_CONNECTED) {
|
||||
SERIAL_ECHOLN("Wifi not connected");
|
||||
SERIAL_ECHOLN("Please set the wifi ssid with M50 and password with M51 , and start connection with M52");
|
||||
SERIAL_ECHOLN("- M50: Set the wifi ssid , 'M50 ssid-name'");
|
||||
SERIAL_ECHOLN("- M51: Set the wifi password , 'M51 password'");
|
||||
SERIAL_ECHOLN("- M52: Start to connect the wifi");
|
||||
SERIAL_ECHOLN("- M53: Check the connection status");
|
||||
}
|
||||
else {
|
||||
SERIAL_ECHOLN("");
|
||||
|
||||
Reference in New Issue
Block a user