motor control changed to infinit pipeline with continuous buffer
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
#pragma once
|
||||
#include <cmath>
|
||||
#include <numbers>
|
||||
|
||||
struct StepperConfig {
|
||||
StepperConfig(float stepDeg, int microsteps)
|
||||
: step(stepDeg), resolution(microsteps), resolutionQuad(resolution / 4) {}
|
||||
|
||||
/// @brief Step-size in degree (e.g. 1.8 deg)
|
||||
float step;
|
||||
/// @brief Step-size in radiant (e.g. 1.8 deg)
|
||||
float stepRad{(float)(std::numbers::pi * step / 180)};
|
||||
/// @brief Number of microsteps for four steps
|
||||
int resolution;
|
||||
/// @brief Number of microsteps for four steps
|
||||
int resolutionQuad;
|
||||
/// @brief Number of Steps for full revolution
|
||||
int steps{std::lround(360.0F / step)};
|
||||
};
|
||||
Reference in New Issue
Block a user