Browse Source

FILAMENT_SENSOR -> FILAMENT_WIDTH_SENSOR

Scott Lahteine 8 years ago
parent
commit
1a79b13b7a

+ 2
- 2
.travis.yml View File

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

+ 1
- 1
Marlin/Conditionals.h View File

513
   #define HAS_SERVO_1 (PIN_EXISTS(SERVO1))
513
   #define HAS_SERVO_1 (PIN_EXISTS(SERVO1))
514
   #define HAS_SERVO_2 (PIN_EXISTS(SERVO2))
514
   #define HAS_SERVO_2 (PIN_EXISTS(SERVO2))
515
   #define HAS_SERVO_3 (PIN_EXISTS(SERVO3))
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
   #define HAS_FILRUNOUT (PIN_EXISTS(FILRUNOUT))
517
   #define HAS_FILRUNOUT (PIN_EXISTS(FILRUNOUT))
518
   #define HAS_HOME (PIN_EXISTS(HOME))
518
   #define HAS_HOME (PIN_EXISTS(HOME))
519
   #define HAS_KILL (PIN_EXISTS(KILL))
519
   #define HAS_KILL (PIN_EXISTS(KILL))

+ 2
- 2
Marlin/Configuration.h View File

920
  * Note may require analog pins to be defined for different motherboards
920
  * Note may require analog pins to be defined for different motherboards
921
  **********************************************************************/
921
  **********************************************************************/
922
 // Uncomment below to enable
922
 // Uncomment below to enable
923
-//#define FILAMENT_SENSOR
923
+//#define FILAMENT_WIDTH_SENSOR
924
 
924
 
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
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
   #define FILAMENT_SENSOR_EXTRUDER_NUM 0   //The number of the extruder that has the filament sensor (0,1,2)
928
   #define FILAMENT_SENSOR_EXTRUDER_NUM 0   //The number of the extruder that has the filament sensor (0,1,2)
929
   #define MEASUREMENT_DELAY_CM        14   //measurement delay in cm.  This is the distance from filament sensor to middle of barrel
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 View File

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

+ 5
- 5
Marlin/Marlin_main.cpp View File

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

+ 16
- 6
Marlin/SanityCheck.h View File

159
  * Probes
159
  * Probes
160
  */
160
  */
161
 
161
 
162
-  /**
163
-   * A probe needs a pin
164
-   */
162
+/**
163
+ * A probe needs a pin
164
+ */
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))
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
   #error A probe needs a pin! [Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN || HAS_Z_PROBE]
166
   #error A probe needs a pin! [Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN || HAS_Z_PROBE]
167
 #endif
167
 #endif
170
   #error A probe should not be connected to more then one pin! [Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN || HAS_Z_PROBE]
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
 #endif
171
 #endif
172
 
172
 
173
-  /**
174
-    * Require one kind of probe
175
-    */
173
+/**
174
+  * Require one kind of probe
175
+  */
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))
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
   #error For AUTO_BED_LEVELING_FEATURE define one kind of probe! {Servo | Z_PROBE_ALLEN_KEY | Z_PROBE_SLED | FIX_MOUNTED_PROBE]
177
   #error For AUTO_BED_LEVELING_FEATURE define one kind of probe! {Servo | Z_PROBE_ALLEN_KEY | Z_PROBE_SLED | FIX_MOUNTED_PROBE]
178
 #endif
178
 #endif
266
 #endif // AUTO_BED_LEVELING_FEATURE
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
  * ULTIPANEL encoder
277
  * ULTIPANEL encoder
270
  */
278
  */
271
 #if ENABLED(ULTIPANEL) && DISABLED(NEWPANEL) && DISABLED(SR_LCD_2W_NL) && !defined(SHIFT_CLK)
279
 #if ENABLED(ULTIPANEL) && DISABLED(NEWPANEL) && DISABLED(SR_LCD_2W_NL) && !defined(SHIFT_CLK)
436
   #error SDEXTRASLOW deprecated - set SPI_SPEED to SPI_QUARTER_SPEED instead
