瀏覽代碼

FILAMENT_SENSOR -> FILAMENT_WIDTH_SENSOR

Scott Lahteine 8 年之前
父節點
當前提交
1a79b13b7a
共有 27 個檔案被更改,包括 76 行新增66 行删除
  1. 2
    2
      .travis.yml
  2. 1
    1
      Marlin/Conditionals.h
  3. 2
    2
      Marlin/Configuration.h
  4. 1
    1
      Marlin/Marlin.h
  5. 5
    5
      Marlin/Marlin_main.cpp
  6. 16
    6
      Marlin/SanityCheck.h
  7. 2
    2
      Marlin/example_configurations/Felix/Configuration.h
  8. 2
    2
      Marlin/example_configurations/Felix/Configuration_DUAL.h
  9. 2
    2
      Marlin/example_configurations/Hephestos/Configuration.h
  10. 2
    2
      Marlin/example_configurations/Hephestos_2/Configuration.h
  11. 2
    2
      Marlin/example_configurations/K8200/Configuration.h
  12. 2
    2
      Marlin/example_configurations/RepRapWorld/Megatronics/Configuration.h
  13. 2
    2
      Marlin/example_configurations/RigidBot/Configuration.h
  14. 2
    2
      Marlin/example_configurations/SCARA/Configuration.h
  15. 2
    2
      Marlin/example_configurations/TAZ4/Configuration.h
  16. 2
    2
      Marlin/example_configurations/WITBOX/Configuration.h
  17. 2
    2
      Marlin/example_configurations/adafruit/ST7565/Configuration.h
  18. 2
    2
      Marlin/example_configurations/delta/biv2.5/Configuration.h
  19. 2
    2
      Marlin/example_configurations/delta/generic/Configuration.h
  20. 2
    2
      Marlin/example_configurations/delta/kossel_mini/Configuration.h
  21. 2
    2
      Marlin/example_configurations/delta/kossel_pro/Configuration.h
  22. 2
    2
      Marlin/example_configurations/delta/kossel_xl/Configuration.h
  23. 2
    2
      Marlin/example_configurations/makibox/Configuration.h
  24. 2
    2
      Marlin/example_configurations/tvrrug/Round2/Configuration.h
  25. 1
    1
      Marlin/planner.cpp
  26. 11
    11
      Marlin/temperature.cpp
  27. 1
    1
      Marlin/temperature.h

+ 2
- 2
.travis.yml 查看文件

@@ -124,11 +124,11 @@ script:
124 124
   - build_marlin
125 125
   # Enable filament sensor
126 126
   - restore_configs
127
-  - opt_enable FILAMENT_SENSOR
127
+  - opt_enable FILAMENT_WIDTH_SENSOR
128 128
   - build_marlin
129 129
   # Enable filament sensor with LCD display
130 130
   - restore_configs
131
-  - opt_enable ULTIMAKERCONTROLLER FILAMENT_SENSOR FILAMENT_LCD_DISPLAY
131
+  - opt_enable ULTIMAKERCONTROLLER FILAMENT_WIDTH_SENSOR FILAMENT_LCD_DISPLAY
132 132
   - build_marlin
133 133
   # Enable COREXY
134 134
   - restore_configs

+ 1
- 1
Marlin/Conditionals.h 查看文件

@@ -513,7 +513,7 @@
513 513
   #define HAS_SERVO_1 (PIN_EXISTS(SERVO1))
514 514
   #define HAS_SERVO_2 (PIN_EXISTS(SERVO2))
515 515
   #define HAS_SERVO_3 (PIN_EXISTS(SERVO3))
516
-  #define HAS_FILAMENT_SENSOR (ENABLED(FILAMENT_SENSOR) && PIN_EXISTS(FILWIDTH))
516
+  #define HAS_FILAMENT_WIDTH_SENSOR (PIN_EXISTS(FILWIDTH))
517 517
   #define HAS_FILRUNOUT (PIN_EXISTS(FILRUNOUT))
518 518
   #define HAS_HOME (PIN_EXISTS(HOME))
519 519
   #define HAS_KILL (PIN_EXISTS(KILL))

+ 2
- 2
Marlin/Configuration.h 查看文件

@@ -920,11 +920,11 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l
920 920
  * Note may require analog pins to be defined for different motherboards
921 921
  **********************************************************************/
922 922
 // Uncomment below to enable
923
-//#define FILAMENT_SENSOR
923
+//#define FILAMENT_WIDTH_SENSOR
924 924
 
925 925
 #define DEFAULT_NOMINAL_FILAMENT_DIA 3.00  //Enter the diameter (in mm) of the filament generally used (3.0 mm or 1.75 mm) - this is then used in the slicer software.  Used for sensor reading validation
926 926
 
927
-#if ENABLED(FILAMENT_SENSOR)
927
+#if ENABLED(FILAMENT_WIDTH_SENSOR)
928 928
   #define FILAMENT_SENSOR_EXTRUDER_NUM 0   //The number of the extruder that has the filament sensor (0,1,2)
929 929
   #define MEASUREMENT_DELAY_CM        14   //measurement delay in cm.  This is the distance from filament sensor to middle of barrel
930 930
 

+ 1
- 1
Marlin/Marlin.h 查看文件

@@ -334,7 +334,7 @@ extern bool axis_homed[3]; // axis[n].is_homed
334 334
   extern int EtoPPressure;
335 335
 #endif
336 336
 
337
-#if ENABLED(FILAMENT_SENSOR)
337
+#if ENABLED(FILAMENT_WIDTH_SENSOR)
338 338
   extern float filament_width_nominal;  //holds the theoretical filament diameter i.e., 3.00 or 1.75
339 339
   extern bool filament_sensor;  //indicates that filament sensor readings should control extrusion
340 340
   extern float filament_width_meas; //holds the filament diameter as accurately measured

+ 5
- 5
Marlin/Marlin_main.cpp 查看文件

@@ -405,7 +405,7 @@ static uint8_t target_extruder;
405 405
   float axis_scaling[3] = { 1, 1, 1 };    // Build size scaling, default to 1
406 406
 #endif
407 407
 
408
-#if ENABLED(FILAMENT_SENSOR)
408
+#if ENABLED(FILAMENT_WIDTH_SENSOR)
409 409
   //Variables for Filament Sensor input
410 410
   float filament_width_nominal = DEFAULT_NOMINAL_FILAMENT_DIA;  //Set nominal filament width, can be changed with M404
411 411
   bool filament_sensor = false;  //M405 turns on filament_sensor control, M406 turns it off
@@ -5437,7 +5437,7 @@ inline void gcode_M400() { st_synchronize(); }
5437 5437
 
5438 5438
 #endif // AUTO_BED_LEVELING_FEATURE && (HAS_SERVO_ENDSTOPS || Z_PROBE_ALLEN_KEY) && !Z_PROBE_SLED
5439 5439
 
5440
-#if ENABLED(FILAMENT_SENSOR)
5440
+#if ENABLED(FILAMENT_WIDTH_SENSOR)
5441 5441
 
5442 5442
   /**
5443 5443
    * M404: Display or set the nominal filament width (3mm, 1.75mm ) W<3.0>
@@ -5491,7 +5491,7 @@ inline void gcode_M400() { st_synchronize(); }
5491 5491
     SERIAL_PROTOCOLLN(filament_width_meas);
5492 5492
   }
5493 5493
 
5494
-#endif // FILAMENT_SENSOR
5494
+#endif // FILAMENT_WIDTH_SENSOR
5495 5495
 
5496 5496
 /**
5497 5497
  * M410: Quickstop - Abort all planned moves
@@ -6533,7 +6533,7 @@ void process_next_command() {
6533 6533
           break;
6534 6534
       #endif // AUTO_BED_LEVELING_FEATURE && (HAS_SERVO_ENDSTOPS || Z_PROBE_ALLEN_KEY) && !Z_PROBE_SLED
6535 6535
 
6536
-      #if ENABLED(FILAMENT_SENSOR)
6536
+      #if ENABLED(FILAMENT_WIDTH_SENSOR)
6537 6537
         case 404:  //M404 Enter the nominal filament width (3mm, 1.75mm ) N<3.0> or display nominal filament width
6538 6538
           gcode_M404();
6539 6539
           break;
@@ -6546,7 +6546,7 @@ void process_next_command() {
6546 6546
         case 407:   //M407 Display measured filament diameter
6547 6547
           gcode_M407();
6548 6548
           break;
6549
-      #endif // FILAMENT_SENSOR
6549
+      #endif // ENABLED(FILAMENT_WIDTH_SENSOR)
6550 6550
 
6551 6551
       case 410: // M410 quickstop - Abort all the planned moves.
6552 6552
         gcode_M410();

+ 16
- 6
Marlin/SanityCheck.h 查看文件

@@ -159,9 +159,9 @@
159 159
  * Probes
160 160
  */
161 161
 
162
-  /**
163
-   * A probe needs a pin
164
-   */
162
+/**
163
+ * A probe needs a pin
164
+ */
165 165
 #if (!((HAS_Z_MIN && ENABLED(Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN)) || HAS_Z_PROBE )) && ( ENABLED(FIX_MOUNTED_PROBE) || defined(Z_ENDSTOP_SERVO_NR) || ENABLED(Z_PROBE_ALLEN_KEY) || ENABLED(Z_PROBE_SLED))
166 166
   #error A probe needs a pin! [Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN || HAS_Z_PROBE]
167 167
 #endif
@@ -170,9 +170,9 @@
170 170
   #error A probe should not be connected to more then one pin! [Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN || HAS_Z_PROBE]
171 171
 #endif
172 172
 
173
-  /**
174
-    * Require one kind of probe
175
-    */
173
+/**
174
+  * Require one kind of probe
175
+  */
176 176
 #if ENABLED(AUTO_BED_LEVELING_FEATURE) && !( ENABLED(FIX_MOUNTED_PROBE) || defined(Z_ENDSTOP_SERVO_NR) || ENABLED(Z_PROBE_ALLEN_KEY) || ENABLED(Z_PROBE_SLED))
177 177
   #error For AUTO_BED_LEVELING_FEATURE define one kind of probe! {Servo | Z_PROBE_ALLEN_KEY | Z_PROBE_SLED | FIX_MOUNTED_PROBE]
178 178
 #endif
@@ -266,6 +266,14 @@
266 266
 #endif // AUTO_BED_LEVELING_FEATURE
267 267
 
268 268
 /**
269
+ * Filament Width Sensor
270
+ */
271
+#if ENABLED(FILAMENT_WIDTH_SENSOR) && !HAS_FILAMENT_WIDTH_SENSOR
272
+  #error FILAMENT_WIDTH_SENSOR requires a FILWIDTH_PIN to be defined.
273
+#endif
274
+
275
+
276
+/**
269 277
  * ULTIPANEL encoder
270 278
  */
271 279
 #if ENABLED(ULTIPANEL) && DISABLED(NEWPANEL) && DISABLED(SR_LCD_2W_NL) && !defined(SHIFT_CLK)
@@ -436,6 +444,8 @@
436 444
   #error SDEXTRASLOW deprecated - set SPI_SPEED to SPI_QUARTER_SPEED instead
437 445
 #elif defined(Z_RAISE_BEFORE_HOMING)
438 446
   #error Z_RAISE_BEFORE_HOMING is deprecated. Use MIN_Z_HEIGHT_FOR_HOMING instead.
447
+#elif defined(FILAMENT_SENSOR)
448
+  #error FILAMENT_SENSOR is deprecated. Use FILAMENT_WIDTH_SENSOR instead.
439 449
 #endif
440 450
 
441 451
 #endif //SANITYCHECK_H

+ 2
- 2
Marlin/example_configurations/Felix/Configuration.h 查看文件

@@ -903,11 +903,11 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l
903 903
  * Note may require analog pins to be defined for different motherboards
904 904
  **********************************************************************/
905 905
 // Uncomment below to enable
906
-//#define FILAMENT_SENSOR
906
+//#define FILAMENT_WIDTH_SENSOR
907 907
 
908 908
 #define DEFAULT_NOMINAL_FILAMENT_DIA 3.00  //Enter the diameter (in mm) of the filament generally used (3.0 mm or 1.75 mm) - this is then used in the slicer software.  Used for sensor reading validation
909 909
 
910
-#if ENABLED(FILAMENT_SENSOR)
910
+#if ENABLED(FILAMENT_WIDTH_SENSOR)
911 911
   #define FILAMENT_SENSOR_EXTRUDER_NUM 0   //The number of the extruder that has the filament sensor (0,1,2)
912 912
   #define MEASUREMENT_DELAY_CM        14   //measurement delay in cm.  This is the distance from filament sensor to middle of barrel
913 913
 

+ 2
- 2
Marlin/example_configurations/Felix/Configuration_DUAL.h 查看文件

@@ -900,11 +900,11 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l
900 900
  * Note may require analog pins to be defined for different motherboards
901 901
  **********************************************************************/
902 902
 // Uncomment below to enable
903
-//#define FILAMENT_SENSOR
903
+//#define FILAMENT_WIDTH_SENSOR
904 904
 
905 905
 #define DEFAULT_NOMINAL_FILAMENT_DIA 3.00  //Enter the diameter (in mm) of the filament generally used (3.0 mm or 1.75 mm) - this is then used in the slicer software.  Used for sensor reading validation
906 906
 
907
-#if ENABLED(FILAMENT_SENSOR)
907
+#if ENABLED(FILAMENT_WIDTH_SENSOR)
908 908
   #define FILAMENT_SENSOR_EXTRUDER_NUM 0   //The number of the extruder that has the filament sensor (0,1,2)
909 909
   #define MEASUREMENT_DELAY_CM        14   //measurement delay in cm.  This is the distance from filament sensor to middle of barrel
910 910
 

+ 2
- 2
Marlin/example_configurations/Hephestos/Configuration.h 查看文件

@@ -915,11 +915,11 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = true; // set to true to invert the lo
915 915
  * Note may require analog pins to be defined for different motherboards
916 916
  **********************************************************************/
917 917
 // Uncomment below to enable
918
-//#define FILAMENT_SENSOR
918
+//#define FILAMENT_WIDTH_SENSOR
919 919
 
920 920
 #define DEFAULT_NOMINAL_FILAMENT_DIA 3.00  //Enter the diameter (in mm) of the filament generally used (3.0 mm or 1.75 mm) - this is then used in the slicer software.  Used for sensor reading validation
