Tell this input source that any message it sent and is waiting on has been acknowledged Allow for the possibility that the source may have started running a macro since it started waiting
| 1237 | // Tell this input source that any message it sent and is waiting on has been acknowledged |
| 1238 | // Allow for the possibility that the source may have started running a macro since it started waiting |
| 1239 | void GCodeBuffer::MessageAcknowledged(bool cancelled, bool shouldAbort, uint32_t seq, ExpressionValue rslt) noexcept |
| 1240 | { |
| 1241 | for (GCodeMachineState *_ecv_null ms = machineState; ms != nullptr; ms = ms->GetPrevious()) |
| 1242 | { |
| 1243 | if (ms->waitingForAcknowledgement && (seq == ms->msgBoxSeq || seq == 0 || ms->msgBoxSeq == 0)) |
| 1244 | { |
| 1245 | ms->waitingForAcknowledgement = false; |
| 1246 | ms->messageAcknowledged = true; |
| 1247 | ms->messageShouldAbort = cancelled && shouldAbort; |
| 1248 | m291Result = rslt; |
| 1249 | if (cancelled) |
| 1250 | { |
| 1251 | lastResult = GCodeResult::m291Cancelled; |
| 1252 | } |
| 1253 | #if HAS_SBC_INTERFACE |
| 1254 | messageAcknowledged = !(cancelled && shouldAbort) || !ms->DoingFile(); |
| 1255 | reprap.GetSbcInterface().EventOccurred(); |
| 1256 | #endif |
| 1257 | } |
| 1258 | } |
| 1259 | } |
| 1260 | |
| 1261 | MessageType GCodeBuffer::GetResponseMessageType() const noexcept |
| 1262 | { |
no test coverage detected