chiark / gitweb /
refresh (create temporary patch)
[marlin.git] / patches / refresh-temp
1 Bottom: ff33f6a6b492d6f370c84bddac52ac277dbd0fd9
2 Top:    681cec9bc49d48ceecfc6d5e9eff1c4f7f623fc6
3 Author: Ian Jackson <ijackson@chiark.greenend.org.uk>
4 Date:   2012-08-11 01:34:58 +0100
5
6 Refresh of motion-control-max-min
7
8 ---
9
10 diff --git a/Marlin/Marlin.pde b/Marlin/Marlin.pde
11 index d471d49..5268a3d 100644
12 --- a/Marlin/Marlin.pde
13 +++ b/Marlin/Marlin.pde
14 @@ -1544,15 +1544,15 @@ void get_arc_coordinates()
15  void clamp_to_software_endstops(float target[3])
16  {
17    if (min_software_endstops) {
18 -    if (destination[X_AXIS] < X_MIN_POS) destination[X_AXIS] = X_MIN_POS;
19 -    if (destination[Y_AXIS] < Y_MIN_POS) destination[Y_AXIS] = Y_MIN_POS;
20 -    if (destination[Z_AXIS] < Z_MIN_POS) destination[Z_AXIS] = Z_MIN_POS;
21 +    if (target[X_AXIS] < X_MIN_POS) target[X_AXIS] = X_MIN_POS;
22 +    if (target[Y_AXIS] < Y_MIN_POS) target[Y_AXIS] = Y_MIN_POS;
23 +    if (target[Z_AXIS] < Z_MIN_POS) target[Z_AXIS] = Z_MIN_POS;
24    }
25  
26    if (max_software_endstops) {
27 -    if (destination[X_AXIS] > X_MAX_POS) destination[X_AXIS] = X_MAX_POS;
28 -    if (destination[Y_AXIS] > Y_MAX_POS) destination[Y_AXIS] = Y_MAX_POS;
29 -    if (destination[Z_AXIS] > Z_MAX_POS) destination[Z_AXIS] = Z_MAX_POS;
30 +    if (target[X_AXIS] > X_MAX_POS) target[X_AXIS] = X_MAX_POS;
31 +    if (target[Y_AXIS] > Y_MAX_POS) target[Y_AXIS] = Y_MAX_POS;
32 +    if (target[Z_AXIS] > Z_MAX_POS) target[Z_AXIS] = Z_MAX_POS;
33    }
34  }