|
263 | 263 |
|
264 | 264 | PGMSTR(M112_KILL_STR, "M112 Shutdown");
|
265 | 265 |
|
266 |
| -MarlinState marlin_state = MF_INITIALIZING; |
| 266 | +MarlinState marlin_state = MarlinState::MF_INITIALIZING; |
267 | 267 |
|
268 | 268 | // For M109 and M190, this flag may be cleared (by M108) to exit the wait loop
|
269 | 269 | bool wait_for_heatup = false;
|
@@ -377,8 +377,8 @@ void startOrResumeJob() {
|
377 | 377 | }
|
378 | 378 |
|
379 | 379 | inline void finishSDPrinting() {
|
380 |
| - if (queue.enqueue_one(F("M1001"))) { // Keep trying until it gets queued |
381 |
| - marlin_state = MF_RUNNING; // Signal to stop trying |
| 380 | + if (queue.enqueue_one(F("M1001"))) { // Keep trying until it gets queued |
| 381 | + marlin_state = MarlinState::MF_RUNNING; // Signal to stop trying |
382 | 382 | TERN_(PASSWORD_AFTER_SD_PRINT_END, password.lock_machine());
|
383 | 383 | TERN_(DGUS_LCD_UI_MKS, screen.sdPrintingFinished());
|
384 | 384 | }
|
@@ -773,7 +773,7 @@ void idle(const bool no_stepper_sleep/*=false*/) {
|
773 | 773 | TERN_(MAX7219_DEBUG, max7219.idle_tasks());
|
774 | 774 |
|
775 | 775 | // Return if setup() isn't completed
|
776 |
| - if (marlin_state == MF_INITIALIZING) goto IDLE_DONE; |
| 776 | + if (marlin_state == MarlinState::MF_INITIALIZING) goto IDLE_DONE; |
777 | 777 |
|
778 | 778 | // TODO: Still causing errors
|
779 | 779 | TERN_(TOOL_SENSOR, (void)check_tool_sensor_stats(active_extruder, true));
|
@@ -959,7 +959,7 @@ void stop() {
|
959 | 959 | SERIAL_ERROR_MSG(STR_ERR_STOPPED);
|
960 | 960 | LCD_MESSAGE(MSG_STOPPED);
|
961 | 961 | safe_delay(350); // allow enough time for messages to get out before stopping
|
962 |
| - marlin_state = MF_STOPPED; |
| 962 | + marlin_state = MarlinState::MF_STOPPED; |
963 | 963 | }
|
964 | 964 | }
|
965 | 965 |
|
@@ -1646,7 +1646,7 @@ void setup() {
|
1646 | 1646 | SETUP_RUN(ftMotion.init());
|
1647 | 1647 | #endif
|
1648 | 1648 |
|
1649 |
| - marlin_state = MF_RUNNING; |
| 1649 | + marlin_state = MarlinState::MF_RUNNING; |
1650 | 1650 |
|
1651 | 1651 | #ifdef STARTUP_TUNE
|
1652 | 1652 | // Play a short startup tune before continuing.
|
@@ -1678,7 +1678,7 @@ void loop() {
|
1678 | 1678 |
|
1679 | 1679 | #if HAS_MEDIA
|
1680 | 1680 | if (card.flag.abort_sd_printing) abortSDPrinting();
|
1681 |
| - if (marlin_state == MF_SD_COMPLETE) finishSDPrinting(); |
| 1681 | + if (marlin_state == MarlinState::MF_SD_COMPLETE) finishSDPrinting(); |
1682 | 1682 | #endif
|
1683 | 1683 |
|
1684 | 1684 | queue.advance();
|
|
0 commit comments