Improvements and bug fixes in sensor delay buffer for filament sensor code
Improvement to avoid reinitializing delay buffer with every print. Fixed issues in buffer indexing and memory out of bounds due to floating point imprecision. Simplified the code by avoiding conversion to standard diameter and 1cu mm extrusion, which caused complications in determining mm extruded.
This commit is contained in:
@ -230,8 +230,8 @@ extern unsigned char fanSpeedSoftPwm;
|
||||
#endif
|
||||
|
||||
#ifdef FILAMENT_SENSOR
|
||||
extern volatile float filament_width_nominal; //holds the theoretical filament diameter ie., 3.00 or 1.75
|
||||
extern volatile bool filament_sensor; //indicates that filament sensor readings should control extrusion
|
||||
extern float filament_width_nominal; //holds the theoretical filament diameter ie., 3.00 or 1.75
|
||||
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 signed char measurement_delay[]; //ring buffer to delay measurement
|
||||
extern int delay_index1, delay_index2; //index into ring buffer
|
||||
|
Reference in New Issue
Block a user