Browse Source

Added configurable script for filrunout form configuration.h

paclema 9 years ago
parent
commit
013a09dbe6
2 changed files with 7 additions and 4 deletions
  1. 5
    2
      Marlin/Configuration.h
  2. 2
    2
      Marlin/Marlin_main.cpp

+ 5
- 2
Marlin/Configuration.h View File

@@ -417,8 +417,11 @@ const bool Z_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the logic
417 417
                                  // In RAMPS uses servo pin 2. Can be changed in pins file. For other boards pin definition should be made.
418 418
                                  // It is assumed that when logic high = filament available
419 419
                                  //                    when logic  low = filament ran out
420
-//const bool FIL_RUNOUT_INVERTING = true;  // Should be uncommented and true or false should assigned
421
-//#define ENDSTOPPULLUP_FIL_RUNOUT // Uncomment to use internal pullup for filament runout pins if the sensor is defined.
420
+#ifdef FILAMENT_RUNOUT_SENSOR
421
+  const bool FIL_RUNOUT_INVERTING = true;  // Should be uncommented and true or false should assigned
422
+  #define ENDSTOPPULLUP_FIL_RUNOUT // Uncomment to use internal pullup for filament runout pins if the sensor is defined.
423
+  #define FILAMENT_RUNOUT_SCRIPT "M600"
424
+#endif 
422 425
 
423 426
 //===========================================================================
424 427
 //============================ Mesh Bed Leveling ============================

+ 2
- 2
Marlin/Marlin_main.cpp View File

@@ -6140,10 +6140,10 @@ void kill()
6140 6140
   void filrunout() {
6141 6141
     if (!filrunoutEnqueued) {
6142 6142
       filrunoutEnqueued = true;
6143
-      enqueuecommand("M600");
6143
+      enqueuecommands_P(PSTR(FILAMENT_RUNOUT_SCRIPT));
6144
+      st_synchronize();
6144 6145
     }
6145 6146
   }
6146
-
6147 6147
 #endif
6148 6148
 
6149 6149
 void Stop() {

Loading…
Cancel
Save