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:
authorDavid Crocker <dcrocker@eschertech.com>2018-01-25 20:48:08 +0300
committerDavid Crocker <dcrocker@eschertech.com>2018-01-25 20:48:08 +0300
commit2ab93089452e64f845544ebef6fb535e80dca085 (patch)
tree6fa1f935e702011c3d58a1c56ec67748395bcfe5 /src
parentdb7a0f8e00d7a37883fffa002c2ee17c52eda2a7 (diff)
Version 1.21RC1
Added support for M260 and M261 Added support for workspacve coordinates (G10 L2, G53 to G59.3) Added absolute bebystepping mode in M290 command Support endstops 5-9 when no DueX board is present Show Duet board revision as 1.02+ when we can If no temperature sensor is configured for a heater. M305 Pn with no other parameters no longer allocates a thermistor Fixed "listen failed" error with repeated use of FTP Fixed M304 Fixed crash when an attempt was made to configure a filament monitor on a DueX endstop input Fixed jerky curves when pressure advance is used and the slicer doesn't command a uniform extrusion rate Fixed missing newline at end of "Done printing file" message
Diffstat (limited to 'src')
-rw-r--r--src/GCodes/GCodes.cpp2
-rw-r--r--src/Movement/DriveMovement.cpp13
-rw-r--r--src/Platform.h10
-rw-r--r--src/RepRapFirmware.h3
-rw-r--r--src/Version.h2
5 files changed, 16 insertions, 14 deletions
diff --git a/src/GCodes/GCodes.cpp b/src/GCodes/GCodes.cpp
index 06e758f1..521f95c9 100644
--- a/src/GCodes/GCodes.cpp
+++ b/src/GCodes/GCodes.cpp
@@ -4005,7 +4005,7 @@ void GCodes::StopPrint(bool normalCompletion)
if (platform.Emulating() == marlin)
{
// Pronterface expects a "Done printing" message
- platform.Message(UsbMessage, "Done printing file");
+ platform.Message(UsbMessage, "Done printing file\n");
}
const uint32_t printMinutes = lrintf(reprap.GetPrintMonitor().GetPrintDuration()/60.0);
platform.MessageF(LoggedGenericMessage, "%s printing file %s, print time was %" PRIu32 "h %" PRIu32 "m\n",
diff --git a/src/Movement/DriveMovement.cpp b/src/Movement/DriveMovement.cpp
index 53ddcc92..6dba1005 100644
--- a/src/Movement/DriveMovement.cpp
+++ b/src/Movement/DriveMovement.cpp
@@ -184,7 +184,6 @@ void DriveMovement::PrepareExtruder(const DDA& dda, const PrepParams& params, fl
const float averageExtrusionSpeed = (dda.totalDistance * dv * DDA::stepClockRate)/dda.clocksNeeded;
const float factor = 1.0 + min<float>((averageExtrusionSpeed * a) + (averageExtrusionSpeed * averageExtrusionSpeed * b), limit);
stepsPerMm *= factor;
- totalSteps = (uint32_t)(totalSteps * factor); // round this down to avoid step errors
}
}
#endif
@@ -200,15 +199,15 @@ void DriveMovement::PrepareExtruder(const DDA& dda, const PrepParams& params, fl
mp.cart.compensationClocks = roundU32(compensationTime * (float)DDA::stepClockRate);
mp.cart.accelCompensationClocks = roundU32(compensationTime * (float)DDA::stepClockRate * params.compFactor);
+#ifdef COMPENSATE_SPEED_CHANGES
// If there is a speed change at the start of the move, theoretically we should instantly advance or retard the filament by the associated compensation amount.
// We can't do that, so increase or decrease the extrusion factor instead, so that at least the extrusion will be correct by the end of the move.
const float factor = 1.0 + (speedChange * compensationTime)/dda.totalDistance;
stepsPerMm *= factor;
- totalSteps = (uint32_t)(totalSteps * factor); // round this down to avoid step errors
-
- // Calculate the net total step count to allow for compensation. It may be negative.
+#endif
+ // Recalculate the net total step count to allow for compensation. It may be negative.
const float compensationDistance = (dda.endSpeed - dda.startSpeed) * compensationTime;
- netSteps = (int32_t)(compensationDistance * stepsPerMm) + (int32_t)totalSteps;
+ netSteps = (int32_t)((dda.totalDistance + compensationDistance) * stepsPerMm);
// Calculate the acceleration phase parameters
accelCompensationDistance = compensationTime * (dda.topSpeed - dda.startSpeed);
@@ -218,7 +217,7 @@ void DriveMovement::PrepareExtruder(const DDA& dda, const PrepParams& params, fl
{
accelCompensationDistance = compensationTime = 0.0;
mp.cart.compensationClocks = mp.cart.accelCompensationClocks = 0;
- netSteps = (int32_t)totalSteps;
+ netSteps = (int32_t)(dda.totalDistance * stepsPerMm); // it may have changed from totalSteps if we are using nonlinear extrusion
// Calculate the acceleration phase parameters
mp.cart.accelStopStep = (uint32_t)(dda.accelDistance * stepsPerMm) + 1;
@@ -229,7 +228,7 @@ void DriveMovement::PrepareExtruder(const DDA& dda, const PrepParams& params, fl
// Constant speed phase parameters
mp.cart.mmPerStepTimesCKdivtopSpeed = (uint32_t)((float)((uint64_t)DDA::stepClockRate * K1)/(stepsPerMm * dda.topSpeed));
- // Calculate the deceleration and reverse phase parameters
+ // Calculate the deceleration and reverse phase parameters and update totalSteps
// First check whether there is any deceleration at all, otherwise we may get strange results because of rounding errors
if (dda.decelDistance * stepsPerMm < 0.5) // if less than 1 deceleration step
{
diff --git a/src/Platform.h b/src/Platform.h
index 29c96548..ef29b657 100644
--- a/src/Platform.h
+++ b/src/Platform.h
@@ -1199,11 +1199,13 @@ inline OutputBuffer *Platform::GetAuxGCodeReply()
}
// *** These next three functions must use the same bit assignments in the drivers bitmap ***
-// The bitmaps are organised like this:
+// Each stepper driver must be assigned one bit in a 32-bit word, in such a way that multiple drivers can be stepped efficiently
+// and more or less simultaneously by doing parallel writes to several bits in one or more output ports.
+// The bitmaps for various controller electronics are organised like this:
// Duet WiFi:
-// All step pins are on port D, so the bitmap is just the map of bits in port D.
+// All step pins are on port D, so the bitmap is just the map of step bits in port D.
// Duet M:
-// All step pins are on port C, so the bitmap is just the map of bits in port C.
+// All step pins are on port C, so the bitmap is just the map of step bits in port C.
// Duet 0.6 and 0.8.5:
// Step pins are PA0, PC7,9,11,14,25,29 and PD0,3.
// The PC and PD bit numbers don't overlap, so we use their actual positions.
@@ -1237,7 +1239,7 @@ inline OutputBuffer *Platform::GetAuxGCodeReply()
#endif
}
-// Set the specified step pins high and all other step pins low
+// Set the specified step pins high
// This needs to be as fast as possible, so we do a parallel write to the port(s).
// We rely on only those port bits that are step pins being set in the PIO_OWSR register of each port
/*static*/ inline void Platform::StepDriversHigh(uint32_t driverMap)
diff --git a/src/RepRapFirmware.h b/src/RepRapFirmware.h
index 10e98ed3..8764ddcb 100644
--- a/src/RepRapFirmware.h
+++ b/src/RepRapFirmware.h
@@ -111,7 +111,8 @@ extern RepRap reprap;
// Debugging support
extern "C" void debugPrintf(const char* fmt, ...) __attribute__ ((format (printf, 1, 2)));
-#define DEBUG_HERE do { debugPrintf("At " __FILE__ " line %d\n", __LINE__); delay(50); } while (false)
+#define DEBUG_HERE do { } while (false)
+//#define DEBUG_HERE do { debugPrintf("At " __FILE__ " line %d\n", __LINE__); delay(50); } while (false)
// Functions and globals not part of any class
bool StringEndsWith(const char* string, const char* ending);
diff --git a/src/Version.h b/src/Version.h
index 64eacefe..f841a8b5 100644
--- a/src/Version.h
+++ b/src/Version.h
@@ -13,7 +13,7 @@
#endif
#ifndef DATE
-# define DATE "2018-01-22"
+# define DATE "2018-01-25"
#endif
#define AUTHORS "reprappro, dc42, chrishamm, t3p3, dnewman"