444
   #error SDEXTRASLOW deprecated - set SPI_SPEED to SPI_QUARTER_SPEED instead
437
 #elif defined(Z_RAISE_BEFORE_HOMING)
445
 #elif defined(Z_RAISE_BEFORE_HOMING)
438
   #error Z_RAISE_BEFORE_HOMING is deprecated. Use MIN_Z_HEIGHT_FOR_HOMING instead.
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
 #endif
449
 #endif
440
 
450
 
441
 #endif //SANITYCHECK_H
451
 #endif //SANITYCHECK_H

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

903
  * Note may require analog pins to be defined for different motherboards
903
  * Note may require analog pins to be defined for different motherboards
904
  **********************************************************************/
904
  **********************************************************************/
905
 // Uncomment below to enable
905
 // Uncomment below to enable
906
-//#define FILAMENT_SENSOR
906
+//#define FILAMENT_WIDTH_SENSOR
907
 
907
 
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
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
   #define FILAMENT_SENSOR_EXTRUDER_NUM 0   //The number of the extruder that has the filament sensor (0,1,2)
911
   #define FILAMENT_SENSOR_EXTRUDER_NUM 0   //The number of the extruder that has the filament sensor (0,1,2)
912
   #define MEASUREMENT_DELAY_CM        14   //measurement delay in cm.  This is the distance from filament sensor to middle of barrel
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 View File

900
  * Note may require analog pins to be defined for different motherboards
900
  * Note may require analog pins to be defined for different motherboards
901
  **********************************************************************/
901
  **********************************************************************/
902
 // Uncomment below to enable
902
 // Uncomment below to enable
903
-//#define FILAMENT_SENSOR
903
+//#define FILAMENT_WIDTH_SENSOR
904
 
904
 
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
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
   #define FILAMENT_SENSOR_EXTRUDER_NUM 0   //The number of the extruder that has the filament sensor (0,1,2)
908
   #define FILAMENT_SENSOR_EXTRUDER_NUM 0   //The number of the extruder that has the filament sensor (0,1,2)
909
   #define MEASUREMENT_DELAY_CM        14   //measurement delay in cm.  This is the distance from filament sensor to middle of barrel
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 View File

915
  * Note may require analog pins to be defined for different motherboards
915
  * Note may require analog pins to be defined for different motherboards
916
  **********************************************************************/
916
  **********************************************************************/
917
 // Uncomment below to enable
917
 // Uncomment below to enable
918
-//#define FILAMENT_SENSOR
918
+//#define FILAMENT_WIDTH_SENSOR
919
 
919
 
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
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
   #define FILAMENT_SENSOR_EXTRUDER_NUM 0   //The number of the extruder that has the filament sensor (0,1,2)
923
   #define FILAMENT_SENSOR_EXTRUDER_NUM 0   //The number of the extruder that has the filament sensor (0,1,2)
924
   #define MEASUREMENT_DELAY_CM        14   //measurement delay in cm.  This is the distance from filament sensor to middle of barrel
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 View File

917
  * Note may require analog pins to be defined for different motherboards
917
  * Note may require analog pins to be defined for different motherboards
918
  **********************************************************************/
918
  **********************************************************************/
919
 // Uncomment below to enable
919
 // Uncomment below to enable
920
-//#define FILAMENT_SENSOR
920
+//#define FILAMENT_WIDTH_SENSOR
921
 
921
 
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
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
   #define FILAMENT_SENSOR_EXTRUDER_NUM 0   //The number of the extruder that has the filament sensor (0,1,2)
925
   #define FILAMENT_SENSOR_EXTRUDER_NUM 0   //The number of the extruder that has the filament sensor (0,1,2)
926
   #define MEASUREMENT_DELAY_CM        14   //measurement delay in cm.  This is the distance from filament sensor to middle of barrel
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 View File

937
  * Note may require analog pins to be defined for different motherboards
937
  * Note may require analog pins to be defined for different motherboards
938
  **********************************************************************/
938
  **********************************************************************/
939
 // Uncomment below to enable
939
 // Uncomment below to enable
940
-//#define FILAMENT_SENSOR
940
+//#define FILAMENT_WIDTH_SENSOR
941
 
