mirror of
https://git.mirrors.martin98.com/https://github.com/luc-github/ESP3D.git
synced 2025-08-06 07:47:31 +08:00
Fix Wrong error code if ack timeout
Fix do not retry if time out in ack Increase default timeout
This commit is contained in:
parent
7a804591c3
commit
a212d3b049
@ -41,7 +41,7 @@ bool Commands::ESP700(const char* cmd_params, level_authenticate_type auth_type,
|
|||||||
(void)auth_type;
|
(void)auth_type;
|
||||||
#endif //AUTHENTICATION_FEATURE
|
#endif //AUTHENTICATION_FEATURE
|
||||||
{
|
{
|
||||||
esp3d_gcode_host.processFile(parameter.c_str(), auth_type, output);
|
esp3d_gcode_host.processFSFile(parameter.c_str(), auth_type, output);
|
||||||
output->printMSG("ok");
|
output->printMSG("ok");
|
||||||
}
|
}
|
||||||
return response;
|
return response;
|
||||||
|
@ -22,7 +22,7 @@
|
|||||||
#define _VERSION_ESP3D_H
|
#define _VERSION_ESP3D_H
|
||||||
|
|
||||||
//version and sources location
|
//version and sources location
|
||||||
#define FW_VERSION "3.0.0.a58"
|
#define FW_VERSION "3.0.0.a59"
|
||||||
#define REPOSITORY "https://github.com/luc-github/ESP3D/tree/3.0"
|
#define REPOSITORY "https://github.com/luc-github/ESP3D/tree/3.0"
|
||||||
|
|
||||||
#endif //_VERSION_ESP3D_H
|
#endif //_VERSION_ESP3D_H
|
||||||
|
@ -163,7 +163,7 @@ bool GcodeHost::wait_for_ack(uint32_t timeout, bool checksum, const char * ack)
|
|||||||
|
|
||||||
Hal::wait (0); //minimum delay is 10 actually
|
Hal::wait (0); //minimum delay is 10 actually
|
||||||
}
|
}
|
||||||
_error = ERROR_ACK_NUMBER;
|
_error = ERROR_TIME_OUT;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -209,7 +209,7 @@ bool GcodeHost::sendCommand(const char* command, bool checksum, bool wait4ack, c
|
|||||||
//what is the error ?
|
//what is the error ?
|
||||||
log_esp3d("Error: %d", _error);
|
log_esp3d("Error: %d", _error);
|
||||||
//no need to retry for this one
|
//no need to retry for this one
|
||||||
if (_error == ERROR_MEMORY_PROBLEM) {
|
if ((_error == ERROR_MEMORY_PROBLEM) || (_error == ERROR_TIME_OUT)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
//need to resend command
|
//need to resend command
|
||||||
@ -224,6 +224,7 @@ bool GcodeHost::sendCommand(const char* command, bool checksum, bool wait4ack, c
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Hal::wait(0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (_error == ERROR_NO_ERROR) {
|
if (_error == ERROR_NO_ERROR) {
|
||||||
|
@ -27,7 +27,7 @@
|
|||||||
#include "../authentication/authentication_service.h"
|
#include "../authentication/authentication_service.h"
|
||||||
class ESP3DOutput;
|
class ESP3DOutput;
|
||||||
|
|
||||||
#define DEFAULT_TIMOUT 2000
|
#define DEFAULT_TIMOUT 16000
|
||||||
#define MAX_TRY_2_SEND 5
|
#define MAX_TRY_2_SEND 5
|
||||||
#define ERROR_NO_ERROR 0
|
#define ERROR_NO_ERROR 0
|
||||||
#define ERROR_TIME_OUT 1
|
#define ERROR_TIME_OUT 1
|
||||||
|
Loading…
x
Reference in New Issue
Block a user