Both steppers work in simulated environment

This commit is contained in:
Hakan Bastedt
2024-01-18 18:21:21 +01:00
parent 9e311038c1
commit 8f05f33e58
2 changed files with 7 additions and 3 deletions

View File

@@ -5,7 +5,7 @@
class StepGen
{
public:
private:
volatile uint8_t timerIsRunning;
volatile int32_t timerStepPosition;
volatile int32_t timerStepDirection;
@@ -17,7 +17,6 @@ public:
volatile uint8_t enabled;
HardwareTimer *MyTim;
uint16_t stepsPerMM;
static uint32_t sync0CycleTime;
uint8_t dirPin;
PinName stepPin;
uint32_t timerChan;
@@ -25,6 +24,9 @@ public:
volatile uint32_t prevFreq1 = 0;
volatile uint32_t prevFreq2 = 0;
public:
static uint32_t sync0CycleTime;
StepGen(TIM_TypeDef *Timer, uint32_t timerChannel, PinName stepPin, uint8_t dirPin, void irq(void));
void reqPos(double_t pos);
double reqPos();