941
 
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
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
   #define FILAMENT_SENSOR_EXTRUDER_NUM 0   //The number of the extruder that has the filament sensor (0,1,2)
945
   #define FILAMENT_SENSOR_EXTRUDER_NUM 0   //The number of the extruder that has the filament sensor (0,1,2)
946
   #define MEASUREMENT_DELAY_CM        14   //measurement delay in cm.  This is the distance from filament sensor to middle of barrel
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 View File

920
  * Note may require analog pins to be defined for different motherboards
920
  * Note may require analog pins to be defined for different motherboards
921
  **********************************************************************/
921
  **********************************************************************/
922
 // Uncomment below to enable
922
 // Uncomment below to enable
923
-//#define FILAMENT_SENSOR
923
+//#define FILAMENT_WIDTH_SENSOR
924
 
924
 
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
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
   #define FILAMENT_SENSOR_EXTRUDER_NUM 0   //The number of the extruder that has the filament sensor (0,1,2)
928
   #define FILAMENT_SENSOR_EXTRUDER_NUM 0   //The number of the extruder that has the filament sensor (0,1,2)
929
   #define MEASUREMENT_DELAY_CM        14   //measurement delay in cm.  This is the distance from filament sensor to middle of barrel
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 View File

922
  * Note may require analog pins to be defined for different motherboards
922
  * Note may require analog pins to be defined for different motherboards
923
  **********************************************************************/
923
  **********************************************************************/
924
 // Uncomment below to enable
924
 // Uncomment below to enable
925
-//#define FILAMENT_SENSOR
925
+//#define FILAMENT_WIDTH_SENSOR
926
 
926
 
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
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
   #define FILAMENT_SENSOR_EXTRUDER_NUM 0   //The number of the extruder that has the filament sensor (0,1,2)
930
   #define FILAMENT_SENSOR_EXTRUDER_NUM 0   //The number of the extruder that has the filament sensor (0,1,2)
931
   #define MEASUREMENT_DELAY_CM        14   //measurement delay in cm.  This is the distance from filament sensor to middle of barrel
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 View File

928
  * Note may require analog pins to be defined for different motherboards
928
  * Note may require analog pins to be defined for different motherboards
929
  **********************************************************************/
929
  **********************************************************************/
930
 // Uncomment below to enable
930
 // Uncomment below to enable
931
-//#define FILAMENT_SENSOR
931
+//#define FILAMENT_WIDTH_SENSOR
932
 
932
 
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
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
   #define FILAMENT_SENSOR_EXTRUDER_NUM 0   //The number of the extruder that has the filament sensor (0,1,2)
936
   #define FILAMENT_SENSOR_EXTRUDER_NUM 0   //The number of the extruder that has the filament sensor (0,1,2)
937
   #define MEASUREMENT_DELAY_CM        14   //measurement delay in cm.  This is the distance from filament sensor to middle of barrel
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 View File

941
  * Note may require analog pins to be defined for different motherboards
941
  * Note may require analog pins to be defined for different motherboards
942
  **********************************************************************/
942
  **********************************************************************/
943
 // Uncomment below to enable
943
 // Uncomment below to enable
944
-//#define FILAMENT_SENSOR
944
+//#define FILAMENT_WIDTH_SENSOR
945
 
945
 
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
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
   #define FILAMENT_SENSOR_EXTRUDER_NUM 0   //The number of the extruder that has the filament sensor (0,1,2)
949
   #define FILAMENT_SENSOR_EXTRUDER_NUM 0   //The number of the extruder that has the filament sensor (0,1,2)
950
   #define MEASUREMENT_DELAY_CM        14   //measurement delay in cm.  This is the distance from filament sensor to middle of barrel
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 View File

912
  * Note may require analog pins to be defined for different motherboards
912
  * Note may require analog pins to be defined for different motherboards
913
  **********************************************************************/
913
  **********************************************************************/
914
 // Uncomment below to enable
914
 // Uncomment below to enable
915
-//#define FILAMENT_SENSOR
915
+//#define FILAMENT_WIDTH_SENSOR
916
 
