浏览代码

Fix get_destination_from_command for E

Scott Lahteine 7 年前
父节点
当前提交
e6788bb6ae
共有 1 个文件被更改,包括 4 次插入2 次删除
  1. 4
    2
      Marlin/src/gcode/gcode.cpp

+ 4
- 2
Marlin/src/gcode/gcode.cpp 查看文件

@@ -93,8 +93,10 @@ bool GcodeSuite::get_target_extruder_from_command() {
93 93
  */
94 94
 void GcodeSuite::get_destination_from_command() {
95 95
   LOOP_XYZE(i) {
96
-    if (parser.seen(axis_codes[i]))
97
-      destination[i] = LOGICAL_TO_NATIVE(parser.value_axis_units((AxisEnum)i) + (axis_relative_modes[i] || relative_mode ? current_position[i] : 0), i);
96
+    if (parser.seen(axis_codes[i])) {
97
+      const float v = parser.value_axis_units((AxisEnum)i) + (axis_relative_modes[i] || relative_mode ? current_position[i] : 0);
98
+      destination[i] = i == E_AXIS ? v : LOGICAL_TO_NATIVE(v, i);
99
+    }
98 100
     else
99 101
       destination[i] = current_position[i];
100 102
   }

正在加载...
取消
保存