FILAMENT_SENSOR -> FILAMENT_WIDTH_SENSOR
This commit is contained in:
parent
7f81aa7ff3
commit
1a79b13b7a
27 changed files with 76 additions and 66 deletions
|
@ -124,11 +124,11 @@ script:
|
||||||
- build_marlin
|
- build_marlin
|
||||||
# Enable filament sensor
|
# Enable filament sensor
|
||||||
- restore_configs
|
- restore_configs
|
||||||
- opt_enable FILAMENT_SENSOR
|
- opt_enable FILAMENT_WIDTH_SENSOR
|
||||||
- build_marlin
|
- build_marlin
|
||||||
# Enable filament sensor with LCD display
|
# Enable filament sensor with LCD display
|
||||||
- restore_configs
|
- restore_configs
|
||||||
- opt_enable ULTIMAKERCONTROLLER FILAMENT_SENSOR FILAMENT_LCD_DISPLAY
|
- opt_enable ULTIMAKERCONTROLLER FILAMENT_WIDTH_SENSOR FILAMENT_LCD_DISPLAY
|
||||||
- build_marlin
|
- build_marlin
|
||||||
# Enable COREXY
|
# Enable COREXY
|
||||||
- restore_configs
|
- restore_configs
|
||||||
|
|
|
@ -513,7 +513,7 @@
|
||||||
#define HAS_SERVO_1 (PIN_EXISTS(SERVO1))
|
#define HAS_SERVO_1 (PIN_EXISTS(SERVO1))
|
||||||
#define HAS_SERVO_2 (PIN_EXISTS(SERVO2))
|
#define HAS_SERVO_2 (PIN_EXISTS(SERVO2))
|
||||||
#define HAS_SERVO_3 (PIN_EXISTS(SERVO3))
|
#define HAS_SERVO_3 (PIN_EXISTS(SERVO3))
|
||||||
#define HAS_FILAMENT_SENSOR (ENABLED(FILAMENT_SENSOR) && PIN_EXISTS(FILWIDTH))
|
#define HAS_FILAMENT_WIDTH_SENSOR (PIN_EXISTS(FILWIDTH))
|
||||||
#define HAS_FILRUNOUT (PIN_EXISTS(FILRUNOUT))
|
#define HAS_FILRUNOUT (PIN_EXISTS(FILRUNOUT))
|
||||||
#define HAS_HOME (PIN_EXISTS(HOME))
|
#define HAS_HOME (PIN_EXISTS(HOME))
|
||||||
#define HAS_KILL (PIN_EXISTS(KILL))
|
#define HAS_KILL (PIN_EXISTS(KILL))
|
||||||
|
|
|
@ -920,11 +920,11 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l
|
||||||
* Note may require analog pins to be defined for different motherboards
|
* Note may require analog pins to be defined for different motherboards
|
||||||
**********************************************************************/
|
**********************************************************************/
|
||||||
// Uncomment below to enable
|
// Uncomment below to enable
|
||||||
//#define FILAMENT_SENSOR
|
//#define FILAMENT_WIDTH_SENSOR
|
||||||
|
|
||||||
#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
|
#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
|
||||||
|
|
||||||
#if ENABLED(FILAMENT_SENSOR)
|
#if ENABLED(FILAMENT_WIDTH_SENSOR)
|
||||||
#define FILAMENT_SENSOR_EXTRUDER_NUM 0 //The number of the extruder that has the filament sensor (0,1,2)
|
#define FILAMENT_SENSOR_EXTRUDER_NUM 0 //The number of the extruder that has the filament sensor (0,1,2)
|
||||||
#define MEASUREMENT_DELAY_CM 14 //measurement delay in cm. This is the distance from filament sensor to middle of barrel
|
#define MEASUREMENT_DELAY_CM 14 //measurement delay in cm. This is the distance from filament sensor to middle of barrel
|
||||||
|
|
||||||
|
|
|
@ -334,7 +334,7 @@ extern bool axis_homed[3]; // axis[n].is_homed
|
||||||
extern int EtoPPressure;
|
extern int EtoPPressure;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if ENABLED(FILAMENT_SENSOR)
|
#if ENABLED(FILAMENT_WIDTH_SENSOR)
|
||||||
extern float filament_width_nominal; //holds the theoretical filament diameter i.e., 3.00 or 1.75
|
extern float filament_width_nominal; //holds the theoretical filament diameter i.e., 3.00 or 1.75
|
||||||
extern bool filament_sensor; //indicates that filament sensor readings should control extrusion
|
extern bool filament_sensor; //indicates that filament sensor readings should control extrusion
|
||||||
extern float filament_width_meas; //holds the filament diameter as accurately measured
|
extern float filament_width_meas; //holds the filament diameter as accurately measured
|
||||||
|
|
|
@ -405,7 +405,7 @@ static uint8_t target_extruder;
|
||||||
float axis_scaling[3] = { 1, 1, 1 }; // Build size scaling, default to 1
|
float axis_scaling[3] = { 1, 1, 1 }; // Build size scaling, default to 1
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if ENABLED(FILAMENT_SENSOR)
|
#if ENABLED(FILAMENT_WIDTH_SENSOR)
|
||||||
//Variables for Filament Sensor input
|
//Variables for Filament Sensor input
|
||||||
float filament_width_nominal = DEFAULT_NOMINAL_FILAMENT_DIA; //Set nominal filament width, can be changed with M404
|
float filament_width_nominal = DEFAULT_NOMINAL_FILAMENT_DIA; //Set nominal filament width, can be changed with M404
|
||||||
bool filament_sensor = false; //M405 turns on filament_sensor control, M406 turns it off
|
bool filament_sensor = false; //M405 turns on filament_sensor control, M406 turns it off
|
||||||
|
@ -5437,7 +5437,7 @@ inline void gcode_M400() { st_synchronize(); }
|
||||||
|
|
||||||
#endif // AUTO_BED_LEVELING_FEATURE && (HAS_SERVO_ENDSTOPS || Z_PROBE_ALLEN_KEY) && !Z_PROBE_SLED
|
#endif // AUTO_BED_LEVELING_FEATURE && (HAS_SERVO_ENDSTOPS || Z_PROBE_ALLEN_KEY) && !Z_PROBE_SLED
|
||||||
|
|
||||||
#if ENABLED(FILAMENT_SENSOR)
|
#if ENABLED(FILAMENT_WIDTH_SENSOR)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* M404: Display or set the nominal filament width (3mm, 1.75mm ) W<3.0>
|
* M404: Display or set the nominal filament width (3mm, 1.75mm ) W<3.0>
|
||||||
|
@ -5491,7 +5491,7 @@ inline void gcode_M400() { st_synchronize(); }
|
||||||
SERIAL_PROTOCOLLN(filament_width_meas);
|
SERIAL_PROTOCOLLN(filament_width_meas);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif // FILAMENT_SENSOR
|
#endif // FILAMENT_WIDTH_SENSOR
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* M410: Quickstop - Abort all planned moves
|
* M410: Quickstop - Abort all planned moves
|
||||||
|
@ -6533,7 +6533,7 @@ void process_next_command() {
|
||||||
break;
|
break;
|
||||||
#endif // AUTO_BED_LEVELING_FEATURE && (HAS_SERVO_ENDSTOPS || Z_PROBE_ALLEN_KEY) && !Z_PROBE_SLED
|
#endif // AUTO_BED_LEVELING_FEATURE && (HAS_SERVO_ENDSTOPS || Z_PROBE_ALLEN_KEY) && !Z_PROBE_SLED
|
||||||
|
|
||||||
#if ENABLED(FILAMENT_SENSOR)
|
#if ENABLED(FILAMENT_WIDTH_SENSOR)
|
||||||
case 404: //M404 Enter the nominal filament width (3mm, 1.75mm ) N<3.0> or display nominal filament width
|
case 404: //M404 Enter the nominal filament width (3mm, 1.75mm ) N<3.0> or display nominal filament width
|
||||||
gcode_M404();
|
gcode_M404();
|
||||||
break;
|
break;
|
||||||
|
@ -6546,7 +6546,7 @@ void process_next_command() {
|
||||||
case 407: //M407 Display measured filament diameter
|
case 407: //M407 Display measured filament diameter
|
||||||
gcode_M407();
|
gcode_M407();
|
||||||
break;
|
break;
|
||||||
#endif // FILAMENT_SENSOR
|
#endif // ENABLED(FILAMENT_WIDTH_SENSOR)
|
||||||
|
|
||||||
case 410: // M410 quickstop - Abort all the planned moves.
|
case 410: // M410 quickstop - Abort all the planned moves.
|
||||||
gcode_M410();
|
gcode_M410();
|
||||||
|
|
|
@ -265,6 +265,14 @@
|
||||||
|
|
||||||
#endif // AUTO_BED_LEVELING_FEATURE
|
#endif // AUTO_BED_LEVELING_FEATURE
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Filament Width Sensor
|
||||||
|
*/
|
||||||
|
#if ENABLED(FILAMENT_WIDTH_SENSOR) && !HAS_FILAMENT_WIDTH_SENSOR
|
||||||
|
#error FILAMENT_WIDTH_SENSOR requires a FILWIDTH_PIN to be defined.
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* ULTIPANEL encoder
|
* ULTIPANEL encoder
|
||||||
*/
|
*/
|
||||||
|
@ -436,6 +444,8 @@
|
||||||
#error SDEXTRASLOW deprecated - set SPI_SPEED to SPI_QUARTER_SPEED instead
|
#error SDEXTRASLOW deprecated - set SPI_SPEED to SPI_QUARTER_SPEED instead
|
||||||
#elif defined(Z_RAISE_BEFORE_HOMING)
|
#elif defined(Z_RAISE_BEFORE_HOMING)
|
||||||
#error Z_RAISE_BEFORE_HOMING is deprecated. Use MIN_Z_HEIGHT_FOR_HOMING instead.
|
#error Z_RAISE_BEFORE_HOMING is deprecated. Use MIN_Z_HEIGHT_FOR_HOMING instead.
|
||||||
|
#elif defined(FILAMENT_SENSOR)
|
||||||
|
#error FILAMENT_SENSOR is deprecated. Use FILAMENT_WIDTH_SENSOR instead.
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif //SANITYCHECK_H
|
#endif //SANITYCHECK_H
|
||||||
|
|
|
@ -903,11 +903,11 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l
|
||||||
* Note may require analog pins to be defined for different motherboards
|
* Note may require analog pins to be defined for different motherboards
|
||||||
**********************************************************************/
|
**********************************************************************/
|
||||||
// Uncomment below to enable
|
// Uncomment below to enable
|
||||||
//#define FILAMENT_SENSOR
|
//#define FILAMENT_WIDTH_SENSOR
|
||||||
|
|
||||||
#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
|
#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
|
||||||
|
|
||||||
#if ENABLED(FILAMENT_SENSOR)
|
#if ENABLED(FILAMENT_WIDTH_SENSOR)
|
||||||
#define FILAMENT_SENSOR_EXTRUDER_NUM 0 //The number of the extruder that has the filament sensor (0,1,2)
|
#define FILAMENT_SENSOR_EXTRUDER_NUM 0 //The number of the extruder that has the filament sensor (0,1,2)
|
||||||
#define MEASUREMENT_DELAY_CM 14 //measurement delay in cm. This is the distance from filament sensor to middle of barrel
|
#define MEASUREMENT_DELAY_CM 14 //measurement delay in cm. This is the distance from filament sensor to middle of barrel
|
||||||
|
|
||||||
|
|
|
@ -900,11 +900,11 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l
|
||||||
* Note may require analog pins to be defined for different motherboards
|
* Note may require analog pins to be defined for different motherboards
|
||||||
**********************************************************************/
|
**********************************************************************/
|
||||||
// Uncomment below to enable
|
// Uncomment below to enable
|
||||||
//#define FILAMENT_SENSOR
|
//#define FILAMENT_WIDTH_SENSOR
|
||||||
|
|
||||||
#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
|
#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
|
||||||
|
|
||||||
#if ENABLED(FILAMENT_SENSOR)
|
#if ENABLED(FILAMENT_WIDTH_SENSOR)
|
||||||
#define FILAMENT_SENSOR_EXTRUDER_NUM 0 //The number of the extruder that has the filament sensor (0,1,2)
|
#define FILAMENT_SENSOR_EXTRUDER_NUM 0 //The number of the extruder that has the filament sensor (0,1,2)
|
||||||
#define MEASUREMENT_DELAY_CM 14 //measurement delay in cm. This is the distance from filament sensor to middle of barrel
|
#define MEASUREMENT_DELAY_CM 14 //measurement delay in cm. This is the distance from filament sensor to middle of barrel
|
||||||
|
|
||||||
|
|
|
@ -915,11 +915,11 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = true; // set to true to invert the lo
|
||||||
* Note may require analog pins to be defined for different motherboards
|
* Note may require analog pins to be defined for different motherboards
|
||||||
**********************************************************************/
|
**********************************************************************/
|
||||||
// Uncomment below to enable
|
// Uncomment below to enable
|
||||||
//#define FILAMENT_SENSOR
|
//#define FILAMENT_WIDTH_SENSOR
|
||||||
|
|
||||||
#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
|
#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
|
||||||
|
|
||||||
#if ENABLED(FILAMENT_SENSOR)
|
#if ENABLED(FILAMENT_WIDTH_SENSOR)
|
||||||
#define FILAMENT_SENSOR_EXTRUDER_NUM 0 //The number of the extruder that has the filament sensor (0,1,2)
|
#define FILAMENT_SENSOR_EXTRUDER_NUM 0 //The number of the extruder that has the filament sensor (0,1,2)
|
||||||
#define MEASUREMENT_DELAY_CM 14 //measurement delay in cm. This is the distance from filament sensor to middle of barrel
|
#define MEASUREMENT_DELAY_CM 14 //measurement delay in cm. This is the distance from filament sensor to middle of barrel
|
||||||
|
|
||||||
|
|
|
@ -917,11 +917,11 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l
|
||||||
* Note may require analog pins to be defined for different motherboards
|
* Note may require analog pins to be defined for different motherboards
|
||||||
**********************************************************************/
|
**********************************************************************/
|
||||||
// Uncomment below to enable
|
// Uncomment below to enable
|
||||||
//#define FILAMENT_SENSOR
|
//#define FILAMENT_WIDTH_SENSOR
|
||||||
|
|
||||||
#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
|
#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
|
||||||
|
|
||||||
#if ENABLED(FILAMENT_SENSOR)
|
#if ENABLED(FILAMENT_WIDTH_SENSOR)
|
||||||
#define FILAMENT_SENSOR_EXTRUDER_NUM 0 //The number of the extruder that has the filament sensor (0,1,2)
|
#define FILAMENT_SENSOR_EXTRUDER_NUM 0 //The number of the extruder that has the filament sensor (0,1,2)
|
||||||
#define MEASUREMENT_DELAY_CM 14 //measurement delay in cm. This is the distance from filament sensor to middle of barrel
|
#define MEASUREMENT_DELAY_CM 14 //measurement delay in cm. This is the distance from filament sensor to middle of barrel
|
||||||
|
|
||||||
|
|
|
@ -937,11 +937,11 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l
|
||||||
* Note may require analog pins to be defined for different motherboards
|
* Note may require analog pins to be defined for different motherboards
|
||||||
**********************************************************************/
|
**********************************************************************/
|
||||||
// Uncomment below to enable
|
// Uncomment below to enable
|
||||||
//#define FILAMENT_SENSOR
|
//#define FILAMENT_WIDTH_SENSOR
|
||||||
|
|
||||||
#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
|
#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
|
||||||
|
|
||||||
#if ENABLED(FILAMENT_SENSOR)
|
#if ENABLED(FILAMENT_WIDTH_SENSOR)
|
||||||
#define FILAMENT_SENSOR_EXTRUDER_NUM 0 //The number of the extruder that has the filament sensor (0,1,2)
|
#define FILAMENT_SENSOR_EXTRUDER_NUM 0 //The number of the extruder that has the filament sensor (0,1,2)
|
||||||
#define MEASUREMENT_DELAY_CM 14 //measurement delay in cm. This is the distance from filament sensor to middle of barrel
|
#define MEASUREMENT_DELAY_CM 14 //measurement delay in cm. This is the distance from filament sensor to middle of barrel
|
||||||
|
|
||||||
|
|
|
@ -920,11 +920,11 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l
|
||||||
* Note may require analog pins to be defined for different motherboards
|
* Note may require analog pins to be defined for different motherboards
|
||||||
**********************************************************************/
|
**********************************************************************/
|
||||||
// Uncomment below to enable
|
// Uncomment below to enable
|
||||||
//#define FILAMENT_SENSOR
|
//#define FILAMENT_WIDTH_SENSOR
|
||||||
|
|
||||||
#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
|
#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
|
||||||
|
|
||||||
#if ENABLED(FILAMENT_SENSOR)
|
#if ENABLED(FILAMENT_WIDTH_SENSOR)
|
||||||
#define FILAMENT_SENSOR_EXTRUDER_NUM 0 //The number of the extruder that has the filament sensor (0,1,2)
|
#define FILAMENT_SENSOR_EXTRUDER_NUM 0 //The number of the extruder that has the filament sensor (0,1,2)
|
||||||
#define MEASUREMENT_DELAY_CM 14 //measurement delay in cm. This is the distance from filament sensor to middle of barrel
|
#define MEASUREMENT_DELAY_CM 14 //measurement delay in cm. This is the distance from filament sensor to middle of barrel
|
||||||
|
|
||||||
|
|
|
@ -922,11 +922,11 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l
|
||||||
* Note may require analog pins to be defined for different motherboards
|
* Note may require analog pins to be defined for different motherboards
|
||||||
**********************************************************************/
|
**********************************************************************/
|
||||||
// Uncomment below to enable
|
// Uncomment below to enable
|
||||||
//#define FILAMENT_SENSOR
|
//#define FILAMENT_WIDTH_SENSOR
|
||||||
|
|
||||||
#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
|
#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
|
||||||
|
|
||||||
#if ENABLED(FILAMENT_SENSOR)
|
#if ENABLED(FILAMENT_WIDTH_SENSOR)
|
||||||
#define FILAMENT_SENSOR_EXTRUDER_NUM 0 //The number of the extruder that has the filament sensor (0,1,2)
|
#define FILAMENT_SENSOR_EXTRUDER_NUM 0 //The number of the extruder that has the filament sensor (0,1,2)
|
||||||
#define MEASUREMENT_DELAY_CM 14 //measurement delay in cm. This is the distance from filament sensor to middle of barrel
|
#define MEASUREMENT_DELAY_CM 14 //measurement delay in cm. This is the distance from filament sensor to middle of barrel
|
||||||
|
|
||||||
|
|
|
@ -928,11 +928,11 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l
|
||||||
* Note may require analog pins to be defined for different motherboards
|
* Note may require analog pins to be defined for different motherboards
|
||||||
**********************************************************************/
|
**********************************************************************/
|
||||||
// Uncomment below to enable
|
// Uncomment below to enable
|
||||||
//#define FILAMENT_SENSOR
|
//#define FILAMENT_WIDTH_SENSOR
|
||||||
|
|
||||||
#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
|
#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
|
||||||
|
|
||||||
#if ENABLED(FILAMENT_SENSOR)
|
#if ENABLED(FILAMENT_WIDTH_SENSOR)
|
||||||
#define FILAMENT_SENSOR_EXTRUDER_NUM 0 //The number of the extruder that has the filament sensor (0,1,2)
|
#define FILAMENT_SENSOR_EXTRUDER_NUM 0 //The number of the extruder that has the filament sensor (0,1,2)
|
||||||
#define MEASUREMENT_DELAY_CM 14 //measurement delay in cm. This is the distance from filament sensor to middle of barrel
|
#define MEASUREMENT_DELAY_CM 14 //measurement delay in cm. This is the distance from filament sensor to middle of barrel
|
||||||
|
|
||||||
|
|
|
@ -941,11 +941,11 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l
|
||||||
* Note may require analog pins to be defined for different motherboards
|
* Note may require analog pins to be defined for different motherboards
|
||||||
**********************************************************************/
|
**********************************************************************/
|
||||||
// Uncomment below to enable
|
// Uncomment below to enable
|
||||||
//#define FILAMENT_SENSOR
|
//#define FILAMENT_WIDTH_SENSOR
|
||||||
|
|
||||||
#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
|
#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
|
||||||
|
|
||||||
#if ENABLED(FILAMENT_SENSOR)
|
#if ENABLED(FILAMENT_WIDTH_SENSOR)
|
||||||
#define FILAMENT_SENSOR_EXTRUDER_NUM 0 //The number of the extruder that has the filament sensor (0,1,2)
|
#define FILAMENT_SENSOR_EXTRUDER_NUM 0 //The number of the extruder that has the filament sensor (0,1,2)
|
||||||
#define MEASUREMENT_DELAY_CM 14 //measurement delay in cm. This is the distance from filament sensor to middle of barrel
|
#define MEASUREMENT_DELAY_CM 14 //measurement delay in cm. This is the distance from filament sensor to middle of barrel
|
||||||
|
|
||||||
|
|
|
@ -912,11 +912,11 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = true; // set to true to invert the lo
|
||||||
* Note may require analog pins to be defined for different motherboards
|
* Note may require analog pins to be defined for different motherboards
|
||||||
**********************************************************************/
|
**********************************************************************/
|
||||||
// Uncomment below to enable
|
// Uncomment below to enable
|
||||||
//#define FILAMENT_SENSOR
|
//#define FILAMENT_WIDTH_SENSOR
|
||||||
|
|
||||||
#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
|
#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
|
||||||
|
|
||||||
#if ENABLED(FILAMENT_SENSOR)
|
#if ENABLED(FILAMENT_WIDTH_SENSOR)
|
||||||
#define FILAMENT_SENSOR_EXTRUDER_NUM 0 //The number of the extruder that has the filament sensor (0,1,2)
|
#define FILAMENT_SENSOR_EXTRUDER_NUM 0 //The number of the extruder that has the filament sensor (0,1,2)
|
||||||
#define MEASUREMENT_DELAY_CM 14 //measurement delay in cm. This is the distance from filament sensor to middle of barrel
|
#define MEASUREMENT_DELAY_CM 14 //measurement delay in cm. This is the distance from filament sensor to middle of barrel
|
||||||
|
|
||||||
|
|
|
@ -920,11 +920,11 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l
|
||||||
* Note may require analog pins to be defined for different motherboards
|
* Note may require analog pins to be defined for different motherboards
|
||||||
**********************************************************************/
|
**********************************************************************/
|
||||||
// Uncomment below to enable
|
// Uncomment below to enable
|
||||||
//#define FILAMENT_SENSOR
|
//#define FILAMENT_WIDTH_SENSOR
|
||||||
|
|
||||||
#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
|
#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
|
||||||
|
|
||||||
#if ENABLED(FILAMENT_SENSOR)
|
#if ENABLED(FILAMENT_WIDTH_SENSOR)
|
||||||
#define FILAMENT_SENSOR_EXTRUDER_NUM 0 //The number of the extruder that has the filament sensor (0,1,2)
|
#define FILAMENT_SENSOR_EXTRUDER_NUM 0 //The number of the extruder that has the filament sensor (0,1,2)
|
||||||
#define MEASUREMENT_DELAY_CM 14 //measurement delay in cm. This is the distance from filament sensor to middle of barrel
|
#define MEASUREMENT_DELAY_CM 14 //measurement delay in cm. This is the distance from filament sensor to middle of barrel
|
||||||
|
|
||||||
|
|
|
@ -1049,11 +1049,11 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = true; // set to true to invert the lo
|
||||||
* Note may require analog pins to be defined for different motherboards
|
* Note may require analog pins to be defined for different motherboards
|
||||||
**********************************************************************/
|
**********************************************************************/
|
||||||
// Uncomment below to enable
|
// Uncomment below to enable
|
||||||
//#define FILAMENT_SENSOR
|
//#define FILAMENT_WIDTH_SENSOR
|
||||||
|
|
||||||
#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
|
#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
|
||||||
|
|
||||||
#if ENABLED(FILAMENT_SENSOR)
|
#if ENABLED(FILAMENT_WIDTH_SENSOR)
|
||||||
#define FILAMENT_SENSOR_EXTRUDER_NUM 0 //The number of the extruder that has the filament sensor (0,1,2)
|
#define FILAMENT_SENSOR_EXTRUDER_NUM 0 //The number of the extruder that has the filament sensor (0,1,2)
|
||||||
#define MEASUREMENT_DELAY_CM 14 //measurement delay in cm. This is the distance from filament sensor to middle of barrel
|
#define MEASUREMENT_DELAY_CM 14 //measurement delay in cm. This is the distance from filament sensor to middle of barrel
|
||||||
|
|
||||||
|
|
|
@ -1049,11 +1049,11 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = true; // set to true to invert the lo
|
||||||
* Note may require analog pins to be defined for different motherboards
|
* Note may require analog pins to be defined for different motherboards
|
||||||
**********************************************************************/
|
**********************************************************************/
|
||||||
// Uncomment below to enable
|
// Uncomment below to enable
|
||||||
//#define FILAMENT_SENSOR
|
//#define FILAMENT_WIDTH_SENSOR
|
||||||
|
|
||||||
#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
|
#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
|
||||||
|
|
||||||
#if ENABLED(FILAMENT_SENSOR)
|
#if ENABLED(FILAMENT_WIDTH_SENSOR)
|
||||||
#define FILAMENT_SENSOR_EXTRUDER_NUM 0 //The number of the extruder that has the filament sensor (0,1,2)
|
#define FILAMENT_SENSOR_EXTRUDER_NUM 0 //The number of the extruder that has the filament sensor (0,1,2)
|
||||||
#define MEASUREMENT_DELAY_CM 14 //measurement delay in cm. This is the distance from filament sensor to middle of barrel
|
#define MEASUREMENT_DELAY_CM 14 //measurement delay in cm. This is the distance from filament sensor to middle of barrel
|
||||||
|
|
||||||
|
|
|
@ -1053,11 +1053,11 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l
|
||||||
* Note may require analog pins to be defined for different motherboards
|
* Note may require analog pins to be defined for different motherboards
|
||||||
**********************************************************************/
|
**********************************************************************/
|
||||||
// Uncomment below to enable
|
// Uncomment below to enable
|
||||||
//#define FILAMENT_SENSOR
|
//#define FILAMENT_WIDTH_SENSOR
|
||||||
|
|
||||||
#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
|
#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
|
||||||
|
|
||||||
#if ENABLED(FILAMENT_SENSOR)
|
#if ENABLED(FILAMENT_WIDTH_SENSOR)
|
||||||
#define FILAMENT_SENSOR_EXTRUDER_NUM 0 //The number of the extruder that has the filament sensor (0,1,2)
|
#define FILAMENT_SENSOR_EXTRUDER_NUM 0 //The number of the extruder that has the filament sensor (0,1,2)
|
||||||
#define MEASUREMENT_DELAY_CM 14 //measurement delay in cm. This is the distance from filament sensor to middle of barrel
|
#define MEASUREMENT_DELAY_CM 14 //measurement delay in cm. This is the distance from filament sensor to middle of barrel
|
||||||
|
|
||||||
|
|
|
@ -1046,11 +1046,11 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l
|
||||||
* Note may require analog pins to be defined for different motherboards
|
* Note may require analog pins to be defined for different motherboards
|
||||||
**********************************************************************/
|
**********************************************************************/
|
||||||
// Uncomment below to enable
|
// Uncomment below to enable
|
||||||
//#define FILAMENT_SENSOR
|
//#define FILAMENT_WIDTH_SENSOR
|
||||||
|
|
||||||
#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
|
#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
|
||||||
|
|
||||||
#if ENABLED(FILAMENT_SENSOR)
|
#if ENABLED(FILAMENT_WIDTH_SENSOR)
|
||||||
#define FILAMENT_SENSOR_EXTRUDER_NUM 0 //The number of the extruder that has the filament sensor (0,1,2)
|
#define FILAMENT_SENSOR_EXTRUDER_NUM 0 //The number of the extruder that has the filament sensor (0,1,2)
|
||||||
#define MEASUREMENT_DELAY_CM 14 //measurement delay in cm. This is the distance from filament sensor to middle of barrel
|
#define MEASUREMENT_DELAY_CM 14 //measurement delay in cm. This is the distance from filament sensor to middle of barrel
|
||||||
|
|
||||||
|
|
|
@ -956,11 +956,11 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l
|
||||||
* Note may require analog pins to be defined for different motherboards
|
* Note may require analog pins to be defined for different motherboards
|
||||||
**********************************************************************/
|
**********************************************************************/
|
||||||
// Uncomment below to enable
|
// Uncomment below to enable
|
||||||
//#define FILAMENT_SENSOR
|
//#define FILAMENT_WIDTH_SENSOR
|
||||||
|
|
||||||
#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
|
#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
|
||||||
|
|
||||||
#if ENABLED(FILAMENT_SENSOR)
|
#if ENABLED(FILAMENT_WIDTH_SENSOR)
|
||||||
#define FILAMENT_SENSOR_EXTRUDER_NUM 0 //The number of the extruder that has the filament sensor (0,1,2)
|
#define FILAMENT_SENSOR_EXTRUDER_NUM 0 //The number of the extruder that has the filament sensor (0,1,2)
|
||||||
#define MEASUREMENT_DELAY_CM 14 //measurement delay in cm. This is the distance from filament sensor to middle of barrel
|
#define MEASUREMENT_DELAY_CM 14 //measurement delay in cm. This is the distance from filament sensor to middle of barrel
|
||||||
|
|
||||||
|
|
|
@ -923,11 +923,11 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l
|
||||||
* Note may require analog pins to be defined for different motherboards
|
* Note may require analog pins to be defined for different motherboards
|
||||||
**********************************************************************/
|
**********************************************************************/
|
||||||
// Uncomment below to enable
|
// Uncomment below to enable
|
||||||
//#define FILAMENT_SENSOR
|
//#define FILAMENT_WIDTH_SENSOR
|
||||||
|
|
||||||
#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
|
#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
|
||||||
|
|
||||||
#if ENABLED(FILAMENT_SENSOR)
|
#if ENABLED(FILAMENT_WIDTH_SENSOR)
|
||||||
#define FILAMENT_SENSOR_EXTRUDER_NUM 0 //The number of the extruder that has the filament sensor (0,1,2)
|
#define FILAMENT_SENSOR_EXTRUDER_NUM 0 //The number of the extruder that has the filament sensor (0,1,2)
|
||||||
#define MEASUREMENT_DELAY_CM 14 //measurement delay in cm. This is the distance from filament sensor to middle of barrel
|
#define MEASUREMENT_DELAY_CM 14 //measurement delay in cm. This is the distance from filament sensor to middle of barrel
|
||||||
|
|
||||||
|
|
|
@ -914,11 +914,11 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = true; // set to true to invert the lo
|
||||||
* Note may require analog pins to be defined for different motherboards
|
* Note may require analog pins to be defined for different motherboards
|
||||||
**********************************************************************/
|
**********************************************************************/
|
||||||
// Uncomment below to enable
|
// Uncomment below to enable
|
||||||
//#define FILAMENT_SENSOR
|
//#define FILAMENT_WIDTH_SENSOR
|
||||||
|
|
||||||
#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
|
#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
|
||||||
|
|
||||||
#if ENABLED(FILAMENT_SENSOR)
|
#if ENABLED(FILAMENT_WIDTH_SENSOR)
|
||||||
#define FILAMENT_SENSOR_EXTRUDER_NUM 0 //The number of the extruder that has the filament sensor (0,1,2)
|
#define FILAMENT_SENSOR_EXTRUDER_NUM 0 //The number of the extruder that has the filament sensor (0,1,2)
|
||||||
#define MEASUREMENT_DELAY_CM 14 //measurement delay in cm. This is the distance from filament sensor to middle of barrel
|
#define MEASUREMENT_DELAY_CM 14 //measurement delay in cm. This is the distance from filament sensor to middle of barrel
|
||||||
|
|
||||||
|
|
|
@ -851,7 +851,7 @@ float junction_deviation = 0.1;
|
||||||
block->nominal_speed = block->millimeters * inverse_second; // (mm/sec) Always > 0
|
block->nominal_speed = block->millimeters * inverse_second; // (mm/sec) Always > 0
|
||||||
block->nominal_rate = ceil(block->step_event_count * inverse_second); // (step/sec) Always > 0
|
block->nominal_rate = ceil(block->step_event_count * inverse_second); // (step/sec) Always > 0
|
||||||
|
|
||||||
#if ENABLED(FILAMENT_SENSOR)
|
#if ENABLED(FILAMENT_WIDTH_SENSOR)
|
||||||
//FMM update ring buffer used for delay with filament measurements
|
//FMM update ring buffer used for delay with filament measurements
|
||||||
if (extruder == FILAMENT_SENSOR_EXTRUDER_NUM && delay_index2 > -1) { //only for extruder with filament sensor and if ring buffer is initialized
|
if (extruder == FILAMENT_SENSOR_EXTRUDER_NUM && delay_index2 > -1) { //only for extruder with filament sensor and if ring buffer is initialized
|
||||||
|
|
||||||
|
|
|
@ -93,7 +93,7 @@ unsigned char soft_pwm_bed;
|
||||||
volatile int babystepsTodo[3] = { 0 };
|
volatile int babystepsTodo[3] = { 0 };
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if ENABLED(FILAMENT_SENSOR)
|
#if ENABLED(FILAMENT_WIDTH_SENSOR)
|
||||||
int current_raw_filwidth = 0; //Holds measured filament diameter - one extruder only
|
int current_raw_filwidth = 0; //Holds measured filament diameter - one extruder only
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -209,7 +209,7 @@ static void updateTemperaturesFromRawValues();
|
||||||
#define SOFT_PWM_SCALE 0
|
#define SOFT_PWM_SCALE 0
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if ENABLED(FILAMENT_SENSOR)
|
#if ENABLED(FILAMENT_WIDTH_SENSOR)
|
||||||
static int meas_shift_index; //used to point to a delayed sample in buffer for filament width sensor
|
static int meas_shift_index; //used to point to a delayed sample in buffer for filament width sensor
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -703,7 +703,7 @@ void manage_heater() {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Control the extruder rate based on the width sensor
|
// Control the extruder rate based on the width sensor
|
||||||
#if ENABLED(FILAMENT_SENSOR)
|
#if ENABLED(FILAMENT_WIDTH_SENSOR)
|
||||||
if (filament_sensor) {
|
if (filament_sensor) {
|
||||||
meas_shift_index = delay_index1 - meas_delay_cm;
|
meas_shift_index = delay_index1 - meas_delay_cm;
|
||||||
if (meas_shift_index < 0) meas_shift_index += MAX_MEASUREMENT_DELAY + 1; //loop around buffer if needed
|
if (meas_shift_index < 0) meas_shift_index += MAX_MEASUREMENT_DELAY + 1; //loop around buffer if needed
|
||||||
|
@ -715,7 +715,7 @@ void manage_heater() {
|
||||||
NOLESS(vm, 0.01);
|
NOLESS(vm, 0.01);
|
||||||
volumetric_multiplier[FILAMENT_SENSOR_EXTRUDER_NUM] = vm;
|
volumetric_multiplier[FILAMENT_SENSOR_EXTRUDER_NUM] = vm;
|
||||||
}
|
}
|
||||||
#endif //FILAMENT_SENSOR
|
#endif //FILAMENT_WIDTH_SENSOR
|
||||||
|
|
||||||
#if DISABLED(PIDTEMPBED)
|
#if DISABLED(PIDTEMPBED)
|
||||||
if (ms < next_bed_check_ms) return;
|
if (ms < next_bed_check_ms) return;
|
||||||
|
@ -849,7 +849,7 @@ static void updateTemperaturesFromRawValues() {
|
||||||
#if ENABLED(TEMP_SENSOR_1_AS_REDUNDANT)
|
#if ENABLED(TEMP_SENSOR_1_AS_REDUNDANT)
|
||||||
redundant_temperature = analog2temp(redundant_temperature_raw, 1);
|
redundant_temperature = analog2temp(redundant_temperature_raw, 1);
|
||||||
#endif
|
#endif
|
||||||
#if HAS_FILAMENT_SENSOR
|
#if ENABLED(FILAMENT_WIDTH_SENSOR)
|
||||||
filament_width_meas = analog2widthFil();
|
filament_width_meas = analog2widthFil();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -864,7 +864,7 @@ static void updateTemperaturesFromRawValues() {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#if ENABLED(FILAMENT_SENSOR)
|
#if ENABLED(FILAMENT_WIDTH_SENSOR)
|
||||||
|
|
||||||
// Convert raw Filament Width to millimeters
|
// Convert raw Filament Width to millimeters
|
||||||
float analog2widthFil() {
|
float analog2widthFil() {
|
||||||
|
@ -1003,7 +1003,7 @@ void tp_init() {
|
||||||
#if HAS_TEMP_BED
|
#if HAS_TEMP_BED
|
||||||
ANALOG_SELECT(TEMP_BED_PIN);
|
ANALOG_SELECT(TEMP_BED_PIN);
|
||||||
#endif
|
#endif
|
||||||
#if HAS_FILAMENT_SENSOR
|
#if ENABLED(FILAMENT_WIDTH_SENSOR)
|
||||||
ANALOG_SELECT(FILWIDTH_PIN);
|
ANALOG_SELECT(FILWIDTH_PIN);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -1354,7 +1354,7 @@ ISR(TIMER0_COMPB_vect) {
|
||||||
ISR_STATICS(BED);
|
ISR_STATICS(BED);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if HAS_FILAMENT_SENSOR
|
#if ENABLED(FILAMENT_WIDTH_SENSOR)
|
||||||
static unsigned long raw_filwidth_value = 0;
|
static unsigned long raw_filwidth_value = 0;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -1636,14 +1636,14 @@ ISR(TIMER0_COMPB_vect) {
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case Prepare_FILWIDTH:
|
case Prepare_FILWIDTH:
|
||||||
#if HAS_FILAMENT_SENSOR
|
#if ENABLED(FILAMENT_WIDTH_SENSOR)
|
||||||
START_ADC(FILWIDTH_PIN);
|
START_ADC(FILWIDTH_PIN);
|
||||||
#endif
|
#endif
|
||||||
lcd_buttons_update();
|
lcd_buttons_update();
|
||||||
temp_state = Measure_FILWIDTH;
|
temp_state = Measure_FILWIDTH;
|
||||||
break;
|
break;
|
||||||
case Measure_FILWIDTH:
|
case Measure_FILWIDTH:
|
||||||
#if HAS_FILAMENT_SENSOR
|
#if ENABLED(FILAMENT_WIDTH_SENSOR)
|
||||||
// raw_filwidth_value += ADC; //remove to use an IIR filter approach
|
// raw_filwidth_value += ADC; //remove to use an IIR filter approach
|
||||||
if (ADC > 102) { //check that ADC is reading a voltage > 0.5 volts, otherwise don't take in the data.
|
if (ADC > 102) { //check that ADC is reading a voltage > 0.5 volts, otherwise don't take in the data.
|
||||||
raw_filwidth_value -= (raw_filwidth_value >> 7); //multiply raw_filwidth_value by 127/128
|
raw_filwidth_value -= (raw_filwidth_value >> 7); //multiply raw_filwidth_value by 127/128
|
||||||
|
@ -1669,7 +1669,7 @@ ISR(TIMER0_COMPB_vect) {
|
||||||
if (!temp_meas_ready) set_current_temp_raw();
|
if (!temp_meas_ready) set_current_temp_raw();
|
||||||
|
|
||||||
// Filament Sensor - can be read any time since IIR filtering is used
|
// Filament Sensor - can be read any time since IIR filtering is used
|
||||||
#if HAS_FILAMENT_SENSOR
|
#if ENABLED(FILAMENT_WIDTH_SENSOR)
|
||||||
current_raw_filwidth = raw_filwidth_value >> 10; // Divide to get to 0-16384 range since we used 1/128 IIR filter approach
|
current_raw_filwidth = raw_filwidth_value >> 10; // Divide to get to 0-16384 range since we used 1/128 IIR filter approach
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
@ -53,7 +53,7 @@
|
||||||
void tp_init(); //initialize the heating
|
void tp_init(); //initialize the heating
|
||||||
void manage_heater(); //it is critical that this is called periodically.
|
void manage_heater(); //it is critical that this is called periodically.
|
||||||
|
|
||||||
#if ENABLED(FILAMENT_SENSOR)
|
#if ENABLED(FILAMENT_WIDTH_SENSOR)
|
||||||
// For converting raw Filament Width to milimeters
|
// For converting raw Filament Width to milimeters
|
||||||
float analog2widthFil();
|
float analog2widthFil();
|
||||||
|
|
||||||
|
|
Reference in a new issue