Skip to content

Commit

Permalink
Addressing MarlinFirmware#7552
Browse files Browse the repository at this point in the history
When M405 is used it changes 'volumetric_multiplier[FILAMENT_SENSOR_EXTRUDER_NUM]' value. When M406 disables M405 it leaves the value unchanged.
This PR applies 'calculate_volumetric_multipliers' in M406 instead of resetting it to 1.0 because M200 may not be compatible with M405 hence I'm sure to restore anyway with correct value.
  • Loading branch information
GMagician authored and thinkyhead committed Aug 25, 2017
1 parent 2b12093 commit 0067bb2
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion Marlin/Marlin_main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9241,7 +9241,10 @@ inline void gcode_M400() { stepper.synchronize(); }
/**
* M406: Turn off filament sensor for control
*/
inline void gcode_M406() { filament_sensor = false; }
inline void gcode_M406() {
filament_sensor = false;
calculate_volumetric_multipliers(); // Restore correct 'volumetric_multiplier' value
}

/**
* M407: Get measured filament diameter on serial output
Expand Down

0 comments on commit 0067bb2

Please sign in to comment.