Astyle + fix reset_settings warning

This commit is contained in:
Luc
2020-01-09 15:16:31 +01:00
parent b8af52ecf3
commit 13c4a2e6fc
18 changed files with 2420 additions and 1994 deletions

View File

@@ -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