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

+ 8
- 6
Marlin/Marlin_main.cpp View File

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

Loading…
Cancel
Save