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/PrintMonitor.cpp')
-rw-r--r--src/PrintMonitor.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/PrintMonitor.cpp b/src/PrintMonitor.cpp
index b88b8917..3093a6df 100644
--- a/src/PrintMonitor.cpp
+++ b/src/PrintMonitor.cpp
@@ -144,7 +144,10 @@ void PrintMonitor::Spin()
LayerComplete();
currentLayer++;
- lastLayerZ = liveCoordinates[Z_AXIS];
+ // If we know the layer height, compute what the current layer height should be. This is to handle slicers that use a different layer height for support.
+ lastLayerZ = (printingFileInfo.layerHeight > 0.0)
+ ? printingFileInfo.firstLayerHeight + (currentLayer - 1) * printingFileInfo.layerHeight
+ : liveCoordinates[Z_AXIS];
lastLayerChangeTime = GetPrintDuration();
}
}