This repository has been archived on 2025-02-01. You can view files and clone it, but cannot push or open issues or pull requests.
reprapfirmware-dc42/Move.ino
2013-03-01 23:00:41 +00:00

51 lines
1.1 KiB
C++

/****************************************************************************************************
RepRapFirmware - Move
This is all the code to deal with movement and kinematics.
-----------------------------------------------------------------------------------------------------
Version 0.1
18 November 2012
Adrian Bowyer
RepRap Professional Ltd
http://reprappro.com
Licence: GPL
****************************************************************************************************/
#include "RepRapFirmware.h"
Move::Move(Platform* p)
{
//Serial.println("Move constructor");
platform = p;
Init();
}
void Move::Init()
{
lastTime = platform->Time();
platform->SetDirection(X_AXIS, FORWARDS);
platform->SetDirection(Y_AXIS, FORWARDS);
platform->SetDirection(Z_AXIS, FORWARDS);
platform->SetDirection(3, FORWARDS);
}
void Move::Spin()
{
unsigned long t = platform->Time();
if(t - lastTime < 300)
return;
lastTime = t;
//Serial.println("tick");
/* platform->step(X_AXIS);
platform->step(Y_AXIS);
platform->step(Z_AXIS);
platform->step(3);
*/
}