Sfoglia il codice sorgente

Merge pull request #531 from iXce/Marlin_v1_lcd

Only clamp panel movements if software endstops are enabled
ErikZalm 11 anni fa
parent
commit
8a2a3ef91d
1 ha cambiato i file con 6 aggiunte e 6 eliminazioni
  1. 6
    6
      Marlin/ultralcd.cpp

+ 6
- 6
Marlin/ultralcd.cpp Vedi File

@@ -360,9 +360,9 @@ static void lcd_move_x()
360 360
     if (encoderPosition != 0)
361 361
     {
362 362
         current_position[X_AXIS] += float((int)encoderPosition) * move_menu_scale;
363
-        if (current_position[X_AXIS] < X_MIN_POS)
363
+        if (min_software_endstops && current_position[X_AXIS] < X_MIN_POS)
364 364
             current_position[X_AXIS] = X_MIN_POS;
365
-        if (current_position[X_AXIS] > X_MAX_POS)
365
+        if (max_software_endstops && current_position[X_AXIS] > X_MAX_POS)
366 366
             current_position[X_AXIS] = X_MAX_POS;
367 367
         encoderPosition = 0;
368 368
         plan_buffer_line(current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS], current_position[E_AXIS], 600, active_extruder);
@@ -384,9 +384,9 @@ static void lcd_move_y()
384 384
     if (encoderPosition != 0)
385 385
     {
386 386
         current_position[Y_AXIS] += float((int)encoderPosition) * move_menu_scale;
387
-        if (current_position[Y_AXIS] < Y_MIN_POS)
387
+        if (min_software_endstops && current_position[Y_AXIS] < Y_MIN_POS)
388 388
             current_position[Y_AXIS] = Y_MIN_POS;
389
-        if (current_position[Y_AXIS] > Y_MAX_POS)
389
+        if (max_software_endstops && current_position[Y_AXIS] > Y_MAX_POS)
390 390
             current_position[Y_AXIS] = Y_MAX_POS;
391 391
         encoderPosition = 0;
392 392
         plan_buffer_line(current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS], current_position[E_AXIS], 600, active_extruder);
@@ -408,9 +408,9 @@ static void lcd_move_z()
408 408
     if (encoderPosition != 0)
409 409
     {
410 410
         current_position[Z_AXIS] += float((int)encoderPosition) * move_menu_scale;
411
-        if (current_position[Z_AXIS] < Z_MIN_POS)
411
+        if (min_software_endstops && current_position[Z_AXIS] < Z_MIN_POS)
412 412
             current_position[Z_AXIS] = Z_MIN_POS;
413
-        if (current_position[Z_AXIS] > Z_MAX_POS)
413
+        if (max_software_endstops && current_position[Z_AXIS] > Z_MAX_POS)
414 414
             current_position[Z_AXIS] = Z_MAX_POS;
415 415
         encoderPosition = 0;
416 416
         plan_buffer_line(current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS], current_position[E_AXIS], homing_feedrate[Z_AXIS]/60, active_extruder);

Loading…
Annulla
Salva