921 921
 
922
-#if ENABLED(FILAMENT_SENSOR)
922
+#if ENABLED(FILAMENT_WIDTH_SENSOR)
923 923
   #define FILAMENT_SENSOR_EXTRUDER_NUM 0   //The number of the extruder that has the filament sensor (0,1,2)
924 924
   #define MEASUREMENT_DELAY_CM        14   //measurement delay in cm.  This is the distance from filament sensor to middle of barrel
925 925
 

+ 2
- 2
Marlin/example_configurations/Hephestos_2/Configuration.h 查看文件

@@ -917,11 +917,11 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l
917 917
  * Note may require analog pins to be defined for different motherboards
918 918
  **********************************************************************/
919 919
 // Uncomment below to enable
920
-//#define FILAMENT_SENSOR
920
+//#define FILAMENT_WIDTH_SENSOR
921 921
 
922 922
 #define DEFAULT_NOMINAL_FILAMENT_DIA 1.75  //Enter the diameter (in mm) of the filament generally used (3.0 mm or 1.75 mm) - this is then used in the slicer software.  Used for sensor reading validation
923 923
 
924
-#if ENABLED(FILAMENT_SENSOR)
924
+#if ENABLED(FILAMENT_WIDTH_SENSOR)
925 925
   #define FILAMENT_SENSOR_EXTRUDER_NUM 0   //The number of the extruder that has the filament sensor (0,1,2)
926 926
   #define MEASUREMENT_DELAY_CM        14   //measurement delay in cm.  This is the distance from filament sensor to middle of barrel
927 927
 

+ 2
- 2
Marlin/example_configurations/K8200/Configuration.h 查看文件

@@ -937,11 +937,11 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l
937 937
  * Note may require analog pins to be defined for different motherboards
938 938
  **********************************************************************/
939 939
 // Uncomment below to enable
940
-//#define FILAMENT_SENSOR
940
+//#define FILAMENT_WIDTH_SENSOR
941 941
 
942 942
 #define DEFAULT_NOMINAL_FILAMENT_DIA 3.00  //Enter the diameter (in mm) of the filament generally used (3.0 mm or 1.75 mm) - this is then used in the slicer software.  Used for sensor reading validation
943 943
 
944
-#if ENABLED(FILAMENT_SENSOR)
944
+#if ENABLED(FILAMENT_WIDTH_SENSOR)
945 945
   #define FILAMENT_SENSOR_EXTRUDER_NUM 0   //The number of the extruder that has the filament sensor (0,1,2)
946 946
   #define MEASUREMENT_DELAY_CM        14   //measurement delay in cm.  This is the distance from filament sensor to middle of barrel
947 947
 

+ 2
- 2
Marlin/example_configurations/RepRapWorld/Megatronics/Configuration.h 查看文件

@@ -920,11 +920,11 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l
920 920
  * Note may require analog pins to be defined for different motherboards
921 921
  **********************************************************************/
922 922
 // Uncomment below to enable
923
-//#define FILAMENT_SENSOR
923
+//#define FILAMENT_WIDTH_SENSOR
924 924
 
925 925
 #define DEFAULT_NOMINAL_FILAMENT_DIA 3.00  //Enter the diameter (in mm) of the filament generally used (3.0 mm or 1.75 mm) - this is then used in the slicer software.  Used for sensor reading validation
926 926
 
927
-#if ENABLED(FILAMENT_SENSOR)
927
+#if ENABLED(FILAMENT_WIDTH_SENSOR)
928 928
   #define FILAMENT_SENSOR_EXTRUDER_NUM 0   //The number of the extruder that has the filament sensor (0,1,2)
929 929
   #define MEASUREMENT_DELAY_CM        14   //measurement delay in cm.  This is the distance from filament sensor to middle of barrel
930 930
 

+ 2
- 2
Marlin/example_configurations/RigidBot/Configuration.h 查看文件

@@ -922,11 +922,11 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l
922 922
  * Note may require analog pins to be defined for different motherboards
923 923
  **********************************************************************/
924 924
 // Uncomment below to enable
925
-//#define FILAMENT_SENSOR
925
+//#define FILAMENT_WIDTH_SENSOR
926 926
 
927 927
 #define DEFAULT_NOMINAL_FILAMENT_DIA 3.00  //Enter the diameter (in mm) of the filament generally used (3.0 mm or 1.75 mm) - this is then used in the slicer software.  Used for sensor reading validation
928 928
 
929
-#if ENABLED(FILAMENT_SENSOR)
929
+#if ENABLED(FILAMENT_WIDTH_SENSOR)
930 930
   #define FILAMENT_SENSOR_EXTRUDER_NUM 0   //The number of the extruder that has the filament sensor (0,1,2)
931 931
   #define MEASUREMENT_DELAY_CM        14   //measurement delay in cm.  This is the distance from filament sensor to middle of barrel
