blob: 5132e7f3e78c1fee7314579ccbf1f1a7f0886dcd (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
/*
* CoreBaseKinematics.h
*
* Created on: 7 May 2017
* Author: David
*/
#ifndef SRC_MOVEMENT_KINEMATICS_COREBASEKINEMATICS_H_
#define SRC_MOVEMENT_KINEMATICS_COREBASEKINEMATICS_H_
#include "Kinematics.h"
class CoreBaseKinematics : public Kinematics
{
public:
CoreBaseKinematics(KinematicsType t);
// Overridden base class functions. See Kinematics.h for descriptions.
bool CartesianToMotorSteps(const float machinePos[], const float stepsPerMm[], size_t numVisibleAxes, size_t numTotalAxes, int32_t motorPos[]) const override final;
bool Configure(unsigned int mCode, GCodeBuffer& gb, StringRef& reply, bool& error) override;
bool SupportsAutoCalibration() const override final { return false; }
HomingMode GetHomingMode() const override { return homeCartesianAxes; }
protected:
// Calculate the movement fraction for a single axis motor of a Cartesian-like printer.
// The default implementation just returns directionVector[drive] but this needs to be overridden for CoreXY and CoreXZ printers.
virtual float MotorFactor(size_t drive, const float directionVector[]) const = 0;
float axisFactors[MaxAxes]; // allow more than just XYZ so that we can support e.g. CoreXYU kinematics
};
#endif /* SRC_MOVEMENT_KINEMATICS_COREBASEKINEMATICS_H_ */
|