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
path: root/src
diff options
context:
space:
mode:
authorTorbjørn Ludvigsen <tobben@fastmail.fm>2022-02-22 21:13:38 +0300
committerTorbjørn Ludvigsen <tobben@fastmail.fm>2022-02-22 21:13:38 +0300
commiteddc20d166d612b57d46044cacb024493078e259 (patch)
tree3575d33df6554e8f7022339f5c2311ea4036036b /src
parente584f0dba4fa7751a45b7dd67b417ac7cb41b8db (diff)
Fixes resurrect.g bug for Hangprinter
... The scratch string was too short, so we missed the tail of the M669 command.
Diffstat (limited to 'src')
-rw-r--r--src/Movement/Kinematics/HangprinterKinematics.cpp51
1 files changed, 29 insertions, 22 deletions
diff --git a/src/Movement/Kinematics/HangprinterKinematics.cpp b/src/Movement/Kinematics/HangprinterKinematics.cpp
index 71566e83..01fe5a75 100644
--- a/src/Movement/Kinematics/HangprinterKinematics.cpp
+++ b/src/Movement/Kinematics/HangprinterKinematics.cpp
@@ -447,33 +447,40 @@ bool HangprinterKinematics::WriteCalibrationParameters(FileStore *f) const noexc
if (ok)
{
String<100> scratchString;
- scratchString.printf("M669 K6 A%.3f:%.3f:%.3f B%.3f:%.3f:%.3f C%.3f:%.3f:%.3f D%.3f:%.3f:%.3f P%.1f\n",
+ scratchString.printf("M669 K6 A%.3f:%.3f:%.3f B%.3f:%.3f:%.3f",
(double)anchors[A_AXIS][X_AXIS], (double)anchors[A_AXIS][Y_AXIS], (double)anchors[A_AXIS][Z_AXIS],
- (double)anchors[B_AXIS][X_AXIS], (double)anchors[B_AXIS][Y_AXIS], (double)anchors[B_AXIS][Z_AXIS],
- (double)anchors[C_AXIS][X_AXIS], (double)anchors[C_AXIS][Y_AXIS], (double)anchors[C_AXIS][Z_AXIS],
- (double)anchors[D_AXIS][X_AXIS], (double)anchors[D_AXIS][Y_AXIS], (double)anchors[D_AXIS][Z_AXIS],
- (double)printRadius);
+ (double)anchors[B_AXIS][X_AXIS], (double)anchors[B_AXIS][Y_AXIS], (double)anchors[B_AXIS][Z_AXIS]);
ok = f->Write(scratchString.c_str());
- if (ok) {
- scratchString.printf("M666 Q%.6f R%.3f:%.3f:%.3f:%.3f U%d:%d:%d:%d ",
- (double)spoolBuildupFactor, (double)spoolRadii[A_AXIS],
- (double)spoolRadii[B_AXIS], (double)spoolRadii[C_AXIS], (double)spoolRadii[D_AXIS],
- (int)mechanicalAdvantage[A_AXIS], (int)mechanicalAdvantage[B_AXIS],
- (int)mechanicalAdvantage[C_AXIS], (int)mechanicalAdvantage[D_AXIS]
- );
+ if (ok)
+ {
+ scratchString.printf(" C%.3f:%.3f:%.3f D%.3f:%.3f:%.3f P%.1f\n",
+ (double)anchors[C_AXIS][X_AXIS], (double)anchors[C_AXIS][Y_AXIS], (double)anchors[C_AXIS][Z_AXIS],
+ (double)anchors[D_AXIS][X_AXIS], (double)anchors[D_AXIS][Y_AXIS], (double)anchors[D_AXIS][Z_AXIS],
+ (double)printRadius);
ok = f->Write(scratchString.c_str());
- if (ok) {
- scratchString.printf("O%d:%d:%d:%d L%d:%d:%d:%d H%d:%d:%d:%d J%d:%d:%d:%d\n",
- (int)linesPerSpool[A_AXIS], (int)linesPerSpool[B_AXIS],
- (int)linesPerSpool[C_AXIS], (int)linesPerSpool[D_AXIS],
- (int)motorGearTeeth[A_AXIS], (int)motorGearTeeth[B_AXIS],
- (int)motorGearTeeth[C_AXIS], (int)motorGearTeeth[D_AXIS],
- (int)spoolGearTeeth[A_AXIS], (int)spoolGearTeeth[B_AXIS],
- (int)spoolGearTeeth[C_AXIS], (int)spoolGearTeeth[D_AXIS],
- (int)fullStepsPerMotorRev[A_AXIS], (int)fullStepsPerMotorRev[B_AXIS],
- (int)fullStepsPerMotorRev[C_AXIS], (int)fullStepsPerMotorRev[D_AXIS]
+ if (ok)
+ {
+ scratchString.printf("M666 Q%.6f R%.3f:%.3f:%.3f:%.3f U%d:%d:%d:%d",
+ (double)spoolBuildupFactor, (double)spoolRadii[A_AXIS],
+ (double)spoolRadii[B_AXIS], (double)spoolRadii[C_AXIS], (double)spoolRadii[D_AXIS],
+ (int)mechanicalAdvantage[A_AXIS], (int)mechanicalAdvantage[B_AXIS],
+ (int)mechanicalAdvantage[C_AXIS], (int)mechanicalAdvantage[D_AXIS]
);
ok = f->Write(scratchString.c_str());
+ if (ok)
+ {
+ scratchString.printf(" O%d:%d:%d:%d L%d:%d:%d:%d H%d:%d:%d:%d J%d:%d:%d:%d\n",
+ (int)linesPerSpool[A_AXIS], (int)linesPerSpool[B_AXIS],
+ (int)linesPerSpool[C_AXIS], (int)linesPerSpool[D_AXIS],
+ (int)motorGearTeeth[A_AXIS], (int)motorGearTeeth[B_AXIS],
+ (int)motorGearTeeth[C_AXIS], (int)motorGearTeeth[D_AXIS],
+ (int)spoolGearTeeth[A_AXIS], (int)spoolGearTeeth[B_AXIS],
+ (int)spoolGearTeeth[C_AXIS], (int)spoolGearTeeth[D_AXIS],
+ (int)fullStepsPerMotorRev[A_AXIS], (int)fullStepsPerMotorRev[B_AXIS],
+ (int)fullStepsPerMotorRev[C_AXIS], (int)fullStepsPerMotorRev[D_AXIS]
+ );
+ ok = f->Write(scratchString.c_str());
+ }
}
}
}