mirror of
https://github.com/luc-github/ESP3DLib.git
synced 2026-03-10 01:46:53 +01:00
Astyle + fix reset_settings warning
This commit is contained in:
@@ -67,10 +67,10 @@ void Esp3DLib::init()
|
||||
//Parse command
|
||||
bool Esp3DLib::parse(char * cmd)
|
||||
{
|
||||
String scmd = cmd;
|
||||
int ESPpos = scmd.indexOf ("[ESP");
|
||||
String scmd = cmd;
|
||||
int ESPpos = scmd.indexOf ("[ESP");
|
||||
if (ESPpos > -1) {
|
||||
int ESPpos2 = scmd.indexOf("]",ESPpos);
|
||||
int ESPpos2 = scmd.indexOf("]",ESPpos);
|
||||
if (ESPpos2>-1) {
|
||||
//Split in command and parameters
|
||||
String cmd_part1=scmd.substring(ESPpos+4,ESPpos2);
|
||||
@@ -81,17 +81,19 @@ bool Esp3DLib::parse(char * cmd)
|
||||
}
|
||||
//if command is a valid number then execute command
|
||||
if(cmd_part1.toInt() >=0) {
|
||||
ESPResponseStream response(SERIAL_PIPE);
|
||||
ESPResponseStream response(SERIAL_PIPE);
|
||||
level_authenticate_type auth_type = LEVEL_ADMIN; //we do not care serial authentication
|
||||
COMMAND::execute_internal_command (cmd_part1.toInt(), cmd_part2, auth_type, &response);
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
} else return false;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
#endif //ESP3D_WIFISUPPORT
|
||||
|
||||
Reference in New Issue
Block a user