From 3cdf363cceda864d9ca4e48b2328adc474fe14fa Mon Sep 17 00:00:00 2001 From: Sola <42537573+solawc@users.noreply.github.com> Date: Thu, 15 Apr 2021 17:45:30 +0800 Subject: [PATCH] Fix MKS H43 compile (#21619) --- Marlin/src/lcd/extui/lib/dgus/mks/DGUSDisplayDef.cpp | 11 +++++++---- .../src/lcd/extui/lib/dgus/mks/DGUSScreenHandler.cpp | 2 +- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/Marlin/src/lcd/extui/lib/dgus/mks/DGUSDisplayDef.cpp b/Marlin/src/lcd/extui/lib/dgus/mks/DGUSDisplayDef.cpp index 01c3adbda7..667442b31c 100644 --- a/Marlin/src/lcd/extui/lib/dgus/mks/DGUSDisplayDef.cpp +++ b/Marlin/src/lcd/extui/lib/dgus/mks/DGUSDisplayDef.cpp @@ -72,20 +72,23 @@ void MKS_reset_settings() { } xyz_pos_t position_before_pause; +constexpr feedRate_t park_speed_xy = TERN(NOZZLE_PARK_FEATURE, NOZZLE_PARK_XY_FEEDRATE, 100), + park_speed_z = TERN(NOZZLE_PARK_FEATURE, NOZZLE_PARK_Z_FEEDRATE, 5); + void MKS_pause_print_move() { queue.exhaust(); position_before_pause = current_position; destination.z = _MIN(current_position.z + mks_park_pos.z, Z_MAX_POS); - prepare_internal_move_to_destination(NOZZLE_PARK_Z_FEEDRATE); + prepare_internal_move_to_destination(park_speed_z); destination.set(X_MIN_POS + mks_park_pos.x, Y_MIN_POS + mks_park_pos.y); - prepare_internal_move_to_destination(NOZZLE_PARK_XY_FEEDRATE); + prepare_internal_move_to_destination(park_speed_xy); } void MKS_resume_print_move() { destination.set(position_before_pause.x, position_before_pause.y); - prepare_internal_move_to_destination(NOZZLE_PARK_XY_FEEDRATE); + prepare_internal_move_to_destination(park_speed_xy); destination.z = position_before_pause.z; - prepare_internal_move_to_destination(NOZZLE_PARK_Z_FEEDRATE); + prepare_internal_move_to_destination(park_speed_z); } float z_offset_add = 0; diff --git a/Marlin/src/lcd/extui/lib/dgus/mks/DGUSScreenHandler.cpp b/Marlin/src/lcd/extui/lib/dgus/mks/DGUSScreenHandler.cpp index e6e2af42eb..8833423b37 100644 --- a/Marlin/src/lcd/extui/lib/dgus/mks/DGUSScreenHandler.cpp +++ b/Marlin/src/lcd/extui/lib/dgus/mks/DGUSScreenHandler.cpp @@ -1271,7 +1271,7 @@ void GcodeSuite::M1002() { #endif const uint8_t old_axis_relative = axis_relative; - set_e_relative(true); // M83 + set_e_relative(); // M83 { char buf[20]; snprintf_P(buf, 20, PSTR("G1E%dF%d"), parser.intval('E'), parser.intval('F'));