Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 9 additions & 8 deletions BURT_TMC.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,15 @@

#include "limit.h"

const double pi = 3.141592653589793;
const int microstepsPerStep = 256;
const int stepsPerRotation = 200;
const int degreesPerRotation = 360;
const double radiansPerRotation = 2 * pi;

const double microstepsPerRadian = microstepsPerStep * stepsPerRotation / radiansPerRotation;
const double microstepsPerDegree = microstepsPerStep * stepsPerRotation / degreesPerRotation;
constexpr float pi = 3.141592653589793f;
constexpr uint16_t stepsPerRotation = 200;
constexpr uint16_t degreesPerRotation = 360;
constexpr float radiansPerRotation = 2.0f * pi;
constexpr uint16_t mres = 16;
constexpr int microstepsPerStep = 256;

constexpr float microstepsPerRadian = microstepsPerStep * stepsPerRotation / radiansPerRotation;
constexpr float microstepsPerDegree = microstepsPerStep * stepsPerRotation / degreesPerRotation;

struct StepperMotorPins {
int enable;
Expand Down