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
                                  // In RAMPS uses servo pin 2. Can be changed in pins file. For other boards pin definition should be made.
411
                                  // In RAMPS uses servo pin 2. Can be changed in pins file. For other boards pin definition should be made.
412
                                  // It is assumed that when logic high = filament available
412
                                  // It is assumed that when logic high = filament available
413
                                  //                    when logic  low = filament ran out
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
 //=========================== Manual Bed Leveling ===========================
421
 //=========================== Manual Bed Leveling ===========================

+ 2
- 2
Marlin/Marlin_main.cpp View File

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

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

410
                                  // In RAMPS uses servo pin 2. Can be changed in pins file. For other boards pin definition should be made.
410
                                  // In RAMPS uses servo pin 2. Can be changed in pins file. For other boards pin definition should be made.
411
                                  // It is assumed that when logic high = filament available
411
                                  // It is assumed that when logic high = filament available
412
                                  //                    when logic  low = filament ran out
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
 //=========================== Manual Bed Leveling ===========================
420
 //=========================== Manual Bed Leveling ===========================

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

349
                                  // In RAMPS uses servo pin 2. Can be changed in pins file. For other boards pin definition should be made.
349
                                  // In RAMPS uses servo pin 2. Can be changed in pins file. For other boards pin definition should be made.
350
                                  // It is assumed that when logic high = filament available
350
                                  // It is assumed that when logic high = filament available
351
                                  //                    when logic  low = filament ran out
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
 //=========================== Manual Bed Leveling ===========================
359
 //=========================== Manual Bed Leveling ===========================
357
 //===========================================================================
360
 //===========================================================================

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

349
                                  // In RAMPS uses servo pin 2. Can be changed in pins file. For other boards pin definition should be made.
349
                                  // In RAMPS uses servo pin 2. Can be changed in pins file. For other boards pin definition should be made.
350
                                  // It is assumed that when logic high = filament available
350
                                  // It is assumed that when logic high = filament available
351
                                  //                    when logic  low = filament ran out
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
 //=========================== Manual Bed Leveling ===========================
359
 //=========================== Manual Bed Leveling ===========================
357
 //===========================================================================
360
 //===========================================================================

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

370
                                  // In RAMPS uses servo pin 2. Can be changed in pins file. For other boards pin definition should be made.
370
                                  // In RAMPS uses servo pin 2. Can be changed in pins file. For other boards pin definition should be made.
371
                                  // It is assumed that when logic high = filament available
371
                                  // It is assumed that when logic high = filament available
372
                                  //                    when logic  low = filament ran out
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
 //=========================== Manual Bed Leveling ===========================
380
 //=========================== Manual Bed Leveling ===========================
378
 //===========================================================================
381
 //===========================================================================

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

426
                                  // In RAMPS uses servo pin 2. Can be changed in pins file. For other boards pin definition should be made.
426
                                  // In RAMPS uses servo pin 2. Can be changed in pins file. For other boards pin definition should be made.
427
                                  // It is assumed that when logic high = filament available
427
                                  // It is assumed that when logic high = filament available
428
                                  //                    when logic  low = filament ran out
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
 //=========================== Manual Bed Leveling ===========================
436
 //=========================== Manual Bed Leveling ===========================

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

401
                                  // In RAMPS uses servo pin 2. Can be changed in pins file. For other boards pin definition should be made.
401
                                  // In RAMPS uses servo pin 2. Can be changed in pins file. For other boards pin definition should be made.
402
                                  // It is assumed that when logic high = filament available
402
                                  // It is assumed that when logic high = filament available
403
                                  //                    when logic  low = filament ran out
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
 //=========================== Manual Bed Leveling ===========================
411
 //=========================== Manual Bed Leveling ===========================
409
 //===========================================================================
412
 //===========================================================================

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

369
                                  // In RAMPS uses servo pin 2. Can be changed in pins file. For other boards pin definition should be made.
369
                                  // In RAMPS uses servo pin 2. Can be changed in pins file. For other boards pin definition should be made.
370
                                  // It is assumed that when logic high = filament available
370
                                  // It is assumed that when logic high = filament available
371
                                  //                    when logic  low = filament ran out
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
 //=========================== Manual Bed Leveling ===========================
379
 //=========================== Manual Bed Leveling ===========================
377
 //===========================================================================
380
 //===========================================================================

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

399
                                  // In RAMPS uses servo pin 2. Can be changed in pins file. For other boards pin definition should be made.
399
                                  // In RAMPS uses servo pin 2. Can be changed in pins file. For other boards pin definition should be made.
400
                                  // It is assumed that when logic high = filament available
400
                                  // It is assumed that when logic high = filament available
401
                                  //                    when logic  low = filament ran out
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
 //=========================== Manual Bed Leveling ===========================
409
 //=========================== Manual Bed Leveling ===========================
407
 //===========================================================================
410
 //===========================================================================

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

399
                                  // In RAMPS uses servo pin 2. Can be changed in pins file. For other boards pin definition should be made.
399
                                  // In RAMPS uses servo pin 2. Can be changed in pins file. For other boards pin definition should be made.
400
                                  // It is assumed that when logic high = filament available
400
                                  // It is assumed that when logic high = filament available
401
                                  //                    when logic  low = filament ran out
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
 //=========================== Manual Bed Leveling ===========================
409
 //=========================== Manual Bed Leveling ===========================
407
 //===========================================================================
410
 //===========================================================================

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

369
                                  // In RAMPS uses servo pin 2. Can be changed in pins file. For other boards pin definition should be made.
369
                                  // In RAMPS uses servo pin 2. Can be changed in pins file. For other boards pin definition should be made.
370
                                  // It is assumed that when logic high = filament available
370
                                  // It is assumed that when logic high = filament available
371
                                  //                    when logic  low = filament ran out
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
 //=========================== Manual Bed Leveling ===========================
378
 //=========================== Manual Bed Leveling ===========================
377
 //===========================================================================
379
 //===========================================================================

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

371
                                  // In RAMPS uses servo pin 2. Can be changed in pins file. For other boards pin definition should be made.
371
                                  // In RAMPS uses servo pin 2. Can be changed in pins file. For other boards pin definition should be made.
372
                                  // It is assumed that when logic high = filament available
372
                                  // It is assumed that when logic high = filament available
373
                                  //                    when logic  low = filament ran out
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
 //=========================== Manual Bed Leveling ===========================
381
 //=========================== Manual Bed Leveling ===========================

Loading…
Cancel
Save