Removed unnecessary condition in timerCB, was aleady test on ´steps´
This commit is contained in:
@@ -96,8 +96,6 @@ void StepGen::timerCB()
|
|||||||
digitalWrite(dirPin, sgn);
|
digitalWrite(dirPin, sgn);
|
||||||
double_t freqf = abs(steps) * (1e6 / double(timerNewCycleTime));
|
double_t freqf = abs(steps) * (1e6 / double(timerNewCycleTime));
|
||||||
uint32_t freq = uint32_t(freqf);
|
uint32_t freq = uint32_t(freqf);
|
||||||
if (freq != 0)
|
|
||||||
{
|
|
||||||
timerStepDirection = steps > 0 ? 1 : -1;
|
timerStepDirection = steps > 0 ? 1 : -1;
|
||||||
timerStepPositionAtEnd = timerNewEndStepPosition;
|
timerStepPositionAtEnd = timerNewEndStepPosition;
|
||||||
timerNewEndStepPosition = 0; // Set to zero to not reload next time
|
timerNewEndStepPosition = 0; // Set to zero to not reload next time
|
||||||
@@ -109,7 +107,6 @@ void StepGen::timerCB()
|
|||||||
timerIsRunning = 1;
|
timerIsRunning = 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
if (timerStepPosition == timerStepPositionAtEnd) // Are we finished?
|
if (timerStepPosition == timerStepPositionAtEnd) // Are we finished?
|
||||||
{
|
{
|
||||||
timerIsRunning = 0;
|
timerIsRunning = 0;
|
||||||
|
|||||||
Reference in New Issue
Block a user