 |
ESP3D
3.0
Firmware for ESP boards connected to 3D Printer
|
Go to the documentation of this file.
27 #include "../authentication/authentication_service.h"
30 #define DEFAULT_TIMOUT 2000
31 #define MAX_TRY_2_SEND 5
32 #define ERROR_NO_ERROR 0
33 #define ERROR_TIME_OUT 1
34 #define ERROR_CANNOT_SEND_DATA 2
35 #define ERROR_LINE_NUMBER 3
36 #define ERROR_ACK_NUMBER 4
37 #define ERROR_MEMORY_PROBLEM 5
38 #define ERROR_RESEND 6
39 #define ERROR_NUMBER_MISMATCH 7
40 #define ERROR_LINE_IGNORED 8
47 bool begin(
bool waitwhenidle =
false);
50 bool sendCommand(
const char* command,
bool checksum =
false,
bool wait4ack =
true,
const char * ack=
nullptr);
53 return _commandnumber;
60 uint8_t
Checksum(
const char * command, uint32_t commandSize);
79 uint32_t _commandnumber;
80 uint32_t _needcommandnumber;
87 #endif //_GCODE_HOST_H
bool purge(uint32_t timeout=DEFAULT_TIMOUT)
uint32_t Get_commandNumber(String &response)
GcodeHost esp3d_gcode_host
bool processFile(const char *filename, level_authenticate_type auth_type, ESP3DOutput *output)
bool processFSFile(const char *filename, level_authenticate_type auth_type, ESP3DOutput *output)
size_t wait_for_data(uint32_t timeout=DEFAULT_TIMOUT)
void setCommandNumber(uint32_t n)
bool processLine(const char *line, level_authenticate_type auth_type, ESP3DOutput *output)
String CheckSumCommand(const char *command, uint32_t commandnb)
bool wait_for_ack(uint32_t timeout=DEFAULT_TIMOUT, bool checksum=false, const char *ack=nullptr)
uint8_t Checksum(const char *command, uint32_t commandSize)
bool processscript(const char *line)
uint32_t currentCommandNumber()
bool resetCommandNumbering()
bool sendCommand(const char *command, bool checksum=false, bool wait4ack=true, const char *ack=nullptr)
bool begin(bool waitwhenidle=false)