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/Platform/Platform.h')
-rw-r--r--src/Platform/Platform.h15
1 files changed, 13 insertions, 2 deletions
diff --git a/src/Platform/Platform.h b/src/Platform/Platform.h
index a1f816da..201e10f2 100644
--- a/src/Platform/Platform.h
+++ b/src/Platform/Platform.h
@@ -303,6 +303,17 @@ struct AxisDriversConfig
DriverId driverNumbers[MaxDriversPerAxis]; // The driver numbers assigned - only the first numDrivers are meaningful
};
+#if SUPPORT_NONLINEAR_EXTRUSION
+
+struct NonlinearExtrusion
+{
+ float A;
+ float B;
+ float limit;
+};
+
+#endif
+
// The main class that defines the RepRap machine for the benefit of the other classes
class Platform INHERIT_OBJECT_MODEL
{
@@ -511,7 +522,7 @@ public:
void EnableAllSteppingDrivers() noexcept { steppingEnabledDriversBitmap = 0xFFFFFFFFu; }
#if SUPPORT_NONLINEAR_EXTRUSION
- bool GetExtrusionCoefficients(size_t extruder, float& a, float& b, float& limit) const noexcept;
+ const NonlinearExtrusion& GetExtrusionCoefficients(size_t extruder) const noexcept pre(extruder < MaxExtruders) { return nonlinearExtrusion[extruder]; }
void SetNonlinearExtrusion(size_t extruder, float a, float b, float limit) noexcept;
#endif
@@ -737,7 +748,7 @@ private:
#endif
#if SUPPORT_NONLINEAR_EXTRUSION
- float nonlinearExtrusionA[MaxExtruders], nonlinearExtrusionB[MaxExtruders], nonlinearExtrusionLimit[MaxExtruders];
+ NonlinearExtrusion nonlinearExtrusion[MaxExtruders]; // nonlinear extrusion coefficients
#endif
DriverId extruderDrivers[MaxExtruders]; // the driver number assigned to each extruder