Browse Source

Merge pull request #1999 from paclema/Filrunout_configurable_script

Added configurable script for filrunout from configuration.h
Scott Lahteine 9 years ago
parent
commit
7f3252eea9

+ 5
- 2
Marlin/Configuration.h View File

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

+ 2
- 2
Marlin/Marlin_main.cpp View File

@@ -6213,10 +6213,10 @@ void kill()
6213 6213
   void filrunout() {
6214 6214
     if (!filrunoutEnqueued) {
6215 6215
       filrunoutEnqueued = true;
6216
-      enqueuecommand("M600");
6216
+      enqueuecommands_P(PSTR(FILAMENT_RUNOUT_SCRIPT));
6217
+      st_synchronize();
6217 6218
     }
6218 6219
   }
6219
-
6220 6220
 #endif
6221 6221
 
6222 6222
 void Stop() {

+ 5
- 2
Marlin/configurator/config/Configuration.h View File

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

+ 6
- 3
Marlin/example_configurations/Felix/Configuration.h View File

@@ -349,9 +349,12 @@ const bool Z_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the logic
349 349
                                  // In RAMPS uses servo pin 2. Can be changed in pins file. For other boards pin definition should be made.
350 350
                                  // It is assumed that when logic high = filament available
351 351
                                  //                    when logic  low = filament ran out
352
-//const bool FIL_RUNOUT_INVERTING = true;  // Should be uncommented and true or false should assigned
353
-//#define ENDSTOPPULLUP_FIL_RUNOUT // Uncomment to use internal pullup for filament runout pins if the sensor is defined.
354
-
352
+#ifdef FILAMENT_RUNOUT_SENSOR
353
+  const bool FIL_RUNOUT_INVERTING = true;  // Should be uncommented and true or false should assigned
354
+  #define ENDSTOPPULLUP_FIL_RUNOUT // Uncomment to use internal pullup for filament runout pins if the sensor is defined.
355
+  #define FILAMENT_RUNOUT_SCRIPT "M600"
356
+#endif 
357
+  
355 358
 //===========================================================================
356 359
 //=========================== Manual Bed Leveling ===========================
357 360
 //===========================================================================

+ 6
- 3
Marlin/example_configurations/Felix/Configuration_DUAL.h View File

@@ -349,9 +349,12 @@ const bool Z_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the logic
349 349
                                  // In RAMPS uses servo pin 2. Can be changed in pins file. For other boards pin definition should be made.
350 350
                                  // It is assumed that when logic high = filament available
351 351
                                  //                    when logic  low = filament ran out
352
-//const bool FIL_RUNOUT_INVERTING = true;  // Should be uncommented and true or false should assigned
353
-//#define ENDSTOPPULLUP_FIL_RUNOUT // Uncomment to use internal pullup for filament runout pins if the sensor is defined.
354
-
352
+#ifdef FILAMENT_RUNOUT_SENSOR
353
+  const bool FIL_RUNOUT_INVERTING = true;  // Should be uncommented and true or false should assigned
354
+  #define ENDSTOPPULLUP_FIL_RUNOUT // Uncomment to use internal pullup for filament runout pins if the sensor is defined.
355
+  #define FILAMENT_RUNOUT_SCRIPT "M600"
356
+#endif 
357
+  
355 358
 //===========================================================================
356 359
 //=========================== Manual Bed Leveling ===========================
357 360
 //===========================================================================

+ 6
- 3
Marlin/example_configurations/Hephestos/Configuration.h View File

@@ -370,9 +370,12 @@ const bool Z_PROBE_ENDSTOP_INVERTING = true; // set to true to invert the logic
370 370
                                  // In RAMPS uses servo pin 2. Can be changed in pins file. For other boards pin definition should be made.
371 371
                                  // It is assumed that when logic high = filament available
372 372
                                  //                    when logic  low = filament ran out
373
-//const bool FIL_RUNOUT_INVERTING = true;  // Should be uncommented and true or false should assigned
374
-//#define ENDSTOPPULLUP_FIL_RUNOUT // Uncomment to use internal pullup for filament runout pins if the sensor is defined.
375
-
373
+#ifdef FILAMENT_RUNOUT_SENSOR
374
+  const bool FIL_RUNOUT_INVERTING = true;  // Should be uncommented and true or false should assigned
375
+  #define ENDSTOPPULLUP_FIL_RUNOUT // Uncomment to use internal pullup for filament runout pins if the sensor is defined.
376
+  #define FILAMENT_RUNOUT_SCRIPT "M600"
377
+#endif 
378
+  
376 379
 //===========================================================================
377 380
 //=========================== Manual Bed Leveling ===========================
378 381
 //===========================================================================

+ 5
- 2
Marlin/example_configurations/K8200/Configuration.h View File

@@ -426,8 +426,11 @@ const bool Z_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the logic
426 426
                                  // In RAMPS uses servo pin 2. Can be changed in pins file. For other boards pin definition should be made.
427 427
                                  // It is assumed that when logic high = filament available
428 428
                                  //                    when logic  low = filament ran out
429
-//const bool FIL_RUNOUT_INVERTING = true;  // Should be uncommented and true or false should assigned
430
-//#define ENDSTOPPULLUP_FIL_RUNOUT // Uncomment to use internal pullup for filament runout pins if the sensor is defined.
429
+#ifdef FILAMENT_RUNOUT_SENSOR
430
+  const bool FIL_RUNOUT_INVERTING = true;  // Should be uncommented and true or false should assigned
431
+  #define ENDSTOPPULLUP_FIL_RUNOUT // Uncomment to use internal pullup for filament runout pins if the sensor is defined.
432
+  #define FILAMENT_RUNOUT_SCRIPT "M600"
433
+#endif 
431 434
 
432 435
 //===========================================================================
433 436
 //=========================== Manual Bed Leveling ===========================

+ 6
- 3
Marlin/example_configurations/SCARA/Configuration.h View File

@@ -401,9 +401,12 @@ const bool Z_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the logic
401 401
                                  // In RAMPS uses servo pin 2. Can be changed in pins file. For other boards pin definition should be made.
402 402
                                  // It is assumed that when logic high = filament available
403 403
                                  //                    when logic  low = filament ran out
404
-//const bool FIL_RUNOUT_INVERTING = true;  // Should be uncommented and true or false should assigned
405
-//#define ENDSTOPPULLUP_FIL_RUNOUT // Uncomment to use internal pullup for filament runout pins if the sensor is defined.
406
-
404
+#ifdef FILAMENT_RUNOUT_SENSOR
405
+  const bool FIL_RUNOUT_INVERTING = true;  // Should be uncommented and true or false should assigned
406
+  #define ENDSTOPPULLUP_FIL_RUNOUT // Uncomment to use internal pullup for filament runout pins if the sensor is defined.
407
+  #define FILAMENT_RUNOUT_SCRIPT "M600"
408
+#endif 
409
+  
407 410
 //===========================================================================
408 411
 //=========================== Manual Bed Leveling ===========================
409 412
 //===========================================================================

+ 6
- 3
Marlin/example_configurations/WITBOX/Configuration.h View File

@@ -369,9 +369,12 @@ const bool Z_PROBE_ENDSTOP_INVERTING = true; // set to true to invert the logic
369 369
                                  // In RAMPS uses servo pin 2. Can be changed in pins file. For other boards pin definition should be made.
370 370
                                  // It is assumed that when logic high = filament available
371 371
                                  //                    when logic  low = filament ran out
372
-//const bool FIL_RUNOUT_INVERTING = true;  // Should be uncommented and true or false should assigned
373
-//#define ENDSTOPPULLUP_FIL_RUNOUT // Uncomment to use internal pullup for filament runout pins if the sensor is defined.
374
-
372
+#ifdef FILAMENT_RUNOUT_SENSOR
373
+  const bool FIL_RUNOUT_INVERTING = true;  // Should be uncommented and true or false should assigned
374
+  #define ENDSTOPPULLUP_FIL_RUNOUT // Uncomment to use internal pullup for filament runout pins if the sensor is defined.
375
+  #define FILAMENT_RUNOUT_SCRIPT "M600"
376
+#endif 
377
+  
375 378
 //===========================================================================
376 379
 //=========================== Manual Bed Leveling ===========================
377 380
 //===========================================================================

+ 6
- 3
Marlin/example_configurations/delta/generic/Configuration.h View File

@@ -399,9 +399,12 @@ const bool Z_PROBE_ENDSTOP_INVERTING = true; // set to true to invert the logic
399 399
                                  // In RAMPS uses servo pin 2. Can be changed in pins file. For other boards pin definition should be made.
400 400
                                  // It is assumed that when logic high = filament available
401 401
                                  //                    when logic  low = filament ran out
402
-//const bool FIL_RUNOUT_INVERTING = true;  // Should be uncommented and true or false should assigned
403
-//#define ENDSTOPPULLUP_FIL_RUNOUT // Uncomment to use internal pullup for filament runout pins if the sensor is defined.
404
-
402
+#ifdef FILAMENT_RUNOUT_SENSOR
403
+  const bool FIL_RUNOUT_INVERTING = true;  // Should be uncommented and true or false should assigned
404
+  #define ENDSTOPPULLUP_FIL_RUNOUT // Uncomment to use internal pullup for filament runout pins if the sensor is defined.
405
+  #define FILAMENT_RUNOUT_SCRIPT "M600"
406
+#endif 
407
+  
405 408
 //===========================================================================
406 409
 //=========================== Manual Bed Leveling ===========================
407 410
 //===========================================================================

+ 6
- 3
Marlin/example_configurations/delta/kossel_mini/Configuration.h View File

@@ -399,9 +399,12 @@ const bool Z_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the logic
399 399
                                  // In RAMPS uses servo pin 2. Can be changed in pins file. For other boards pin definition should be made.
400 400
                                  // It is assumed that when logic high = filament available
401 401
                                  //                    when logic  low = filament ran out
402
-//const bool FIL_RUNOUT_INVERTING = true;  // Should be uncommented and true or false should assigned
403
-//#define ENDSTOPPULLUP_FIL_RUNOUT // Uncomment to use internal pullup for filament runout pins if the sensor is defined.
404
-
402
+#ifdef FILAMENT_RUNOUT_SENSOR
403
+  const bool FIL_RUNOUT_INVERTING = true;  // Should be uncommented and true or false should assigned
404
+  #define ENDSTOPPULLUP_FIL_RUNOUT // Uncomment to use internal pullup for filament runout pins if the sensor is defined.
405
+  #define FILAMENT_RUNOUT_SCRIPT "M600"
406
+#endif 
407
+  
405 408
 //===========================================================================
406 409
 //=========================== Manual Bed Leveling ===========================
407 410
 //===========================================================================

+ 5
- 3
Marlin/example_configurations/makibox/Configuration.h View File

@@ -369,9 +369,11 @@ const bool Z_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the logic
369 369
                                  // In RAMPS uses servo pin 2. Can be changed in pins file. For other boards pin definition should be made.
370 370
                                  // It is assumed that when logic high = filament available
371 371
                                  //                    when logic  low = filament ran out
372
-//const bool FIL_RUNOUT_INVERTING = true;  // Should be uncommented and true or false should assigned
373
-//#define ENDSTOPPULLUP_FIL_RUNOUT // Uncomment to use internal pullup for filament runout pins if the sensor is defined.
374
-
372
+#ifdef FILAMENT_RUNOUT_SENSOR
373
+  const bool FIL_RUNOUT_INVERTING = true;  // Should be uncommented and true or false should assigned
374
+  #define ENDSTOPPULLUP_FIL_RUNOUT // Uncomment to use internal pullup for filament runout pins if the sensor is defined.
375
+  #define FILAMENT_RUNOUT_SCRIPT "M600"
376
+#endif 
375 377
 //===========================================================================
376 378
 //=========================== Manual Bed Leveling ===========================
377 379
 //===========================================================================

+ 5
- 2
Marlin/example_configurations/tvrrug/Round2/Configuration.h View File

@@ -371,8 +371,11 @@ const bool Z_PROBE_ENDSTOP_INVERTING = true; // set to true to invert the logic
371 371
                                  // In RAMPS uses servo pin 2. Can be changed in pins file. For other boards pin definition should be made.
372 372
                                  // It is assumed that when logic high = filament available
373 373
                                  //                    when logic  low = filament ran out
374
-//const bool FIL_RUNOUT_INVERTING = true;  // Should be uncommented and true or false should assigned
375
-//#define ENDSTOPPULLUP_FIL_RUNOUT // Uncomment to use internal pullup for filament runout pins if the sensor is defined.
374
+#ifdef FILAMENT_RUNOUT_SENSOR
375
+  const bool FIL_RUNOUT_INVERTING = true;  // Should be uncommented and true or false should assigned
376
+  #define ENDSTOPPULLUP_FIL_RUNOUT // Uncomment to use internal pullup for filament runout pins if the sensor is defined.
377
+  #define FILAMENT_RUNOUT_SCRIPT "M600"
378
+#endif 
376 379
 
377 380
 //===========================================================================
378 381
 //=========================== Manual Bed Leveling ===========================

Loading…
Cancel
Save