916
 
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
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
   #define FILAMENT_SENSOR_EXTRUDER_NUM 0   //The number of the extruder that has the filament sensor (0,1,2)
920
   #define FILAMENT_SENSOR_EXTRUDER_NUM 0   //The number of the extruder that has the filament sensor (0,1,2)
921
   #define MEASUREMENT_DELAY_CM        14   //measurement delay in cm.  This is the distance from filament sensor to middle of barrel
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 View File

920
  * Note may require analog pins to be defined for different motherboards
920
  * Note may require analog pins to be defined for different motherboards
921
  **********************************************************************/
921
  **********************************************************************/
922
 // Uncomment below to enable
922
 // Uncomment below to enable
923
-//#define FILAMENT_SENSOR
923
+//#define FILAMENT_WIDTH_SENSOR
924
 
924
 
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
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
   #define FILAMENT_SENSOR_EXTRUDER_NUM 0   //The number of the extruder that has the filament sensor (0,1,2)
928
   #define FILAMENT_SENSOR_EXTRUDER_NUM 0   //The number of the extruder that has the filament sensor (0,1,2)
929
   #define MEASUREMENT_DELAY_CM        14   //measurement delay in cm.  This is the distance from filament sensor to middle of barrel
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 View File

1049
  * Note may require analog pins to be defined for different motherboards
1049
  * Note may require analog pins to be defined for different motherboards
1050
  **********************************************************************/
1050
  **********************************************************************/
1051
 // Uncomment below to enable
1051
 // Uncomment below to enable
1052
-//#define FILAMENT_SENSOR
1052
+//#define FILAMENT_WIDTH_SENSOR
1053
 
1053
 
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
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
   #define FILAMENT_SENSOR_EXTRUDER_NUM 0   //The number of the extruder that has the filament sensor (0,1,2)
1057
   #define FILAMENT_SENSOR_EXTRUDER_NUM 0   //The number of the extruder that has the filament sensor (0,1,2)
1058
   #define MEASUREMENT_DELAY_CM        14   //measurement delay in cm.  This is the distance from filament sensor to middle of barrel
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 View File

1049
  * Note may require analog pins to be defined for different motherboards
1049
  * Note may require analog pins to be defined for different motherboards
1050
  **********************************************************************/
1050
  **********************************************************************/
1051
 // Uncomment below to enable
1051
 // Uncomment below to enable
1052
-//#define FILAMENT_SENSOR
1052
+//#define FILAMENT_WIDTH_SENSOR
1053
 
1053
 
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
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
   #define FILAMENT_SENSOR_EXTRUDER_NUM 0   //The number of the extruder that has the filament sensor (0,1,2)
1057
   #define FILAMENT_SENSOR_EXTRUDER_NUM 0   //The number of the extruder that has the filament sensor (0,1,2)
1058
   #define MEASUREMENT_DELAY_CM        14   //measurement delay in cm.  This is the distance from filament sensor to middle of barrel
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 View File

1053
  * Note may require analog pins to be defined for different motherboards
1053
  * Note may require analog pins to be defined for different motherboards
1054
  **********************************************************************/
1054
  **********************************************************************/
1055
 // Uncomment below to enable
1055
 // Uncomment below to enable
1056
-//#define FILAMENT_SENSOR
1056
+//#define FILAMENT_WIDTH_SENSOR
1057
 
1057
 
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
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
   #define FILAMENT_SENSOR_EXTRUDER_NUM 0   //The number of the extruder that has the filament sensor (0,1,2)
1061
   #define FILAMENT_SENSOR_EXTRUDER_NUM 0   //The number of the extruder that has the filament sensor (0,1,2)
1062
   #define MEASUREMENT_DELAY_CM        14   //measurement delay in cm.  This is the distance from filament sensor to middle of barrel
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 View File

1046
  * Note may require analog pins to be defined for different motherboards
1046
  * Note may require analog pins to be defined for different motherboards
1047
  **********************************************************************/
1047
  **********************************************************************/
1048
 // Uncomment below to enable
1048
 // Uncomment below to enable
