| 324 | } |
| 325 | |
| 326 | void GCodeMachineState::SetState(GCodeState newState) noexcept |
| 327 | { |
| 328 | if (state == GCodeState::normal && newState != GCodeState::normal) |
| 329 | { |
| 330 | stateMachineResult = GCodeResult::ok; |
| 331 | errorMessage = GCodeException(); |
| 332 | } |
| 333 | state = newState; |
| 334 | } |
| 335 | |
| 336 | // Get the number of iterations of the closest enclosing loop in the current file, or -1 if there is on enclosing loop |
| 337 | int32_t GCodeMachineState::GetIterations() const noexcept |
no test coverage detected