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>2021-04-08 18:36:01 +0300
committerDavid Crocker <dcrocker@eschertech.com>2021-04-08 18:36:01 +0300
commit4db21dcb30231d43bfa90eda25a2356a21c23efb (patch)
tree91f83a71535a1e1bba1c82b01b5028e8fa821441 /src/PrintMonitor/PrintMonitor.cpp
parent5d1ca45a4ed8138422bc7c78680a931636fad754 (diff)
Support Ideamaker PRINTING and REMAINING_TIME comment metadata
Diffstat (limited to 'src/PrintMonitor/PrintMonitor.cpp')
-rw-r--r--src/PrintMonitor/PrintMonitor.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/PrintMonitor/PrintMonitor.cpp b/src/PrintMonitor/PrintMonitor.cpp
index 7139b0c9..e6dcace1 100644
--- a/src/PrintMonitor/PrintMonitor.cpp
+++ b/src/PrintMonitor/PrintMonitor.cpp
@@ -166,13 +166,18 @@ GCodeResult PrintMonitor::ProcessM73(GCodeBuffer& gb, const StringRef& reply) TH
{
if (gb.Seen('R'))
{
- slicerTimeLeft = gb.GetFValue() * MinutesToSeconds;
- whenSlicerTimeLeftSet = millis64();
+ SetSlicerTimeLeft(gb.GetFValue() * MinutesToSeconds);
}
// M73 without P Q R or S parameters reports print progress in some implementations, but we don't currently do that
return GCodeResult::ok;
}
+void PrintMonitor::SetSlicerTimeLeft(float seconds) noexcept
+{
+ slicerTimeLeft = seconds;
+ whenSlicerTimeLeftSet = millis64();
+}
+
void PrintMonitor::Spin() noexcept
{
#if HAS_LINUX_INTERFACE