Fix Wrong error code if ack timeout

Fix do not retry if time out in ack
Increase default timeout
This commit is contained in:
Luc 2020-10-03 19:50:54 +02:00
parent 7a804591c3
commit a212d3b049
4 changed files with 6 additions and 5 deletions

View File

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

View File

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

View File

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

View File

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