farmbot-arduino-firmware/src/G00Handler.cpp

58 lines
1.0 KiB
C++
Raw Normal View History

/*
* G00Handler.cpp
*
* Created on: 15 maj 2014
* Author: MattLech
*/
#include "G00Handler.h"
static G00Handler* instance;
G00Handler * G00Handler::getInstance() {
if (!instance) {
instance = new G00Handler();
};
return instance;
}
;
G00Handler::G00Handler() {
}
int G00Handler::execute(Command* command) {
2015-06-24 14:58:45 -06:00
2017-01-19 12:20:36 -07:00
// Serial.print("G00 was here\r\n");
2015-06-24 14:58:45 -06:00
// Serial.print("R99");
// Serial.print(" X ");
// Serial.print(command->getX());
// Serial.print(" Y ");
// Serial.print(command->getY());
// Serial.print(" Z ");
// Serial.print(command->getZ());
// Serial.print(" A ");
// Serial.print(command->getA());
// Serial.print(" B ");
// Serial.print(command->getB());
// Serial.print(" C ");
// Serial.print(command->getC());
// Serial.print("\r\n");
2015-06-24 14:58:45 -06:00
2016-10-02 15:43:39 -06:00
StepperControl::getInstance()->moveToCoords
(
2015-06-24 14:58:45 -06:00
command->getX(), command->getY(), command->getZ(),
command->getA(), command->getB(), command->getC(),
2016-10-02 15:43:39 -06:00
false, false, false
);
2015-08-12 15:23:21 -06:00
if (LOGGING) {
CurrentState::getInstance()->print();
}
return 0;
}