Browse Source

Merge pull request #5191 from petrzjunior/const

Replace const bool with #define for consistency
Scott Lahteine 7 years ago
parent
commit
2330619da0

+ 1
- 1
Marlin/Configuration.h View File

@@ -708,7 +708,7 @@
708 708
                                  // It is assumed that when logic high = filament available
709 709
                                  //                    when logic  low = filament ran out
710 710
 #if ENABLED(FILAMENT_RUNOUT_SENSOR)
711
-  const bool FIL_RUNOUT_INVERTING = false; // set to true to invert the logic of the sensor.
711
+  #define FIL_RUNOUT_INVERTING false // set to true to invert the logic of the sensor.
712 712
   #define ENDSTOPPULLUP_FIL_RUNOUT // Uncomment to use internal pullup for filament runout pins if the sensor is defined.
713 713
   #define FILAMENT_RUNOUT_SCRIPT "M600"
714 714
 #endif

+ 1
- 1
Marlin/Marlin_main.cpp View File

@@ -9602,7 +9602,7 @@ void disable_all_steppers() {
9602 9602
 void manage_inactivity(bool ignore_stepper_queue/*=false*/) {
9603 9603
 
9604 9604
   #if ENABLED(FILAMENT_RUNOUT_SENSOR)
9605
-    if ((IS_SD_PRINTING || print_job_timer.isRunning()) && !(READ(FIL_RUNOUT_PIN) ^ FIL_RUNOUT_INVERTING))
9605
+    if ((IS_SD_PRINTING || print_job_timer.isRunning()) && (READ(FIL_RUNOUT_PIN) == FIL_RUNOUT_INVERTING))
9606 9606
       handle_filament_runout();
9607 9607
   #endif
9608 9608
 

+ 1
- 1
Marlin/example_configurations/Cartesio/Configuration.h View File

@@ -708,7 +708,7 @@
708 708
                                  // It is assumed that when logic high = filament available
709 709
                                  //                    when logic  low = filament ran out
710 710
 #if ENABLED(FILAMENT_RUNOUT_SENSOR)
711
-  const bool FIL_RUNOUT_INVERTING = false; // set to true to invert the logic of the sensor.
711
+  #define FIL_RUNOUT_INVERTING false // set to true to invert the logic of the sensor.
712 712
   #define ENDSTOPPULLUP_FIL_RUNOUT // Uncomment to use internal pullup for filament runout pins if the sensor is defined.
713 713
   #define FILAMENT_RUNOUT_SCRIPT "M600"
714 714
 #endif

+ 1
- 1
Marlin/example_configurations/Felix/Configuration.h View File

@@ -691,7 +691,7 @@
691 691
                                  // It is assumed that when logic high = filament available
692 692
                                  //                    when logic  low = filament ran out
693 693
 #if ENABLED(FILAMENT_RUNOUT_SENSOR)
694
-  const bool FIL_RUNOUT_INVERTING = false; // set to true to invert the logic of the sensor.
694
+  #define FIL_RUNOUT_INVERTING false // set to true to invert the logic of the sensor.
695 695
   #define ENDSTOPPULLUP_FIL_RUNOUT // Uncomment to use internal pullup for filament runout pins if the sensor is defined.
696 696
   #define FILAMENT_RUNOUT_SCRIPT "M600"
697 697
 #endif

+ 1
- 1
Marlin/example_configurations/Felix/DUAL/Configuration.h View File

@@ -691,7 +691,7 @@
691 691
                                  // It is assumed that when logic high = filament available
692 692
                                  //                    when logic  low = filament ran out
693 693
 #if ENABLED(FILAMENT_RUNOUT_SENSOR)
694
-  const bool FIL_RUNOUT_INVERTING = false; // set to true to invert the logic of the sensor.
694
+  #define FIL_RUNOUT_INVERTING false // set to true to invert the logic of the sensor.
695 695
   #define ENDSTOPPULLUP_FIL_RUNOUT // Uncomment to use internal pullup for filament runout pins if the sensor is defined.
696 696
   #define FILAMENT_RUNOUT_SCRIPT "M600"
697 697
 #endif

+ 1
- 1
Marlin/example_configurations/Hephestos/Configuration.h View File

@@ -700,7 +700,7 @@
700 700
                                  // It is assumed that when logic high = filament available
701 701
                                  //                    when logic  low = filament ran out
702 702
 #if ENABLED(FILAMENT_RUNOUT_SENSOR)
703
-  const bool FIL_RUNOUT_INVERTING = false; // set to true to invert the logic of the sensor.
703
+  #define FIL_RUNOUT_INVERTING false // set to true to invert the logic of the sensor.
704 704
   #define ENDSTOPPULLUP_FIL_RUNOUT // Uncomment to use internal pullup for filament runout pins if the sensor is defined.
705 705
   #define FILAMENT_RUNOUT_SCRIPT "M600"
706 706
 #endif

+ 1
- 1
Marlin/example_configurations/Hephestos_2/Configuration.h View File

@@ -702,7 +702,7 @@
702 702
                                  // It is assumed that when logic high = filament available
703 703
                                  //                    when logic  low = filament ran out
704 704
 #if ENABLED(FILAMENT_RUNOUT_SENSOR)
705
-  const bool FIL_RUNOUT_INVERTING = false; // set to true to invert the logic of the sensor.
705
+  #define FIL_RUNOUT_INVERTING false // set to true to invert the logic of the sensor.
706 706
   #define ENDSTOPPULLUP_FIL_RUNOUT // Uncomment to use internal pullup for filament runout pins if the sensor is defined.
707 707
   #define FILAMENT_RUNOUT_SCRIPT "M600"
708 708
 #endif

+ 1
- 1
Marlin/example_configurations/K8200/Configuration.h View File

@@ -725,7 +725,7 @@
725 725
                                  // It is assumed that when logic high = filament available
726 726
                                  //                    when logic  low = filament ran out
727 727
 #if ENABLED(FILAMENT_RUNOUT_SENSOR)
728
-  const bool FIL_RUNOUT_INVERTING = false; // set to true to invert the logic of the sensor.
728
+  #define FIL_RUNOUT_INVERTING false // set to true to invert the logic of the sensor.
729 729
   #define ENDSTOPPULLUP_FIL_RUNOUT // Uncomment to use internal pullup for filament runout pins if the sensor is defined.
730 730
   #define FILAMENT_RUNOUT_SCRIPT "M600"
731 731
 #endif

+ 1
- 1
Marlin/example_configurations/K8400/Configuration.h View File

@@ -708,7 +708,7 @@
708 708
                                  // It is assumed that when logic high = filament available
709 709
                                  //                    when logic  low = filament ran out
710 710
 #if ENABLED(FILAMENT_RUNOUT_SENSOR)
711
-  const bool FIL_RUNOUT_INVERTING = false; // set to true to invert the logic of the sensor.
711
+  #define FIL_RUNOUT_INVERTING false // set to true to invert the logic of the sensor.
712 712
   #define ENDSTOPPULLUP_FIL_RUNOUT // Uncomment to use internal pullup for filament runout pins if the sensor is defined.
713 713
   #define FILAMENT_RUNOUT_SCRIPT "M600"
714 714
 #endif

+ 1
- 1
Marlin/example_configurations/K8400/Dual-head/Configuration.h View File

@@ -708,7 +708,7 @@
708 708
                                  // It is assumed that when logic high = filament available
709 709
                                  //                    when logic  low = filament ran out
710 710
 #if ENABLED(FILAMENT_RUNOUT_SENSOR)
711
-  const bool FIL_RUNOUT_INVERTING = false; // set to true to invert the logic of the sensor.
711
+  #define FIL_RUNOUT_INVERTING false // set to true to invert the logic of the sensor.
712 712
   #define ENDSTOPPULLUP_FIL_RUNOUT // Uncomment to use internal pullup for filament runout pins if the sensor is defined.
713 713
   #define FILAMENT_RUNOUT_SCRIPT "M600"
714 714
 #endif

+ 1
- 1
Marlin/example_configurations/RepRapWorld/Megatronics/Configuration.h View File

@@ -708,7 +708,7 @@
708 708
                                  // It is assumed that when logic high = filament available
709 709
                                  //                    when logic  low = filament ran out
710 710
 #if ENABLED(FILAMENT_RUNOUT_SENSOR)
711
-  const bool FIL_RUNOUT_INVERTING = false; // set to true to invert the logic of the sensor.
711
+  #define FIL_RUNOUT_INVERTING false // set to true to invert the logic of the sensor.
712 712
   #define ENDSTOPPULLUP_FIL_RUNOUT // Uncomment to use internal pullup for filament runout pins if the sensor is defined.
713 713
   #define FILAMENT_RUNOUT_SCRIPT "M600"
714 714
 #endif

+ 1
- 1
Marlin/example_configurations/RigidBot/Configuration.h View File

@@ -706,7 +706,7 @@
706 706
                                  // It is assumed that when logic high = filament available
707 707
                                  //                    when logic  low = filament ran out
708 708
 #if ENABLED(FILAMENT_RUNOUT_SENSOR)
709
-  const bool FIL_RUNOUT_INVERTING = false; // set to true to invert the logic of the sensor.
709
+  #define FIL_RUNOUT_INVERTING false // set to true to invert the logic of the sensor.
710 710
   #define ENDSTOPPULLUP_FIL_RUNOUT // Uncomment to use internal pullup for filament runout pins if the sensor is defined.
711 711
   #define FILAMENT_RUNOUT_SCRIPT "M600"
712 712
 #endif

+ 1
- 1
Marlin/example_configurations/SCARA/Configuration.h View File

@@ -723,7 +723,7 @@
723 723
                                  // It is assumed that when logic high = filament available
724 724
                                  //                    when logic  low = filament ran out
725 725
 #if ENABLED(FILAMENT_RUNOUT_SENSOR)
726
-  const bool FIL_RUNOUT_INVERTING = false; // set to true to invert the logic of the sensor.
726
+  #define FIL_RUNOUT_INVERTING false // set to true to invert the logic of the sensor.
727 727
   #define ENDSTOPPULLUP_FIL_RUNOUT // Uncomment to use internal pullup for filament runout pins if the sensor is defined.
728 728
   #define FILAMENT_RUNOUT_SCRIPT "M600"
729 729
 #endif

+ 1
- 1
Marlin/example_configurations/TAZ4/Configuration.h View File

@@ -729,7 +729,7 @@
729 729
                                  // It is assumed that when logic high = filament available
730 730
                                  //                    when logic  low = filament ran out
731 731
 #if ENABLED(FILAMENT_RUNOUT_SENSOR)
732
-  const bool FIL_RUNOUT_INVERTING = false; // set to true to invert the logic of the sensor.
732
+  #define FIL_RUNOUT_INVERTING false // set to true to invert the logic of the sensor.
733 733
   #define ENDSTOPPULLUP_FIL_RUNOUT // Uncomment to use internal pullup for filament runout pins if the sensor is defined.
734 734
   #define FILAMENT_RUNOUT_SCRIPT "M600"
735 735
 #endif

+ 1
- 1
Marlin/example_configurations/WITBOX/Configuration.h View File

@@ -700,7 +700,7 @@
700 700
                                  // It is assumed that when logic high = filament available
701 701
                                  //                    when logic  low = filament ran out
702 702
 #if ENABLED(FILAMENT_RUNOUT_SENSOR)
703
-  const bool FIL_RUNOUT_INVERTING = false; // set to true to invert the logic of the sensor.
703
+  #define FIL_RUNOUT_INVERTING false // set to true to invert the logic of the sensor.
704 704
   #define ENDSTOPPULLUP_FIL_RUNOUT // Uncomment to use internal pullup for filament runout pins if the sensor is defined.
705 705
   #define FILAMENT_RUNOUT_SCRIPT "M600"
706 706
 #endif

+ 1
- 1
Marlin/example_configurations/adafruit/ST7565/Configuration.h View File

@@ -708,7 +708,7 @@
708 708
                                  // It is assumed that when logic high = filament available
709 709
                                  //                    when logic  low = filament ran out
710 710
 #if ENABLED(FILAMENT_RUNOUT_SENSOR)
711
-  const bool FIL_RUNOUT_INVERTING = false; // set to true to invert the logic of the sensor.
711
+  #define FIL_RUNOUT_INVERTING false // set to true to invert the logic of the sensor.
712 712
   #define ENDSTOPPULLUP_FIL_RUNOUT // Uncomment to use internal pullup for filament runout pins if the sensor is defined.
713 713
   #define FILAMENT_RUNOUT_SCRIPT "M600"
714 714
 #endif

+ 1
- 1
Marlin/example_configurations/delta/biv2.5/Configuration.h View File

@@ -800,7 +800,7 @@
800 800
                                  // It is assumed that when logic high = filament available
801 801
                                  //                    when logic  low = filament ran out
802 802
 #if ENABLED(FILAMENT_RUNOUT_SENSOR)
803
-  const bool FIL_RUNOUT_INVERTING = false; // set to true to invert the logic of the sensor.
803
+  #define FIL_RUNOUT_INVERTING false // set to true to invert the logic of the sensor.
804 804
   #define ENDSTOPPULLUP_FIL_RUNOUT // Uncomment to use internal pullup for filament runout pins if the sensor is defined.
805 805
   #define FILAMENT_RUNOUT_SCRIPT "M600"
806 806
 #endif

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

@@ -794,7 +794,7 @@
794 794
                                  // It is assumed that when logic high = filament available
795 795
                                  //                    when logic  low = filament ran out
796 796
 #if ENABLED(FILAMENT_RUNOUT_SENSOR)
797
-  const bool FIL_RUNOUT_INVERTING = false; // set to true to invert the logic of the sensor.
797
+  #define FIL_RUNOUT_INVERTING false // set to true to invert the logic of the sensor.
798 798
   #define ENDSTOPPULLUP_FIL_RUNOUT // Uncomment to use internal pullup for filament runout pins if the sensor is defined.
799 799
   #define FILAMENT_RUNOUT_SCRIPT "M600"
800 800
 #endif

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

@@ -797,7 +797,7 @@
797 797
                                  // It is assumed that when logic high = filament available
798 798
                                  //                    when logic  low = filament ran out
799 799
 #if ENABLED(FILAMENT_RUNOUT_SENSOR)
800
-  const bool FIL_RUNOUT_INVERTING = false; // set to true to invert the logic of the sensor.
800
+  #define FIL_RUNOUT_INVERTING false // set to true to invert the logic of the sensor.
801 801
   #define ENDSTOPPULLUP_FIL_RUNOUT // Uncomment to use internal pullup for filament runout pins if the sensor is defined.
802 802
   #define FILAMENT_RUNOUT_SCRIPT "M600"
803 803
 #endif

+ 1
- 1
Marlin/example_configurations/delta/kossel_pro/Configuration.h View File

@@ -798,7 +798,7 @@
798 798
                                  // It is assumed that when logic high = filament available
799 799
                                  //                    when logic  low = filament ran out
800 800
 #if ENABLED(FILAMENT_RUNOUT_SENSOR)
801
-  const bool FIL_RUNOUT_INVERTING = false; // set to true to invert the logic of the sensor.
801
+  #define FIL_RUNOUT_INVERTING false // set to true to invert the logic of the sensor.
802 802
   #define ENDSTOPPULLUP_FIL_RUNOUT // Uncomment to use internal pullup for filament runout pins if the sensor is defined.
803 803
   #define FILAMENT_RUNOUT_SCRIPT "M600"
804 804
 #endif

+ 1
- 1
Marlin/example_configurations/delta/kossel_xl/Configuration.h View File

@@ -800,7 +800,7 @@
800 800
                                  // It is assumed that when logic high = filament available
801 801
                                  //                    when logic  low = filament ran out
802 802
 #if ENABLED(FILAMENT_RUNOUT_SENSOR)
803
-  const bool FIL_RUNOUT_INVERTING = false; // set to true to invert the logic of the sensor.
803
+  #define FIL_RUNOUT_INVERTING false // set to true to invert the logic of the sensor.
804 804
   #define ENDSTOPPULLUP_FIL_RUNOUT // Uncomment to use internal pullup for filament runout pins if the sensor is defined.
805 805
   #define FILAMENT_RUNOUT_SCRIPT "M600"
806 806
 #endif

+ 1
- 1
Marlin/example_configurations/makibox/Configuration.h View File

@@ -711,7 +711,7 @@
711 711
                                  // It is assumed that when logic high = filament available
712 712
                                  //                    when logic  low = filament ran out
713 713
 #if ENABLED(FILAMENT_RUNOUT_SENSOR)
714
-  const bool FIL_RUNOUT_INVERTING = false; // set to true to invert the logic of the sensor.
714
+  #define FIL_RUNOUT_INVERTING false // set to true to invert the logic of the sensor.
715 715
   #define ENDSTOPPULLUP_FIL_RUNOUT // Uncomment to use internal pullup for filament runout pins if the sensor is defined.
716 716
   #define FILAMENT_RUNOUT_SCRIPT "M600"
717 717
 #endif

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

@@ -704,7 +704,7 @@
704 704
                                  // It is assumed that when logic high = filament available
705 705
                                  //                    when logic  low = filament ran out
706 706
 #if ENABLED(FILAMENT_RUNOUT_SENSOR)
707
-  const bool FIL_RUNOUT_INVERTING = false; // set to true to invert the logic of the sensor.
707
+  #define FIL_RUNOUT_INVERTING false // set to true to invert the logic of the sensor.
708 708
   #define ENDSTOPPULLUP_FIL_RUNOUT // Uncomment to use internal pullup for filament runout pins if the sensor is defined.
709 709
   #define FILAMENT_RUNOUT_SCRIPT "M600"
710 710
 #endif

Loading…
Cancel
Save