farmbot-arduino-firmware/src/F12Handler.cpp

42 lines
559 B
C++
Raw Normal View History

2014-07-23 01:46:21 -06:00
/*
* F12Handler.cpp
*
* Created on: 2014/07/21
* Author: MattLech
*/
#include "F12Handler.h"
2017-04-19 08:12:12 -06:00
static F12Handler *instance;
F12Handler *F12Handler::getInstance()
{
if (!instance)
{
instance = new F12Handler();
};
return instance;
};
F12Handler::F12Handler()
{
2014-07-23 01:46:21 -06:00
}
2017-04-19 08:12:12 -06:00
int F12Handler::execute(Command *command)
{
2014-07-23 01:46:21 -06:00
2017-04-19 08:12:12 -06:00
if (LOGGING)
{
Serial.print("R99 HOME Y\r\n");
}
2014-07-23 01:46:21 -06:00
2017-04-19 08:12:12 -06:00
StepperControl::getInstance()->moveToCoords(0, 0, 0, 0, 0, 0, false, true, false);
2014-07-23 01:46:21 -06:00
2017-04-19 08:12:12 -06:00
if (LOGGING)
{
CurrentState::getInstance()->print();
}
return 0;
2014-07-23 01:46:21 -06:00
}