Delay executing this GCodeBuffer for the specified time. Return true when the timer has expired.
| 171 | |
| 172 | // Delay executing this GCodeBuffer for the specified time. Return true when the timer has expired. |
| 173 | bool 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 |
| 194 | bool GCodeBuffer::IsReportDue() noexcept |
no outgoing calls
no test coverage detected