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/ExtruderShaper.h')
-rw-r--r--src/Movement/ExtruderShaper.h9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/Movement/ExtruderShaper.h b/src/Movement/ExtruderShaper.h
index 75594e9a..8bd68a1a 100644
--- a/src/Movement/ExtruderShaper.h
+++ b/src/Movement/ExtruderShaper.h
@@ -8,6 +8,8 @@
#ifndef SRC_MOVEMENT_EXTRUDERSHAPER_H_
#define SRC_MOVEMENT_EXTRUDERSHAPER_H_
+#include <RepRapFirmware.h>
+
class DDA;
class BasicPrepParams;
class MoveSegment;
@@ -21,13 +23,14 @@ public:
ExtruderShaper() : k(0.0), extrusionPending(0.0) /*, lastSpeed(0.0)*/ { }
// Temporary functions until we support more sophisticated pressure advance
- float GetK() const noexcept { return k; }
- void SetK(float val) noexcept { k = val; }
+ float GetKclocks() const noexcept { return k; } // get pressure advance in step clocks
+ float GetKseconds() const noexcept { return k * StepClockRate; }
+ void SetKseconds(float val) noexcept { k = val * (1.0/StepClockRate); } // set pressure advance in seconds
float GetExtrusionPending() const noexcept { return extrusionPending; }
void SetExtrusionPending(float ep) noexcept { extrusionPending = ep; }
private:
- float k; // the pressure advance constant in seconds
+ float k; // the pressure advance constant in step clocks
float extrusionPending; // extrusion we have been asked to do but haven't because it is less than one microstep, in mm
// float lastSpeed; // the speed we were moving at at the end of the last extrusion, needed to implement pressure advance
};