Browse Source

Merge pull request #5094 from esenapaj/Fix-for-the-PR-#5088

Fix for the PR #5088 (Handle M108 in M1 also with ULTIPANEL)
Scott Lahteine 8 years ago
parent
commit
c4c53856a4
2 changed files with 9 additions and 7 deletions
  1. 1
    1
      Marlin/Marlin.h
  2. 8
    6
      Marlin/Marlin_main.cpp

+ 1
- 1
Marlin/Marlin.h View File

@@ -270,7 +270,7 @@ extern bool axis_known_position[XYZ]; // axis[n].is_known
270 270
 extern bool axis_homed[XYZ]; // axis[n].is_homed
271 271
 extern volatile bool wait_for_heatup;
272 272
 
273
-#if ENABLED(EMERGENCY_PARSER) && DISABLED(ULTIPANEL)
273
+#if ENABLED(ULTIPANEL) || ENABLED(EMERGENCY_PARSER)
274 274
   extern volatile bool wait_for_user;
275 275
 #endif
276 276
 

+ 8
- 6
Marlin/Marlin_main.cpp View File

@@ -409,7 +409,7 @@ static bool relative_mode = false;
409 409
 volatile bool wait_for_heatup = true;
410 410
 
411 411
 // For M0/M1, this flag may be cleared (by M108) to exit the wait-for-user loop
412
-#if ENABLED(EMERGENCY_PARSER) && DISABLED(ULTIPANEL)
412
+#if ENABLED(EMERGENCY_PARSER) || ENABLED(ULTIPANEL)
413 413
   volatile bool wait_for_user = false;
414 414
 #endif
415 415
 
@@ -4390,7 +4390,7 @@ inline void gcode_G92() {
4390 4390
   report_current_position();
4391 4391
 }
4392 4392
 
4393
-#if ENABLED(ULTIPANEL) || ENABLED(EMERGENCY_PARSER)
4393
+#if ENABLED(EMERGENCY_PARSER) || ENABLED(ULTIPANEL)
4394 4394
 
4395 4395
   /**
4396 4396
    * M0: Unconditional stop - Wait for user button press on LCD
@@ -4470,7 +4470,9 @@ inline void gcode_G92() {
4470 4470
 
4471 4471
     #endif
4472 4472
 
4473
-ExitM1:
4473
+#if ENABLED(ULTIPANEL)
4474
+  ExitM1:
4475
+#endif
4474 4476
 
4475 4477
     #if ENABLED(EMERGENCY_PARSER)
4476 4478
       wait_for_user = false;
@@ -4479,7 +4481,7 @@ ExitM1:
4479 4481
     KEEPALIVE_STATE(IN_HANDLER);
4480 4482
   }
4481 4483
 
4482
-#endif // ULTIPANEL || EMERGENCY_PARSER
4484
+#endif // EMERGENCY_PARSER || ULTIPANEL
4483 4485
 
4484 4486
 /**
4485 4487
  * M17: Enable power on all stepper motors
@@ -4721,7 +4723,7 @@ inline void gcode_M42() {
4721 4723
           pin_state[pin - first_pin] = digitalRead(pin);
4722 4724
       }
4723 4725
 
4724
-      #if ENABLED(EMERGENCY_PARSER) && DISABLED(ULTIPANEL)
4726
+      #if ENABLED(EMERGENCY_PARSER) || ENABLED(ULTIPANEL)
4725 4727
         wait_for_user = true;
4726 4728
       #endif
4727 4729
 
@@ -4739,7 +4741,7 @@ inline void gcode_M42() {
4739 4741
           }
4740 4742
         }
4741 4743
 
4742
-        #if ENABLED(EMERGENCY_PARSER) && DISABLED(ULTIPANEL)
4744
+        #if ENABLED(EMERGENCY_PARSER) || ENABLED(ULTIPANEL)
4743 4745
           if (!wait_for_user) break;
4744 4746
         #endif
4745 4747
 

Loading…
Cancel
Save