mirror of
https://git.mirrors.martin98.com/https://github.com/luc-github/ESP3D.git
synced 2025-08-05 15:20:42 +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;
|
||||
#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");
|
||||
}
|
||||
return response;
|
||||
|
@ -22,7 +22,7 @@
|
||||
#define _VERSION_ESP3D_H
|
||||
|
||||
//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"
|
||||
|
||||
#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
|
||||
}
|
||||
_error = ERROR_ACK_NUMBER;
|
||||
_error = ERROR_TIME_OUT;
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -209,7 +209,7 @@ bool GcodeHost::sendCommand(const char* command, bool checksum, bool wait4ack, c
|
||||
//what is the error ?
|
||||
log_esp3d("Error: %d", _error);
|
||||
//no need to retry for this one
|
||||
if (_error == ERROR_MEMORY_PROBLEM) {
|
||||
if ((_error == ERROR_MEMORY_PROBLEM) || (_error == ERROR_TIME_OUT)) {
|
||||
return false;
|
||||
}
|
||||
//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) {
|
||||
|
@ -27,7 +27,7 @@
|
||||
#include "../authentication/authentication_service.h"
|
||||
class ESP3DOutput;
|
||||
|
||||
#define DEFAULT_TIMOUT 2000
|
||||
#define DEFAULT_TIMOUT 16000
|
||||
#define MAX_TRY_2_SEND 5
|
||||
#define ERROR_NO_ERROR 0
|
||||
#define ERROR_TIME_OUT 1
|
||||
|
Loading…
x
Reference in New Issue
Block a user