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

Method DoDwellTime

src/GCodes/GCodeBuffer/GCodeBuffer.cpp:173–191  ·  view source on GitHub ↗

Delay executing this GCodeBuffer for the specified time. Return true when the timer has expired.

Source from the content-addressed store, hash-verified

171
172// Delay executing this GCodeBuffer for the specified time. Return true when the timer has expired.
173bool GCodeBuffer::DoDwellTime(uint32_t dwellMillis) noexcept
174{
175 const uint32_t now = millis();
176
177 // Are we already in the dwell?
178 if (timerRunning)
179 {
180 if (now - whenTimerStarted >= dwellMillis)
181 {
182 timerRunning = false;
183 return true;
184 }
185 return false;
186 }
187
188 // New dwell - set it up
189 StartTimer();
190 return false;
191}
192
193// Return true if we should send an unsolicited status report
194bool GCodeBuffer::IsReportDue() noexcept

Callers 6

StartNextGCodeMethod · 0.80
THROWSFunction · 0.80
THROWSFunction · 0.80
GCodes2.cppFile · 0.80
Platform.cppFile · 0.80
CanInterface.cppFile · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected