Quellcode durchsuchen

Fix get_destination_from_command for E

Scott Lahteine vor 7 Jahren
Ursprung
Commit
e6788bb6ae
1 geänderte Dateien mit 4 neuen und 2 gelöschten Zeilen
  1. 4
    2
      Marlin/src/gcode/gcode.cpp

+ 4
- 2
Marlin/src/gcode/gcode.cpp Datei anzeigen

93
  */
93
  */
94
 void GcodeSuite::get_destination_from_command() {
94
 void GcodeSuite::get_destination_from_command() {
95
   LOOP_XYZE(i) {
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
     else
100
     else
99
       destination[i] = current_position[i];
101
       destination[i] = current_position[i];
100
   }
102
   }

Laden…
Abbrechen
Speichern