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>2017-08-07 19:00:10 +0300
committerDavid Crocker <dcrocker@eschertech.com>2017-08-07 19:00:10 +0300
commit96d5c22fe3767e932f2644df999f0a4f96ec91f5 (patch)
tree6abaf3c245e9e21a6ec863f15cf16f98a21591c4 /src/Movement
parentc111e1147ea301e35d76bd6a9f523042f129f75a (diff)
Version 1.19RC5
Simplified the tracking of virtual extruder position Fixed issue with volumetric extrusion Fixes issues with resurrection when using absolute or volumetric extrusion Corrected date stamp on resurrect.g file Bed levelling wizard now displays required levelling screw adjustments
Diffstat (limited to 'src/Movement')
-rw-r--r--src/Movement/DDA.cpp2
-rw-r--r--src/Movement/Kinematics/ZLeadscrewKinematics.cpp27
-rw-r--r--src/Movement/Kinematics/ZLeadscrewKinematics.h1
3 files changed, 21 insertions, 9 deletions
diff --git a/src/Movement/DDA.cpp b/src/Movement/DDA.cpp
index 520c77f9..41473546 100644
--- a/src/Movement/DDA.cpp
+++ b/src/Movement/DDA.cpp
@@ -1536,6 +1536,8 @@ bool DDA::Step()
if (state == completed)
{
+ // The following finish time is wrong if we aborted the move because of endstop or Z probe checks.
+ // However, following a move that checks endstops or the Z probe, we always wait fot the move to complete before we schedule another, so this doesn't matter.
const uint32_t finishTime = moveStartTime + clocksNeeded; // calculate how long this move should take
Move& move = reprap.GetMove();
move.CurrentMoveCompleted(); // tell Move that the current move is complete
diff --git a/src/Movement/Kinematics/ZLeadscrewKinematics.cpp b/src/Movement/Kinematics/ZLeadscrewKinematics.cpp
index 87c73415..95fa11bd 100644
--- a/src/Movement/Kinematics/ZLeadscrewKinematics.cpp
+++ b/src/Movement/Kinematics/ZLeadscrewKinematics.cpp
@@ -10,7 +10,9 @@
#include "Platform.h"
#include "Movement/Move.h"
-ZLeadscrewKinematics::ZLeadscrewKinematics(KinematicsType k) : Kinematics(k), numLeadscrews(0), maxCorrection(1.0)
+const float M3ScrewPitch = 0.5;
+
+ZLeadscrewKinematics::ZLeadscrewKinematics(KinematicsType k) : Kinematics(k), numLeadscrews(0), maxCorrection(1.0), screwPitch(M3ScrewPitch)
{
}
@@ -37,6 +39,9 @@ bool ZLeadscrewKinematics::Configure(unsigned int mCode, GCodeBuffer& gb, String
bool seenS = false;
gb.TryGetFValue('S', maxCorrection, seenS);
+ bool seenP = false;
+ gb.TryGetFValue('P', screwPitch, seenP);
+
if (seenX && seenY && xSize == ySize && xSize > 1)
{
numLeadscrews = xSize;
@@ -50,9 +55,9 @@ bool ZLeadscrewKinematics::Configure(unsigned int mCode, GCodeBuffer& gb, String
}
// If no parameters provided so just report the existing setup
- if (seenS)
+ if (seenS || seenP)
{
- return true; // just changed the maximum correction
+ return true; // just changed the maximum correction or screw pitch
}
else if (numLeadscrews < 2)
{
@@ -65,7 +70,7 @@ bool ZLeadscrewKinematics::Configure(unsigned int mCode, GCodeBuffer& gb, String
{
reply.catf(" (%.1f,%.1f)", leadscrewX[i], leadscrewY[i]);
}
- reply.catf(", maximum correction %.02fmm", maxCorrection);
+ reply.catf(", maximum correction %.02fmm, manual adjusting screw pitch %.02fmm", maxCorrection, screwPitch);
}
return false;
}
@@ -272,15 +277,19 @@ void ZLeadscrewKinematics::DoAutoCalibration(size_t numFactors, const RandomProb
{
reprap.GetMove().AdjustLeadscrews(solution);
reply.printf("Leadscrew adjustments made:");
+ AppendCorrections(solution, reply);
+ reply.catf(", points used %d, deviation before %.3f after %.3f",
+ numPoints, sqrt(initialSumOfSquares/numPoints), sqrtf(sumOfSquares/numPoints));
}
else
{
// User wants manual corrections for bed levelling screws
- reply.printf("Corrections required:");
+ reply.printf("Manual corrections required:");
+ for (size_t i = 0; i < numLeadscrews; ++i)
+ {
+ reply.catf(" %.2f turn %s (%.2fmm)", fabs(solution[i])/screwPitch, (solution[i] > 0) ? "down" : "up", solution[i]);
+ }
}
- AppendCorrections(solution, reply);
- reply.catf(", points used %d, deviation before %.3f after %.3f",
- numPoints, sqrt(initialSumOfSquares/numPoints), sqrtf(sumOfSquares/numPoints));
}
}
@@ -298,7 +307,7 @@ void ZLeadscrewKinematics::AppendCorrections(const floatc_t corrections[], Strin
// Write any calibration data that we need to resume a print after power fail, returning true if successful
bool ZLeadscrewKinematics::WriteResumeSettings(FileStore *f) const
{
- //TODO write leadscrew corrections, there is a chance that they will be the same as before
+ //TODO we could write leadscrew corrections here, but they may not be the same as before
return true;
}
diff --git a/src/Movement/Kinematics/ZLeadscrewKinematics.h b/src/Movement/Kinematics/ZLeadscrewKinematics.h
index 57b1ed14..b7a00596 100644
--- a/src/Movement/Kinematics/ZLeadscrewKinematics.h
+++ b/src/Movement/Kinematics/ZLeadscrewKinematics.h
@@ -30,6 +30,7 @@ private:
unsigned int numLeadscrews;
float leadscrewX[MaxLeadscrews], leadscrewY[MaxLeadscrews];
float maxCorrection;
+ float screwPitch;
};
#endif /* SRC_MOVEMENT_KINEMATICS_ZLEADSCREWKINEMATICS_H_ */