/**
* Internal command complete has extra handling for skipped command case.
*/
private void commandComplete(GcodeCommand command) throws Exception {
GcodeCommand c = command;
// If the command wasn't sent, it was skipped and should be ignored
// from the remaining queues.
if (!command.isSkipped()) {
if (this.awaitingResponseQueue.size() == 0) {
throw new Exception("Attempting to complete a command that "
+ "doesn't exist: <" + command.toString() + ">");
}
c = this.awaitingResponseQueue.remove();
c.setResponse(command.getResponse());
this.completedCommandList.add(c);
if (this.isStreamingFile()) {
// Peek to see if the currently processing command has a comment.
GcodeCommand next = this.awaitingResponseQueue.peek();
if (next != null && next.hasComment()) {
dispatchCommandCommment(next.getComment());
}
this.numCommandsCompleted++;
}
} else {
if (this.isStreamingFile()) {