1049
-//#define FILAMENT_SENSOR
1049
+//#define FILAMENT_WIDTH_SENSOR
1050
 
1050
 
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
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
   #define FILAMENT_SENSOR_EXTRUDER_NUM 0   //The number of the extruder that has the filament sensor (0,1,2)
1054
   #define FILAMENT_SENSOR_EXTRUDER_NUM 0   //The number of the extruder that has the filament sensor (0,1,2)
1055
   #define MEASUREMENT_DELAY_CM        14   //measurement delay in cm.  This is the distance from filament sensor to middle of barrel
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 View File

956
  * Note may require analog pins to be defined for different motherboards
956
  * Note may require analog pins to be defined for different motherboards
957
  **********************************************************************/
957
  **********************************************************************/
958
 // Uncomment below to enable
958
 // Uncomment below to enable
959
-//#define FILAMENT_SENSOR
959
+//#define FILAMENT_WIDTH_SENSOR
960
 
960
 
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
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
   #define FILAMENT_SENSOR_EXTRUDER_NUM 0   //The number of the extruder that has the filament sensor (0,1,2)
964
   #define FILAMENT_SENSOR_EXTRUDER_NUM 0   //The number of the extruder that has the filament sensor (0,1,2)
965
   #define MEASUREMENT_DELAY_CM        14   //measurement delay in cm.  This is the distance from filament sensor to middle of barrel
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 View File

923
  * Note may require analog pins to be defined for different motherboards
923
  * Note may require analog pins to be defined for different motherboards
924
  **********************************************************************/
924
  **********************************************************************/
925
 // Uncomment below to enable
925
 // Uncomment below to enable
926
-//#define FILAMENT_SENSOR
926
+//#define FILAMENT_WIDTH_SENSOR
927
 
927
 
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
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
   #define FILAMENT_SENSOR_EXTRUDER_NUM 0   //The number of the extruder that has the filament sensor (0,1,2)
931
   #define FILAMENT_SENSOR_EXTRUDER_NUM 0   //The number of the extruder that has the filament sensor (0,1,2)
932
   #define MEASUREMENT_DELAY_CM        14   //measurement delay in cm.  This is the distance from filament sensor to middle of barrel
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 View File

914
  * Note may require analog pins to be defined for different motherboards
914
  * Note may require analog pins to be defined for different motherboards
915
  **********************************************************************/
915
  **********************************************************************/
916
 // Uncomment below to enable
916
 // Uncomment below to enable
917
-//#define FILAMENT_SENSOR
917
+//#define FILAMENT_WIDTH_SENSOR
918
 
918
 
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
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
   #define FILAMENT_SENSOR_EXTRUDER_NUM 0   //The number of the extruder that has the filament sensor (0,1,2)
922
   #define FILAMENT_SENSOR_EXTRUDER_NUM 0   //The number of the extruder that has the filament sensor (0,1,2)
923
   #define MEASUREMENT_DELAY_CM        14   //measurement delay in cm.  This is the distance from filament sensor to middle of barrel
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 View File

851
   block->nominal_speed = block->millimeters * inverse_second; // (mm/sec) Always > 0
851
   block->nominal_speed = block->millimeters * inverse_second; // (mm/sec) Always > 0
852
   block->nominal_rate = ceil(block->step_event_count * inverse_second); // (step/sec) Always > 0
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
     //FMM update ring buffer used for delay with filament measurements
855
     //FMM update ring buffer used for delay with filament measurements
856
     if (extruder == FILAMENT_SENSOR_EXTRUDER_NUM && delay_index2 > -1) {  //only for extruder with filament sensor and if ring buffer is initialized
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 View File

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

+ 1
- 1
Marlin/temperature.h View File

53
 void tp_init();  //initialize the heating
53
 void tp_init();  //initialize the heating
54
 void manage_heater(); //it is critical that this is called periodically.
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
   // For converting raw Filament Width to milimeters
57
   // For converting raw Filament Width to milimeters
58
   float analog2widthFil();
58
   float analog2widthFil();
59
 
59
 

Loading…
Cancel
Save