diff options
author | David Crocker <dcrocker@eschertech.com> | 2021-04-08 18:36:01 +0300 |
---|---|---|
committer | David Crocker <dcrocker@eschertech.com> | 2021-04-08 18:36:01 +0300 |
commit | 4db21dcb30231d43bfa90eda25a2356a21c23efb (patch) | |
tree | 91f83a71535a1e1bba1c82b01b5028e8fa821441 /src/PrintMonitor/PrintMonitor.cpp | |
parent | 5d1ca45a4ed8138422bc7c78680a931636fad754 (diff) |
Support Ideamaker PRINTING and REMAINING_TIME comment metadata
Diffstat (limited to 'src/PrintMonitor/PrintMonitor.cpp')
-rw-r--r-- | src/PrintMonitor/PrintMonitor.cpp | 9 |
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 |