932 932
 

+ 2
- 2
Marlin/example_configurations/SCARA/Configuration.h 查看文件

@@ -928,11 +928,11 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l
928 928
  * Note may require analog pins to be defined for different motherboards
929 929
  **********************************************************************/
930 930
 // Uncomment below to enable
931
-//#define FILAMENT_SENSOR
931
+//#define FILAMENT_WIDTH_SENSOR
932 932
 
933 933
 #define DEFAULT_NOMINAL_FILAMENT_DIA 3.00  //Enter the diameter (in mm) of the filament generally used (3.0 mm or 1.75 mm) - this is then used in the slicer software.  Used for sensor reading validation
934 934
 
935
-#if ENABLED(FILAMENT_SENSOR)
935
+#if ENABLED(FILAMENT_WIDTH_SENSOR)
936 936
   #define FILAMENT_SENSOR_EXTRUDER_NUM 0   //The number of the extruder that has the filament sensor (0,1,2)
937 937
   #define MEASUREMENT_DELAY_CM        14   //measurement delay in cm.  This is the distance from filament sensor to middle of barrel
938 938
 

+ 2
- 2
Marlin/example_configurations/TAZ4/Configuration.h 查看文件

@@ -941,11 +941,11 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l
941 941
  * Note may require analog pins to be defined for different motherboards
942 942
  **********************************************************************/
943 943
 // Uncomment below to enable
944
-//#define FILAMENT_SENSOR
944
+//#define FILAMENT_WIDTH_SENSOR
945 945
 
946 946
 #define DEFAULT_NOMINAL_FILAMENT_DIA 3.00  //Enter the diameter (in mm) of the filament generally used (3.0 mm or 1.75 mm) - this is then used in the slicer software.  Used for sensor reading validation
947 947
 
948
-#if ENABLED(FILAMENT_SENSOR)
948
+#if ENABLED(FILAMENT_WIDTH_SENSOR)
949 949
   #define FILAMENT_SENSOR_EXTRUDER_NUM 0   //The number of the extruder that has the filament sensor (0,1,2)
950 950
   #define MEASUREMENT_DELAY_CM        14   //measurement delay in cm.  This is the distance from filament sensor to middle of barrel
951 951
 

+ 2
- 2
Marlin/example_configurations/WITBOX/Configuration.h 查看文件

@@ -912,11 +912,11 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = true; // set to true to invert the lo
912 912
  * Note may require analog pins to be defined for different motherboards
913 913
  **********************************************************************/
914 914
 // Uncomment below to enable
915
-//#define FILAMENT_SENSOR
915
+//#define FILAMENT_WIDTH_SENSOR
916 916
 
917 917
 #define DEFAULT_NOMINAL_FILAMENT_DIA 3.00  //Enter the diameter (in mm) of the filament generally used (3.0 mm or 1.75 mm) - this is then used in the slicer software.  Used for sensor reading validation
918 918
 
919
-#if ENABLED(FILAMENT_SENSOR)
919
+#if ENABLED(FILAMENT_WIDTH_SENSOR)
920 920
   #define FILAMENT_SENSOR_EXTRUDER_NUM 0   //The number of the extruder that has the filament sensor (0,1,2)
921 921
   #define MEASUREMENT_DELAY_CM        14   //measurement delay in cm.  This is the distance from filament sensor to middle of barrel
922 922
 

+ 2
- 2
Marlin/example_configurations/adafruit/ST7565/Configuration.h 查看文件

@@ -920,11 +920,11 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l
920 920
  * Note may require analog pins to be defined for different motherboards
921 921
  **********************************************************************/
922 922
 // Uncomment below to enable
923
-//#define FILAMENT_SENSOR
923
+//#define FILAMENT_WIDTH_SENSOR
924 924
 
925 925
 #define DEFAULT_NOMINAL_FILAMENT_DIA 3.00  //Enter the diameter (in mm) of the filament generally used (3.0 mm or 1.75 mm) - this is then used in the slicer software.  Used for sensor reading validation
926 926
 
927
-#if ENABLED(FILAMENT_SENSOR)
927
+#if ENABLED(FILAMENT_WIDTH_SENSOR)
928 928
   #define FILAMENT_SENSOR_EXTRUDER_NUM 0   //The number of the extruder that has the filament sensor (0,1,2)
929 929
   #define MEASUREMENT_DELAY_CM        14   //measurement delay in cm.  This is the distance from filament sensor to middle of barrel
930 930
 

+ 2
- 2
Marlin/example_configurations/delta/biv2.5/Configuration.h 查看文件

@@ -1049,11 +1049,11 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = true; // set to true to invert the lo
1049 1049
  * Note may require analog pins to be defined for different motherboards
1050 1050
  **********************************************************************/
1051 1051
 // Uncomment below to enable
1052
-//#define FILAMENT_SENSOR
1052
+//#define FILAMENT_WIDTH_SENSOR
1053 1053
 
1054 1054
 #define DEFAULT_NOMINAL_FILAMENT_DIA 1.75  //Enter the diameter (in mm) of the filament generally used (3.0 mm or 1.75 mm) - this is then used in the slicer software.  Used for sensor reading validation
1055 1055
 
1056
-#if ENABLED(FILAMENT_SENSOR)
1056
+#if ENABLED(FILAMENT_WIDTH_SENSOR)
1057 1057
   #define FILAMENT_SENSOR_EXTRUDER_NUM 0   //The number of the extruder that has the filament sensor (0,1,2)
1058 1058
   #define MEASUREMENT_DELAY_CM        14   //measurement delay in cm.  This is the distance from filament sensor to middle of barrel
1059 1059
 

+ 2
- 2
Marlin/example_configurations/delta/generic/Configuration.h 查看文件

@@ -1049,11 +1049,11 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = true; // set to true to invert the lo
1049 1049
  * Note may require analog pins to be defined for different motherboards
1050 1050
  **********************************************************************/
1051 1051
 // Uncomment below to enable
1052
-//#define FILAMENT_SENSOR
1052
+//#define FILAMENT_WIDTH_SENSOR
1053 1053
 
1054 1054
 #define DEFAULT_NOMINAL_FILAMENT_DIA 3.00  //Enter the diameter (in mm) of the filament generally used (3.0 mm or 1.75 mm) - this is then used in the slicer software.  Used for sensor reading validation
1055 1055
 
1056
-#if ENABLED(FILAMENT_SENSOR)
1056
+#if ENABLED(FILAMENT_WIDTH_SENSOR)
1057 1057
   #define FILAMENT_SENSOR_EXTRUDER_NUM 0   //The number of the extruder that has the filament sensor (0,1,2)
1058 1058
   #define MEASUREMENT_DELAY_CM        14   //measurement delay in cm.  This is the distance from filament sensor to middle of barrel
1059 1059
 

+ 2
- 2
Marlin/example_configurations/delta/kossel_mini/Configuration.h 查看文件

@@ -1053,11 +1053,11 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l
1053 1053
  * Note may require analog pins to be defined for different motherboards
1054 1054
  **********************************************************************/
1055 1055
 // Uncomment below to enable
1056
-//#define FILAMENT_SENSOR
1056
+//#define FILAMENT_WIDTH_SENSOR
1057 1057
 
1058 1058
 #define DEFAULT_NOMINAL_FILAMENT_DIA 3.00  //Enter the diameter (in mm) of the filament generally used (3.0 mm or 1.75 mm) - this is then used in the slicer software.  Used for sensor reading validation
1059 1059
 
1060
-#if ENABLED(FILAMENT_SENSOR)
1060
+#if ENABLED(FILAMENT_WIDTH_SENSOR)
1061 1061
   #define FILAMENT_SENSOR_EXTRUDER_NUM 0   //The number of the extruder that has the filament sensor (0,1,2)
1062 1062
   #define MEASUREMENT_DELAY_CM        14   //measurement delay in cm.  This is the distance from filament sensor to middle of barrel
1063 1063
 

+ 2
- 2
Marlin/example_configurations/delta/kossel_pro/Configuration.h 查看文件

@@ -1046,11 +1046,11 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l
1046 1046
  * Note may require analog pins to be defined for different motherboards
1047 1047
  **********************************************************************/
1048 1048
 // Uncomment below to enable
1049
-//#define FILAMENT_SENSOR
1049
+//#define FILAMENT_WIDTH_SENSOR
1050 1050
 
1051 1051
 #define DEFAULT_NOMINAL_FILAMENT_DIA 3.00  //Enter the diameter (in mm) of the filament generally used (3.0 mm or 1.75 mm) - this is then used in the slicer software.  Used for sensor reading validation
1052 1052
 
1053
-#if ENABLED(FILAMENT_SENSOR)
1053
+#if ENABLED(FILAMENT_WIDTH_SENSOR)
1054 1054
   #define FILAMENT_SENSOR_EXTRUDER_NUM 0   //The number of the extruder that has the filament sensor (0,1,2)
1055 1055
   #define MEASUREMENT_DELAY_CM        14   //measurement delay in cm.  This is the distance from filament sensor to middle of barrel
1056 1056
 

+ 2
- 2
Marlin/example_configurations/delta/kossel_xl/Configuration.h 查看文件

@@ -956,11 +956,11 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l
956 956
  * Note may require analog pins to be defined for different motherboards
957 957
  **********************************************************************/
958 958
 // Uncomment below to enable
959
-//#define FILAMENT_SENSOR
959
+//#define FILAMENT_WIDTH_SENSOR
960 960
 
