Browse Source

Touch Mi: Add magnet Y position (#15166)

kakou-fr 5 years ago
parent
commit
6b1c4dec46
2 changed files with 8 additions and 3 deletions
  1. 1
    1
      Marlin/src/module/motion.cpp
  2. 7
    2
      Marlin/src/module/probe.cpp

+ 1
- 1
Marlin/src/module/motion.cpp View File

@@ -424,7 +424,7 @@ void do_blocking_move_to_x(const float &rx, const float &fr_mm_s/*=0.0*/) {
424 424
   do_blocking_move_to(rx, current_position[Y_AXIS], current_position[Z_AXIS], fr_mm_s);
425 425
 }
426 426
 void do_blocking_move_to_y(const float &ry, const float &fr_mm_s/*=0.0*/) {
427
-  do_blocking_move_to(current_position[Y_AXIS], ry, current_position[Z_AXIS], fr_mm_s);
427
+  do_blocking_move_to(current_position[X_AXIS], ry, current_position[Z_AXIS], fr_mm_s);
428 428
 }
429 429
 void do_blocking_move_to_z(const float &rz, const float &fr_mm_s/*=0.0*/) {
430 430
   do_blocking_move_to(current_position[X_AXIS], current_position[Y_AXIS], rz, fr_mm_s);

+ 7
- 2
Marlin/src/module/probe.cpp View File

@@ -116,6 +116,9 @@ float zprobe_zoffset; // Initialized by settings.load()
116 116
     #if TOUCH_MI_DEPLOY_XPOS > X_MAX_BED
117 117
       TemporaryGlobalEndstopsState unlock_x(false);
118 118
     #endif
119
+    #if TOUCH_MI_DEPLOY_YPOS > Y_MAX_BED
120
+      TemporaryGlobalEndstopsState unlock_y(false);
121
+    #endif
119 122
 
120 123
     #if ENABLED(TOUCH_MI_MANUAL_DEPLOY)
121 124
 
@@ -132,10 +135,12 @@ float zprobe_zoffset; // Initialized by settings.load()
132 135
       ui.reset_status();
133 136
       ui.goto_screen(prev_screen);
134 137
 
138
+    #elif defined(TOUCH_MI_DEPLOY_XPOS) && defined(TOUCH_MI_DEPLOY_YPOS)
139
+      do_blocking_move_to_xy(TOUCH_MI_DEPLOY_XPOS, TOUCH_MI_DEPLOY_YPOS);
135 140
     #elif defined(TOUCH_MI_DEPLOY_XPOS)
136
-
137 141
       do_blocking_move_to_x(TOUCH_MI_DEPLOY_XPOS);
138
-
142
+    #elif defined(TOUCH_MI_DEPLOY_YPOS)
143
+      do_blocking_move_to_y(TOUCH_MI_DEPLOY_YPOS);
139 144
     #endif
140 145
   }
141 146
 

Loading…
Cancel
Save