Bläddra i källkod

Replace const bool with #define for consistency

Petr Zahradník junior 8 år sedan
förälder
incheckning
d7ce5d271b
Inget konto är kopplat till bidragsgivarens mejladress
23 ändrade filer med 23 tillägg och 23 borttagningar
  1. 1
    1
      Marlin/Configuration.h
  2. 1
    1
      Marlin/Marlin_main.cpp
  3. 1
    1
      Marlin/example_configurations/Cartesio/Configuration.h
  4. 1
    1
      Marlin/example_configurations/Felix/Configuration.h
  5. 1
    1
      Marlin/example_configurations/Felix/DUAL/Configuration.h
  6. 1
    1
      Marlin/example_configurations/Hephestos/Configuration.h
  7. 1
    1
      Marlin/example_configurations/Hephestos_2/Configuration.h
  8. 1
    1
      Marlin/example_configurations/K8200/Configuration.h
  9. 1
    1
      Marlin/example_configurations/K8400/Configuration.h
  10. 1
    1
      Marlin/example_configurations/K8400/Dual-head/Configuration.h
  11. 1
    1
      Marlin/example_configurations/RepRapWorld/Megatronics/Configuration.h
  12. 1
    1
      Marlin/example_configurations/RigidBot/Configuration.h
  13. 1
    1
      Marlin/example_configurations/SCARA/Configuration.h
  14. 1
    1
      Marlin/example_configurations/TAZ4/Configuration.h
  15. 1
    1
      Marlin/example_configurations/WITBOX/Configuration.h
  16. 1
    1
      Marlin/example_configurations/adafruit/ST7565/Configuration.h
  17. 1
    1
      Marlin/example_configurations/delta/biv2.5/Configuration.h
  18. 1
    1
      Marlin/example_configurations/delta/generic/Configuration.h
  19. 1
    1
      Marlin/example_configurations/delta/kossel_mini/Configuration.h
  20. 1
    1
      Marlin/example_configurations/delta/kossel_pro/Configuration.h
  21. 1
    1
      Marlin/example_configurations/delta/kossel_xl/Configuration.h
  22. 1
    1
      Marlin/example_configurations/makibox/Configuration.h
  23. 1
    1
      Marlin/example_configurations/tvrrug/Round2/Configuration.h

+ 1
- 1
Marlin/Configuration.h Visa fil

@@ -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 Visa fil

@@ -9488,7 +9488,7 @@ void disable_all_steppers() {
9488 9488
 void manage_inactivity(bool ignore_stepper_queue/*=false*/) {
9489 9489
 
9490 9490
   #if ENABLED(FILAMENT_RUNOUT_SENSOR)
9491
-    if ((IS_SD_PRINTING || print_job_timer.isRunning()) && !(READ(FIL_RUNOUT_PIN) ^ FIL_RUNOUT_INVERTING))
9491
+    if ((IS_SD_PRINTING || print_job_timer.isRunning()) && (READ(FIL_RUNOUT_PIN) == FIL_RUNOUT_INVERTING))
9492 9492
       handle_filament_runout();
9493 9493
   #endif
9494 9494
 

+ 1
- 1
Marlin/example_configurations/Cartesio/Configuration.h Visa fil

@@ -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 Visa fil

@@ -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 Visa fil

@@ -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 Visa fil

@@ -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 Visa fil

@@ -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 Visa fil

@@ -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 Visa fil

@@ -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 Visa fil

@@ -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 Visa fil

@@ -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 Visa fil

@@ -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 Visa fil

@@ -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 Visa fil

@@ -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 Visa fil

@@ -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 Visa fil

@@ -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 Visa fil

@@ -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 Visa fil

@@ -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 Visa fil

@@ -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 Visa fil

@@ -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 Visa fil

@@ -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 Visa fil

@@ -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 Visa fil

@@ -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

Laddar…
Avbryt
Spara