961 961
 #define DEFAULT_NOMINAL_FILAMENT_DIA 1.75  //Enter the diameter (in mm) of the filament generally used (3.0 mm or 1.75 mm) - this is then used in the slicer software.  Used for sensor reading validation
962 962
 
963
-#if ENABLED(FILAMENT_SENSOR)
963
+#if ENABLED(FILAMENT_WIDTH_SENSOR)
964 964
   #define FILAMENT_SENSOR_EXTRUDER_NUM 0   //The number of the extruder that has the filament sensor (0,1,2)
965 965
   #define MEASUREMENT_DELAY_CM        14   //measurement delay in cm.  This is the distance from filament sensor to middle of barrel
966 966
 

+ 2
- 2
Marlin/example_configurations/makibox/Configuration.h 查看文件

@@ -923,11 +923,11 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l
923 923
  * Note may require analog pins to be defined for different motherboards
924 924
  **********************************************************************/
925 925
 // Uncomment below to enable
926
-//#define FILAMENT_SENSOR
926
+//#define FILAMENT_WIDTH_SENSOR
927 927
 
928 928
 #define DEFAULT_NOMINAL_FILAMENT_DIA 3.00  //Enter the diameter (in mm) of the filament generally used (3.0 mm or 1.75 mm) - this is then used in the slicer software.  Used for sensor reading validation
929 929
 
930
-#if ENABLED(FILAMENT_SENSOR)
930
+#if ENABLED(FILAMENT_WIDTH_SENSOR)
931 931
   #define FILAMENT_SENSOR_EXTRUDER_NUM 0   //The number of the extruder that has the filament sensor (0,1,2)
932 932
   #define MEASUREMENT_DELAY_CM        14   //measurement delay in cm.  This is the distance from filament sensor to middle of barrel
933 933
 

+ 2
- 2
Marlin/example_configurations/tvrrug/Round2/Configuration.h 查看文件

@@ -914,11 +914,11 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = true; // set to true to invert the lo
914 914
  * Note may require analog pins to be defined for different motherboards
915 915
  **********************************************************************/
916 916
 // Uncomment below to enable
917
-//#define FILAMENT_SENSOR
917
+//#define FILAMENT_WIDTH_SENSOR
918 918
 
919 919
 #define DEFAULT_NOMINAL_FILAMENT_DIA 3.00  //Enter the diameter (in mm) of the filament generally used (3.0 mm or 1.75 mm) - this is then used in the slicer software.  Used for sensor reading validation
920 920
 
921
-#if ENABLED(FILAMENT_SENSOR)
921
+#if ENABLED(FILAMENT_WIDTH_SENSOR)
922 922
   #define FILAMENT_SENSOR_EXTRUDER_NUM 0   //The number of the extruder that has the filament sensor (0,1,2)
923 923
   #define MEASUREMENT_DELAY_CM        14   //measurement delay in cm.  This is the distance from filament sensor to middle of barrel
924 924
 

+ 1
- 1
Marlin/planner.cpp 查看文件

@@ -851,7 +851,7 @@ float junction_deviation = 0.1;
851 851
   block->nominal_speed = block->millimeters * inverse_second; // (mm/sec) Always > 0
852 852
   block->nominal_rate = ceil(block->step_event_count * inverse_second); // (step/sec) Always > 0
853 853
 
854
-  #if ENABLED(FILAMENT_SENSOR)
854
+  #if ENABLED(FILAMENT_WIDTH_SENSOR)
855 855
     //FMM update ring buffer used for delay with filament measurements
