MCPcopy Create free account
hub / github.com/Duet3D/RepRapFirmware / EstimateTimeToPause

Method EstimateTimeToPause

src/PrintMonitor/PrintMonitor.cpp:471–483  ·  view source on GitHub ↗

Return the estimated time until user interaction is required e.g. to change filament

Source from the content-addressed store, hash-verified

469
470// Return the estimated time until user interaction is required e.g. to change filament
471ExpressionValue PrintMonitor::EstimateTimeToPause() const noexcept
472{
473 ExpressionValue ret(nullptr);
474 if (isPrinting && !gCodes.IsSimulating() && slicerTimeToPause > 0.0)
475 {
476 const float timeToPause = slicerTimeToPause - (millis64() - whenSlicerTimeToPauseSet) * MillisToSeconds;
477 if (timeToPause > 0.0)
478 {
479 ret.SetInt(lrintf(timeToPause));
480 }
481 }
482 return ret;
483}
484
485#endif
486

Callers 1

PrintMonitor.cppFile · 0.80

Calls 1

SetIntMethod · 0.80

Tested by

no test coverage detected