Fix FILAMENT_WIDTH_SENSOR measurement

Only measure and store filament width when E is going forward.
This commit is contained in:
Scott Lahteine
2016-04-06 19:29:08 -07:00
parent 74effedbf5
commit 865dcf3fb4
4 changed files with 31 additions and 24 deletions

View File

@@ -705,7 +705,7 @@ void manage_heater() {
// Control the extruder rate based on the width sensor
#if ENABLED(FILAMENT_WIDTH_SENSOR)
if (filament_sensor) {
meas_shift_index = delay_index1 - meas_delay_cm;
meas_shift_index = filwidth_delay_index1 - meas_delay_cm;
if (meas_shift_index < 0) meas_shift_index += MAX_MEASUREMENT_DELAY + 1; //loop around buffer if needed
// Get the delayed info and add 100 to reconstitute to a percent of