瀏覽代碼

Addressing #7552

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.
GMagician 7 年之前
父節點
當前提交
0067bb2840
共有 1 個檔案被更改,包括 4 行新增1 行删除
  1. 4
    1
      Marlin/Marlin_main.cpp

+ 4
- 1
Marlin/Marlin_main.cpp 查看文件

@@ -9241,7 +9241,10 @@ inline void gcode_M400() { stepper.synchronize(); }
9241 9241
   /**
9242 9242
    * M406: Turn off filament sensor for control
9243 9243
    */
9244
-  inline void gcode_M406() { filament_sensor = false; }
9244
+  inline void gcode_M406() {
9245
+    filament_sensor = false;
9246
+    calculate_volumetric_multipliers();   // Restore correct 'volumetric_multiplier' value
9247
+  }
9245 9248
 
9246 9249
   /**
9247 9250
    * M407: Get measured filament diameter on serial output

Loading…
取消
儲存