mirror of
https://git.mirrors.martin98.com/https://github.com/luc-github/ESP3D.git
synced 2025-08-05 17:00:40 +08:00
Change status of stream pause to be meaningful
Add flag to ESP701 CLEAR_ERROR, to clear last error code
This commit is contained in:
parent
8af8e8dfa7
commit
495eb67049
@ -69,6 +69,10 @@ bool Commands::ESP701(const char* cmd_params, level_authenticate_type auth_type,
|
||||
response = format_response(COMMANDID, json, false, "No stream to abort");
|
||||
noError = false;
|
||||
}
|
||||
}
|
||||
if (parameter.equalsIgnoreCase("CLEAR_ERROR")) {
|
||||
esp3d_gcode_host.setErrorNum(ERROR_NO_ERROR);
|
||||
response = format_response(COMMANDID, json, true, "Error cleared");
|
||||
} else {
|
||||
response = format_response(COMMANDID, json, false, "Unknown action");
|
||||
noError = false;
|
||||
@ -96,7 +100,7 @@ bool Commands::ESP701(const char* cmd_params, level_authenticate_type auth_type,
|
||||
response = format_response(COMMANDID, json, true, resp.c_str());
|
||||
break;
|
||||
case HOST_PAUSE_STREAM:
|
||||
response = format_response(COMMANDID, json, true, "pause stream");
|
||||
response = format_response(COMMANDID, json, true, "pause");
|
||||
break;
|
||||
case HOST_RESUME_STREAM:
|
||||
response = format_response(COMMANDID, json, true, "resume stream");
|
||||
|
@ -91,6 +91,11 @@ public:
|
||||
return _error;
|
||||
}
|
||||
|
||||
void setErrorNum(uint8_t error)
|
||||
{
|
||||
_error = error;
|
||||
}
|
||||
|
||||
uint8_t getStatus()
|
||||
{
|
||||
return _step;
|
||||
|
Loading…
x
Reference in New Issue
Block a user