diff options
author | David Crocker <dcrocker@eschertech.com> | 2021-06-13 01:21:27 +0300 |
---|---|---|
committer | David Crocker <dcrocker@eschertech.com> | 2021-06-13 01:21:27 +0300 |
commit | a7fde45b618c76c03516696d670dd665282873da (patch) | |
tree | 250ec090839017aeac12e7cefa9d1f19dea35835 /src/PrintMonitor | |
parent | 92b7d130d974b6b62780e68d32717a7c6567db6e (diff) |
Various
Support layer counting in GCode files generated by SuperSlicer
When reporting a bad command, display any non-printing characters in hex
Support measuring fan RPMs down to 160 instead of down to 320
After turning a remote heater on, if it was previously off then set its
status to 'heating' pending receiving updated status for it, to make
sure that M116 waits for it
Diffstat (limited to 'src/PrintMonitor')
-rw-r--r-- | src/PrintMonitor/PrintMonitor.cpp | 8 | ||||
-rw-r--r-- | src/PrintMonitor/PrintMonitor.h | 1 |
2 files changed, 9 insertions, 0 deletions
diff --git a/src/PrintMonitor/PrintMonitor.cpp b/src/PrintMonitor/PrintMonitor.cpp index 64661cb9..4cf8f2ed 100644 --- a/src/PrintMonitor/PrintMonitor.cpp +++ b/src/PrintMonitor/PrintMonitor.cpp @@ -346,6 +346,14 @@ void PrintMonitor::SetLayerZ(float layerZ) noexcept // Currently we don't use the layerZ value } +// Report that a new layer has started +void PrintMonitor::LayerChange() noexcept +{ + ++currentLayer; + lastLayerChangeTime = millis64(); + lastLayerChangeNonPrintingTime = GetWarmUpDuration() + GetPauseDuration(); +} + float PrintMonitor::FractionOfFilePrinted() const noexcept { ReadLocker locker(printMonitorLock); diff --git a/src/PrintMonitor/PrintMonitor.h b/src/PrintMonitor/PrintMonitor.h index 16ae6b62..5ff5406f 100644 --- a/src/PrintMonitor/PrintMonitor.h +++ b/src/PrintMonitor/PrintMonitor.h @@ -44,6 +44,7 @@ public: void StoppedPrint() noexcept; // Called whenever a file print has stopped void SetLayerNumber(uint32_t layerNumber) noexcept; // Set the current layer number void SetLayerZ(float layerZ) noexcept; // Set the printing height of the new layer + void LayerChange() noexcept; // Report that a new layer has started float FractionOfFilePrinted() const noexcept; // Return the fraction printed (0..1) // Return an estimate in seconds based on a specific estimation method |