motor control changed to infinit pipeline with continuous buffer

This commit is contained in:
2024-12-22 17:01:06 +01:00
parent eb0eb436ed
commit dd9f59e418
8 changed files with 593 additions and 593 deletions
@@ -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)};
};