856 856
     if (extruder == FILAMENT_SENSOR_EXTRUDER_NUM && delay_index2 > -1) {  //only for extruder with filament sensor and if ring buffer is initialized
857 857
 

+ 11
- 11
Marlin/temperature.cpp 查看文件

@@ -93,7 +93,7 @@ unsigned char soft_pwm_bed;
93 93
   volatile int babystepsTodo[3] = { 0 };
94 94
 #endif
95 95
 
96
-#if ENABLED(FILAMENT_SENSOR)
96
+#if ENABLED(FILAMENT_WIDTH_SENSOR)
97 97
   int current_raw_filwidth = 0;  //Holds measured filament diameter - one extruder only
98 98
 #endif
99 99
 
@@ -209,7 +209,7 @@ static void updateTemperaturesFromRawValues();
209 209
   #define SOFT_PWM_SCALE 0
210 210
 #endif
211 211
 
212
-#if ENABLED(FILAMENT_SENSOR)
212
+#if ENABLED(FILAMENT_WIDTH_SENSOR)
213 213
   static int meas_shift_index;  //used to point to a delayed sample in buffer for filament width sensor
214 214
 #endif
215 215
 
@@ -703,7 +703,7 @@ void manage_heater() {
703 703
   #endif
704 704
 
705 705
   // Control the extruder rate based on the width sensor
706
-  #if ENABLED(FILAMENT_SENSOR)
706
+  #if ENABLED(FILAMENT_WIDTH_SENSOR)
707 707
     if (filament_sensor) {
708 708
       meas_shift_index = delay_index1 - meas_delay_cm;
709 709
       if (meas_shift_index < 0) meas_shift_index += MAX_MEASUREMENT_DELAY + 1;  //loop around buffer if needed
@@ -715,7 +715,7 @@ void manage_heater() {
715 715
       NOLESS(vm, 0.01);
716 716
       volumetric_multiplier[FILAMENT_SENSOR_EXTRUDER_NUM] = vm;
717 717
     }
718
-  #endif //FILAMENT_SENSOR
718
+  #endif //FILAMENT_WIDTH_SENSOR
719 719
 
720 720
   #if DISABLED(PIDTEMPBED)
721 721
     if (ms < next_bed_check_ms) return;
@@ -849,7 +849,7 @@ static void updateTemperaturesFromRawValues() {
849 849
   #if ENABLED(TEMP_SENSOR_1_AS_REDUNDANT)
850 850
     redundant_temperature = analog2temp(redundant_temperature_raw, 1);
851 851
   #endif
852
-  #if HAS_FILAMENT_SENSOR
852
+  #if ENABLED(FILAMENT_WIDTH_SENSOR)
853 853
     filament_width_meas = analog2widthFil();
854 854
   #endif
855 855
 
@@ -864,7 +864,7 @@ static void updateTemperaturesFromRawValues() {
864 864
 }
865 865
 
866 866
 
867
-#if ENABLED(FILAMENT_SENSOR)
867
+#if ENABLED(FILAMENT_WIDTH_SENSOR)
868 868
 
869 869
   // Convert raw Filament Width to millimeters
870 870
   float analog2widthFil() {
@@ -1003,7 +1003,7 @@ void tp_init() {
1003 1003
   #if HAS_TEMP_BED
1004 1004
     ANALOG_SELECT(TEMP_BED_PIN);
1005 1005
   #endif
1006
-  #if HAS_FILAMENT_SENSOR
1006
+  #if ENABLED(FILAMENT_WIDTH_SENSOR)
1007 1007
     ANALOG_SELECT(FILWIDTH_PIN);
1008 1008
   #endif
1009 1009
 
@@ -1354,7 +1354,7 @@ ISR(TIMER0_COMPB_vect) {
1354 1354
     ISR_STATICS(BED);
1355 1355
   #endif
1356 1356
 
1357
-  #if HAS_FILAMENT_SENSOR
1357
+  #if ENABLED(FILAMENT_WIDTH_SENSOR)
1358 1358
     static unsigned long raw_filwidth_value = 0;
1359 1359
   #endif
1360 1360
 
@@ -1636,14 +1636,14 @@ ISR(TIMER0_COMPB_vect) {
1636 1636
       break;
1637 1637
 
1638 1638
     case Prepare_FILWIDTH:
1639
-      #if HAS_FILAMENT_SENSOR
1639
+      #if ENABLED(FILAMENT_WIDTH_SENSOR)
1640 1640
         START_ADC(FILWIDTH_PIN);
1641 1641
       #endif
1642 1642
       lcd_buttons_update();
1643 1643
       temp_state = Measure_FILWIDTH;
1644 1644
       break;
1645 1645
     case Measure_FILWIDTH:
1646
-      #if HAS_FILAMENT_SENSOR
1646
+      #if ENABLED(FILAMENT_WIDTH_SENSOR)
1647 1647
         // raw_filwidth_value += ADC;  //remove to use an IIR filter approach
1648 1648
         if (ADC > 102) { //check that ADC is reading a voltage > 0.5 volts, otherwise don't take in the data.
1649 1649
           raw_filwidth_value -= (raw_filwidth_value >> 7); //multiply raw_filwidth_value by 127/128
@@ -1669,7 +1669,7 @@ ISR(TIMER0_COMPB_vect) {
1669 1669
     if (!temp_meas_ready) set_current_temp_raw();
1670 1670
 
1671 1671
     // Filament Sensor - can be read any time since IIR filtering is used
1672
-    #if HAS_FILAMENT_SENSOR
1672
+    #if ENABLED(FILAMENT_WIDTH_SENSOR)
1673 1673
       current_raw_filwidth = raw_filwidth_value >> 10;  // Divide to get to 0-16384 range since we used 1/128 IIR filter approach
1674 1674
     #endif
1675 1675
 

+ 1
- 1
Marlin/temperature.h 查看文件

@@ -53,7 +53,7 @@
53 53
 void tp_init();  //initialize the heating
54 54
 void manage_heater(); //it is critical that this is called periodically.
55 55
 
56
-#if ENABLED(FILAMENT_SENSOR)
56
+#if ENABLED(FILAMENT_WIDTH_SENSOR)
57 57
   // For converting raw Filament Width to milimeters
58 58
   float analog2widthFil();
59 59
 

Loading…
取消
儲存