瀏覽代碼

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
 
1707
 
1708
   /**
1708
   /**
1709
    * Raise Z to a minimum height to make room for a probe to move
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
   inline void do_probe_raise(float z_raise) {
1711
   inline void do_probe_raise(float z_raise) {
1718
     #if ENABLED(DEBUG_LEVELING_FEATURE)
1712
     #if ENABLED(DEBUG_LEVELING_FEATURE)
1723
     #endif
1717
     #endif
1724
     float z_dest = home_offset[Z_AXIS] + z_raise;
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
       z_dest -= zprobe_zoffset;
1721
       z_dest -= zprobe_zoffset;
1728
 
1722
 
1729
     if (z_dest > current_position[Z_AXIS])
1723
     if (z_dest > current_position[Z_AXIS])

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

1293
 
1293
 
1294
   #endif // DELTA_CALIBRATION_MENU
1294
   #endif // DELTA_CALIBRATION_MENU
1295
 
1295
 
1296
+  float move_menu_scale;
1297
+
1296
   /**
1298
   /**
1297
    * If the most recent manual move hasn't been fed to the planner yet,
1299
    * If the most recent manual move hasn't been fed to the planner yet,
1298
    * and the planner can accept one, send immediately
1300
    * and the planner can accept one, send immediately
1299
    */
1301
    */
1300
   inline void manage_manual_move() {
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
       #if ENABLED(DELTA)
1304
       #if ENABLED(DELTA)
1303
         calculate_delta(current_position);
1305
         calculate_delta(current_position);
1304
         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);
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
     #if EXTRUDERS > 1
1323
     #if EXTRUDERS > 1
1322
       if (axis == E_AXIS) manual_move_e_index = eindex >= 0 ? eindex : active_extruder;
1324
       if (axis == E_AXIS) manual_move_e_index = eindex >= 0 ? eindex : active_extruder;
1323
     #endif
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
     manual_move_axis = (int8_t)axis;
1327
     manual_move_axis = (int8_t)axis;
1326
   }
1328
   }
1327
 
1329
 
1331
    *
1333
    *
1332
    */
1334
    */
1333
 
1335
 
1334
-  float move_menu_scale;
1335
-
1336
   static void _lcd_move_xyz(const char* name, AxisEnum axis, float min, float max) {
1336
   static void _lcd_move_xyz(const char* name, AxisEnum axis, float min, float max) {
1337
     if (LCD_CLICKED) { lcd_goto_previous_menu(true); return; }
1337
     if (LCD_CLICKED) { lcd_goto_previous_menu(true); return; }
1338
     ENCODER_DIRECTION_NORMAL();
1338
     ENCODER_DIRECTION_NORMAL();

Loading…
取消
儲存