Преглед на файлове

No delay for the smallest LCD moves

Scott Lahteine преди 9 години
родител
ревизия
ecd5e810ac
променени са 1 файла, в които са добавени 4 реда и са изтрити 4 реда
  1. 4
    4
      Marlin/ultralcd.cpp

+ 4
- 4
Marlin/ultralcd.cpp Целия файл

@@ -1303,12 +1303,14 @@ void kill_screen(const char* lcd_msg) {
1303 1303
 
1304 1304
   #endif // DELTA_CALIBRATION_MENU
1305 1305
 
1306
+  float move_menu_scale;
1307
+
1306 1308
   /**
1307 1309
    * If the most recent manual move hasn't been fed to the planner yet,
1308 1310
    * and the planner can accept one, send immediately
1309 1311
    */
1310 1312
   inline void manage_manual_move() {
1311
-    if (manual_move_axis != (int8_t)NO_AXIS && millis() >= manual_move_start_time && !planner.is_full()) {
1313
+    if (manual_move_axis != (int8_t)NO_AXIS && ELAPSED(millis(), manual_move_start_time) && !planner.is_full()) {
1312 1314
       #if ENABLED(DELTA)
1313 1315
         calculate_delta(current_position);
1314 1316
         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);
@@ -1331,7 +1333,7 @@ void kill_screen(const char* lcd_msg) {
1331 1333
     #if EXTRUDERS > 1
1332 1334
       if (axis == E_AXIS) manual_move_e_index = eindex >= 0 ? eindex : active_extruder;
1333 1335
     #endif
1334
-    manual_move_start_time = millis() + 500UL; // 1/2 second delay
1336
+    manual_move_start_time = millis() + (move_menu_scale < 0.99 ? 0UL : 250UL); // delay for bigger moves
1335 1337
     manual_move_axis = (int8_t)axis;
1336 1338
   }
1337 1339
 
@@ -1341,8 +1343,6 @@ void kill_screen(const char* lcd_msg) {
1341 1343
    *
1342 1344
    */
1343 1345
 
1344
-  float move_menu_scale;
1345
-
1346 1346
   static void _lcd_move_xyz(const char* name, AxisEnum axis, float min, float max) {
1347 1347
     if (LCD_CLICKED) { lcd_goto_previous_menu(true); return; }
1348 1348
     ENCODER_DIRECTION_NORMAL();

Loading…
Отказ
Запис