Skip to content

Commit 40df843

Browse files
committed
simplify
1 parent 1de2eb2 commit 40df843

2 files changed

Lines changed: 12 additions & 15 deletions

File tree

Marlin/src/module/motion.cpp

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1097,6 +1097,18 @@ void Motion::blocking_move(const xy_pos_t &raw, const feedRate_t fr_mm_s/*=0.0f*
10971097
if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPGM("do_z_clearance_by(", zclear, ")");
10981098
do_z_clearance(position.z + zclear, false);
10991099
}
1100+
1101+
#if ENABLED(DWIN_LCD_PROUI) && (HAS_MESH || ALL(INDIVIDUAL_AXIS_HOMING_SUBMENU, MESH_BED_LEVELING))
1102+
#include "../lcd/dwin/proui/dwin.h" // for Z_POST_CLEARANCE
1103+
#endif
1104+
#ifndef Z_POST_CLEARANCE // May be set by proui/dwin.h :-P
1105+
#ifdef Z_AFTER_HOMING
1106+
#define Z_POST_CLEARANCE Z_AFTER_HOMING
1107+
#else
1108+
#define Z_POST_CLEARANCE Z_CLEARANCE_FOR_HOMING
1109+
#endif
1110+
#endif
1111+
11001112
/**
11011113
* Move Z to Z_POST_CLEARANCE,
11021114
* The axis is allowed to move down.
@@ -1114,17 +1126,6 @@ void Motion::blocking_move(const xy_pos_t &raw, const feedRate_t fr_mm_s/*=0.0f*
11141126
#endif
11151127
}
11161128

1117-
#if ALL(DWIN_LCD_PROUI, INDIVIDUAL_AXIS_HOMING_SUBMENU, MESH_BED_LEVELING)
1118-
#include "../lcd/e3v2/proui/dwin.h" // for Z_POST_CLEARANCE
1119-
#endif
1120-
#ifndef Z_POST_CLEARANCE // May be set by proui/dwin.h :-P
1121-
#ifdef Z_AFTER_HOMING
1122-
#define Z_POST_CLEARANCE Z_AFTER_HOMING
1123-
#else
1124-
#define Z_POST_CLEARANCE Z_CLEARANCE_FOR_HOMING
1125-
#endif
1126-
#endif
1127-
11281129
void Motion::do_z_post_clearance() { do_z_clearance(Z_POST_CLEARANCE); }
11291130

11301131
#endif // HAS_Z_AXIS

Marlin/src/module/motion.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,6 @@
3030

3131
#include "../inc/MarlinConfig.h"
3232

33-
#if ALL(DWIN_LCD_PROUI, INDIVIDUAL_AXIS_HOMING_SUBMENU, MESH_BED_LEVELING) || (ALL(HAS_MESH, DWIN_LCD_PROUI))
34-
#include "../lcd/dwin/proui/dwin.h" // for Z_POST_CLEARANCE
35-
#endif
36-
3733
#if IS_SCARA
3834
#include "scara.h"
3935
#elif ENABLED(POLAR)

0 commit comments

Comments
 (0)