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:
authorDavid Crocker <dcrocker@eschertech.com>2021-10-21 22:48:47 +0300
committerDavid Crocker <dcrocker@eschertech.com>2021-10-21 22:48:47 +0300
commit894ac1aff66bbb834239b3d0dadb3f6bc67e641f (patch)
tree1ff9b032b8db8385b7b8ea93faa3d9a4cfb42248 /src/Movement
parent111fae6e2184e5f8fde1b3487e8f50478c51541e (diff)
Completed implementing filament monitors in expansion mode
Diffstat (limited to 'src/Movement')
-rw-r--r--src/Movement/Move.cpp10
-rw-r--r--src/Movement/Move.h2
2 files changed, 3 insertions, 9 deletions
diff --git a/src/Movement/Move.cpp b/src/Movement/Move.cpp
index 7ec39faa..e5645c72 100644
--- a/src/Movement/Move.cpp
+++ b/src/Movement/Move.cpp
@@ -896,15 +896,9 @@ void Move::GetCurrentUserPosition(float m[MaxAxes], uint8_t moveType, const Tool
// Get the accumulated extruder motor steps taken by an extruder since the last call. Used by the filament monitoring code.
// Returns the number of motor steps moves since the last call, and sets isPrinting true unless we are currently executing an extruding but non-printing move
-int32_t Move::GetAccumulatedExtrusion(size_t extruder, bool& isPrinting) noexcept
+int32_t Move::GetAccumulatedExtrusion(size_t drive, bool& isPrinting) noexcept
{
- if (extruder < reprap.GetGCodes().GetNumExtruders())
- {
- return mainDDARing.GetAccumulatedMovement(ExtruderToLogicalDrive(extruder), isPrinting);
- }
-
- isPrinting = false;
- return 0;
+ return mainDDARing.GetAccumulatedMovement(drive, isPrinting);
}
void Move::SetXYBedProbePoint(size_t index, float x, float y) noexcept
diff --git a/src/Movement/Move.h b/src/Movement/Move.h
index f941cc40..ce67c023 100644
--- a/src/Movement/Move.h
+++ b/src/Movement/Move.h
@@ -166,7 +166,7 @@ public:
void AdjustLeadscrews(const floatc_t corrections[]) noexcept; // Called by some Kinematics classes to adjust the leadscrews
- int32_t GetAccumulatedExtrusion(size_t extruder, bool& isPrinting) noexcept; // Return and reset the accumulated commanded extrusion amount
+ int32_t GetAccumulatedExtrusion(size_t drive, bool& isPrinting) noexcept; // Return and reset the accumulated commanded extrusion amount
#if HAS_MASS_STORAGE || HAS_LINUX_INTERFACE
bool WriteResumeSettings(FileStore *f) const noexcept; // Write settings for resuming the print