commit
2964568fed
|
@ -23,6 +23,9 @@ long mode = 0;
|
|||
CommandCodeEnum commandCodeEnum = CODE_UNDEFINED;
|
||||
|
||||
Command::Command(String commandString) {
|
||||
|
||||
commandString = commandString + " ";
|
||||
|
||||
char charBuf[commandString.length()];
|
||||
commandString.toCharArray(charBuf, commandString.length());
|
||||
char* charPointer;
|
||||
|
@ -43,6 +46,8 @@ Command::Command(String commandString) {
|
|||
}
|
||||
|
||||
CommandCodeEnum Command::getGCodeEnum(char* code) {
|
||||
|
||||
|
||||
if (strcmp(code, "G0") == 0 || strcmp(code, "G00") == 0) {
|
||||
return G00;
|
||||
}
|
||||
|
|
|
@ -27,6 +27,7 @@ const unsigned int MOVEMENT_SPEED_BASE_TIME = 2000;
|
|||
const unsigned int MOVEMENT_DELAY = 500;
|
||||
|
||||
const long PARAM_VERSION_DEFAULT = 0;
|
||||
const long PARAM_TEST_DEFAULT = 0;
|
||||
|
||||
const long MOVEMENT_TIMEOUT_X_DEFAULT = 30;
|
||||
const long MOVEMENT_TIMEOUT_Y_DEFAULT = 30;
|
||||
|
|
|
@ -14,6 +14,7 @@ ParameterList::ParameterList() {
|
|||
|
||||
|
||||
paramValues[PARAM_VERSION] = PARAM_VERSION_DEFAULT;
|
||||
paramValues[PARAM_TEST] = PARAM_TEST_DEFAULT;
|
||||
|
||||
paramValues[MOVEMENT_TIMEOUT_X] = MOVEMENT_TIMEOUT_X_DEFAULT;
|
||||
paramValues[MOVEMENT_TIMEOUT_Y] = MOVEMENT_TIMEOUT_Y_DEFAULT;
|
||||
|
|
|
@ -11,6 +11,7 @@
|
|||
enum ParamListEnum
|
||||
{
|
||||
PARAM_VERSION = 0,
|
||||
PARAM_TEST = 1,
|
||||
|
||||
MOVEMENT_TIMEOUT_X = 11,
|
||||
MOVEMENT_TIMEOUT_Y = 12,
|
||||
|
|
Loading…
Reference in New Issue