Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/Duet3D/RepRapFirmware.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'src/Movement/DriveMovement.h')
-rw-r--r--src/Movement/DriveMovement.h12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/Movement/DriveMovement.h b/src/Movement/DriveMovement.h
index 5e4084ba..0315e808 100644
--- a/src/Movement/DriveMovement.h
+++ b/src/Movement/DriveMovement.h
@@ -85,14 +85,16 @@ private:
uint8_t direction : 1, // true=forwards, false=backwards
directionChanged : 1, // set by CalcNextStepTime if the direction is changed
isDelta : 1, // true if this DM uses segment-free delta kinematics
- isExtruder : 1; // true if this DM is for an extruder (only matters if !isDelta)
+ isExtruder : 1, // true if this DM is for an extruder (only matters if !isDelta)
+ : 2, // padding to make the next field last
+ stepsTakenThisSegment : 2; // how many steps we have taken this phase, counts from 0 to 2. Last field in the byte so that we can increment it efficiently.
uint8_t stepsTillRecalc; // how soon we need to recalculate
uint32_t totalSteps; // total number of steps for this move
// These values change as the step is executed, except for reverseStartStep
uint32_t nextStep; // number of steps already done
- uint32_t phaseStepLimit; // the first step number of the next phase, or the reverse start step if smaller
+ uint32_t segmentStepLimit; // the first step number of the next phase, or the reverse start step if smaller
uint32_t reverseStartStep; // the step number for which we need to reverse direction due to pressure advance or delta movement
uint32_t nextStepTime; // how many clocks after the start of this move the next step is due
uint32_t stepInterval; // how many clocks between steps
@@ -237,9 +239,9 @@ inline void DriveMovement::Release(DriveMovement *item) noexcept
// Get the current full step interval for this axis or extruder
inline uint32_t DriveMovement::GetStepInterval(uint32_t microstepShift) const noexcept
{
- return (nextStep < totalSteps && nextStep > (1u << microstepShift)) // if at least 1 full step done
- ? stepInterval << microstepShift // return the interval between steps converted to full steps
- : 0;
+ return (nextStep < totalSteps && nextStep > (1u << microstepShift)) // if at least 1 full step done
+ ? stepInterval << microstepShift // return the interval between steps converted to full steps
+ : 0;
}
#endif