浏览代码

Merge pull request #4285 from thinkyhead/rc_manual_move_fast_fine

No delay for the smallest LCD moves
Scott Lahteine 9 年前
父节点
当前提交
2224032568
共有 2 个文件被更改,包括 5 次插入11 次删除
  1. 1
    7
      Marlin/Marlin_main.cpp
  2. 4
    4
      Marlin/ultralcd.cpp

+ 1
- 7
Marlin/Marlin_main.cpp 查看文件

@@ -1707,12 +1707,6 @@ static void clean_up_after_endstop_or_probe_move() {
1707 1707
 
1708 1708
   /**
1709 1709
    * Raise Z to a minimum height to make room for a probe to move
1710
-   *
1711
-   * zprobe_zoffset: Negative of the Z height where the probe engages
1712
-   *        z_raise: The probing raise distance
1713
-   *
1714
-   * The zprobe_zoffset is negative for a switch below the nozzle, so
1715
-   * multiply by Z_HOME_DIR (-1) to move enough away from the bed.
1716 1710
    */
1717 1711
   inline void do_probe_raise(float z_raise) {
1718 1712
     #if ENABLED(DEBUG_LEVELING_FEATURE)
@@ -1723,7 +1717,7 @@ static void clean_up_after_endstop_or_probe_move() {
1723 1717
     #endif
1724 1718
     float z_dest = home_offset[Z_AXIS] + z_raise;
1725 1719
 
1726
-    if ((Z_HOME_DIR) < 0 && zprobe_zoffset < 0)
1720
+    if (zprobe_zoffset < 0)
1727 1721
       z_dest -= zprobe_zoffset;
1728 1722
 
1729 1723
     if (z_dest > current_position[Z_AXIS])

+ 4
- 4
Marlin/ultralcd.cpp 查看文件

@@ -1293,12 +1293,14 @@ void kill_screen(const char* lcd_msg) {
1293 1293
 
1294 1294
   #endif // DELTA_CALIBRATION_MENU
1295 1295
 
1296
+  float move_menu_scale;
1297
+
1296 1298
   /**
1297 1299
    * If the most recent manual move hasn't been fed to the planner yet,
1298 1300
    * and the planner can accept one, send immediately
1299 1301
    */
1300 1302
   inline void manage_manual_move() {
1301
-    if (manual_move_axis != (int8_t)NO_AXIS && millis() >= manual_move_start_time && !planner.is_full()) {
1303
+    if (manual_move_axis != (int8_t)NO_AXIS && ELAPSED(millis(), manual_move_start_time) && !planner.is_full()) {
1302 1304
       #if ENABLED(DELTA)
1303 1305
         calculate_delta(current_position);
1304 1306
         planner.buffer_line(delta[X_AXIS], delta[Y_AXIS], delta[Z_AXIS], current_position[E_AXIS], manual_feedrate[manual_move_axis]/60, manual_move_e_index);
@@ -1321,7 +1323,7 @@ void kill_screen(const char* lcd_msg) {
1321 1323
     #if EXTRUDERS > 1
1322 1324
       if (axis == E_AXIS) manual_move_e_index = eindex >= 0 ? eindex : active_extruder;
1323 1325
     #endif
1324
-    manual_move_start_time = millis() + 500UL; // 1/2 second delay
1326
+    manual_move_start_time = millis() + (move_menu_scale < 0.99 ? 0UL : 250UL); // delay for bigger moves
1325 1327
     manual_move_axis = (int8_t)axis;
1326 1328
   }
1327 1329
 
@@ -1331,8 +1333,6 @@ void kill_screen(const char* lcd_msg) {
1331 1333
    *
1332 1334
    */
1333 1335
 
1334
-  float move_menu_scale;
1335
-
1336 1336
   static void _lcd_move_xyz(const char* name, AxisEnum axis, float min, float max) {
1337 1337
     if (LCD_CLICKED) { lcd_goto_previous_menu(true); return; }
1338 1338
     ENCODER_DIRECTION_NORMAL();

正在加载...
取消
保存