Merge pull request #19 from TimEvWw/master

Testing
pull/30/head
Tim Evers 2015-02-01 23:23:23 +01:00
commit 2964568fed
4 changed files with 8 additions and 0 deletions

View File

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

View File

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

View File

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

View File

@ -11,6 +11,7 @@
enum ParamListEnum
{
PARAM_VERSION = 0,
PARAM_TEST = 1,
MOVEMENT_TIMEOUT_X = 11,
MOVEMENT_TIMEOUT_Y = 12,