chiark / gitweb /
commit
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Wed, 8 Aug 2012 16:31:47 +0000 (17:31 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Wed, 8 Aug 2012 16:31:47 +0000 (17:31 +0100)
meta
patches/fixed-soft-limits-when-the-ori [deleted file]

diff --git a/meta b/meta
index ca21d7fa549aed9bcc3fc84d6f604a397172fd88..6f87f8f83c5608d4a44c38b44611c77a29cdae35 100644 (file)
--- a/meta
+++ b/meta
@@ -1,8 +1,7 @@
 Version: 1
-Previous: e20e2b0ba06d4eaeca31a40157f21c9ecd3486f0
+Previous: 83b9dd35011bd6b0d7f276df64b27593b4eb3815
 Head: a7ff3675bdb6149f684e0e3a15c1a594ea2db815
 Applied:
-  fixed-soft-limits-when-the-ori: 538189cc19182f28209912efd353081f18aa76e7
   makefile-support-v-1: 59de9f09a248a5af04203378018ff95f86ff092d
   m206-always-use-homing-homeing: 704568f265fbb370658a153f8240239dd776f5cc
   eeprom-provide-smaller-code-fo: 544900812e955cd117d08b5871408ad6ed14f7fd
diff --git a/patches/fixed-soft-limits-when-the-ori b/patches/fixed-soft-limits-when-the-ori
deleted file mode 100644 (file)
index ccbfc0a..0000000
+++ /dev/null
@@ -1,160 +0,0 @@
-Bottom: e5f5e950c684ca0c28d54e21dc2f0d29cd3c1c95
-Top:    c655a797e3b5192e7f839c7c53285901284a2b4b
-Author: Chris Palmer <nop.head@gmail.com>
-Date:   2012-06-02 13:17:47 +0100
-
-Fixed soft limits when the origin is in the middle.
-HOME_POS is now always where the endstop is and can be outside the limits.
-The limits are now defined by MIN_POS and MAX_POS rather than HOME_POS and MAX_LENGTH.
-The Z is axis now homed first if direction is away from the bed.
-
-Saguinololu limit pins change from MIN to MAX according to the homing direction.
-
-
----
-
-diff --git a/Marlin/Configuration.h b/Marlin/Configuration.h
-index 2da2478..1248029 100644
---- a/Marlin/Configuration.h
-+++ b/Marlin/Configuration.h
-@@ -187,9 +187,17 @@ const bool Z_ENDSTOPS_INVERTING = true; // set to true to invert the logic of th
- #define min_software_endstops true //If true, axis won't move to coordinates less than HOME_POS.
- #define max_software_endstops true  //If true, axis won't move to coordinates greater than the defined lengths below.
--#define X_MAX_LENGTH 205
--#define Y_MAX_LENGTH 205
--#define Z_MAX_LENGTH 200
-+// Travel limits after homing
-+#define X_MAX_POS 205
-+#define X_MIN_POS 0
-+#define Y_MAX_POS 205
-+#define Y_MIN_POS 0
-+#define Z_MAX_POS 200
-+#define Z_MIN_POS 0
-+
-+#define X_MAX_LENGTH (X_MAX_POS - X_MIN_POS)
-+#define Y_MAX_LENGTH (Y_MAX_POS - Y_MIN_POS)
-+#define Z_MAX_LENGTH (Z_MAX_POS - Z_MIN_POS)
- // The position of the homing switches. Use MAX_LENGTH * -0.5 if the center should be 0, 0, 0
- #define X_HOME_POS 0
-diff --git a/Marlin/Marlin.pde b/Marlin/Marlin.pde
-index 2bba422..73f1f41 100644
---- a/Marlin/Marlin.pde
-+++ b/Marlin/Marlin.pde
-@@ -562,7 +562,7 @@ bool code_seen(char code)
-     plan_buffer_line(destination[X_AXIS], destination[Y_AXIS], destination[Z_AXIS], destination[E_AXIS], feedrate/60, active_extruder); \
-     st_synchronize();\
-     \
--    current_position[LETTER##_AXIS] = (LETTER##_HOME_DIR == -1) ? LETTER##_HOME_POS : LETTER##_MAX_LENGTH;\
-+    current_position[LETTER##_AXIS] = LETTER##_HOME_POS;\
-     destination[LETTER##_AXIS] = current_position[LETTER##_AXIS];\
-     feedrate = 0.0;\
-     endstops_hit_on_purpose();\
-@@ -656,6 +656,13 @@ void process_commands()
-       }
-       feedrate = 0.0;
-       home_all_axis = !((code_seen(axis_codes[0])) || (code_seen(axis_codes[1])) || (code_seen(axis_codes[2])));
-+      
-+      #if Z_HOME_DIR > 0                      // If homing away from BED do Z first
-+      if((home_all_axis) || (code_seen(axis_codes[Z_AXIS]))) {
-+        HOMEAXIS(Z);
-+      }
-+      #endif
-+      
-       #ifdef QUICK_HOME
-       if((home_all_axis)||( code_seen(axis_codes[X_AXIS]) && code_seen(axis_codes[Y_AXIS])) )  //first diagonal move
-       {
-@@ -669,8 +676,8 @@ void process_commands()
-         plan_buffer_line(destination[X_AXIS], destination[Y_AXIS], destination[Z_AXIS], destination[E_AXIS], feedrate/60, active_extruder);
-         st_synchronize();
-     
--        current_position[X_AXIS] = (X_HOME_DIR == -1) ? X_HOME_POS : X_MAX_LENGTH;
--        current_position[Y_AXIS] = (Y_HOME_DIR == -1) ? Y_HOME_POS : Y_MAX_LENGTH;
-+        current_position[X_AXIS] = X_HOME_POS;
-+        current_position[Y_AXIS] = Y_HOME_POS;
-         plan_set_position(current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS], current_position[E_AXIS]);
-         destination[X_AXIS] = current_position[X_AXIS];
-         destination[Y_AXIS] = current_position[Y_AXIS];
-@@ -687,12 +694,14 @@ void process_commands()
-       }
-       if((home_all_axis) || (code_seen(axis_codes[Y_AXIS]))) {
--       HOMEAXIS(Y);
-+        HOMEAXIS(Y);
-       }
-       
-+      #if Z_HOME_DIR < 0                      // If homing towards BED do Z last
-       if((home_all_axis) || (code_seen(axis_codes[Z_AXIS]))) {
-         HOMEAXIS(Z);
-       }
-+      #endif
-       
-       if(code_seen(axis_codes[X_AXIS])) 
-       {
-@@ -1533,15 +1542,15 @@ void get_arc_coordinates()
- void prepare_move()
- {
-   if (min_software_endstops) {
--    if (destination[X_AXIS] < X_HOME_POS) destination[X_AXIS] = X_HOME_POS;
--    if (destination[Y_AXIS] < Y_HOME_POS) destination[Y_AXIS] = Y_HOME_POS;
--    if (destination[Z_AXIS] < Z_HOME_POS) destination[Z_AXIS] = Z_HOME_POS;
-+    if (destination[X_AXIS] < X_MIN_POS) destination[X_AXIS] = X_MIN_POS;
-+    if (destination[Y_AXIS] < Y_MIN_POS) destination[Y_AXIS] = Y_MIN_POS;
-+    if (destination[Z_AXIS] < Z_MIN_POS) destination[Z_AXIS] = Z_MIN_POS;
-   }
-   if (max_software_endstops) {
--    if (destination[X_AXIS] > X_MAX_LENGTH) destination[X_AXIS] = X_MAX_LENGTH;
--    if (destination[Y_AXIS] > Y_MAX_LENGTH) destination[Y_AXIS] = Y_MAX_LENGTH;
--    if (destination[Z_AXIS] > Z_MAX_LENGTH) destination[Z_AXIS] = Z_MAX_LENGTH;
-+    if (destination[X_AXIS] > X_MAX_POS) destination[X_AXIS] = X_MAX_POS;
-+    if (destination[Y_AXIS] > Y_MAX_POS) destination[Y_AXIS] = Y_MAX_POS;
-+    if (destination[Z_AXIS] > Z_MAX_POS) destination[Z_AXIS] = Z_MAX_POS;
-   }
-   previous_millis_cmd = millis();  
-   plan_buffer_line(destination[X_AXIS], destination[Y_AXIS], destination[Z_AXIS], destination[E_AXIS], feedrate*feedmultiply/60/100.0, active_extruder);
-diff --git a/Marlin/pins.h b/Marlin/pins.h
-index c4d5659..419ddb6 100644
---- a/Marlin/pins.h
-+++ b/Marlin/pins.h
-@@ -572,18 +572,33 @@
- #define X_STEP_PIN         15
- #define X_DIR_PIN          21
--#define X_MIN_PIN          18
--#define X_MAX_PIN           -1
-+#if X_HOME_DIR < 0
-+# define X_MIN_PIN          18 
-+# define X_MAX_PIN          -1
-+#else
-+# define X_MIN_PIN          -1
-+# define X_MAX_PIN          18
-+#endif
- #define Y_STEP_PIN         22
- #define Y_DIR_PIN          23
--#define Y_MIN_PIN          19
--#define Y_MAX_PIN          -1
-+#if Y_HOME_DIR < 0
-+# define Y_MIN_PIN          19 
-+# define Y_MAX_PIN          -1
-+#else
-+# define Y_MIN_PIN          -1
-+# define Y_MAX_PIN          19
-+#endif
- #define Z_STEP_PIN         3
- #define Z_DIR_PIN          2
--#define Z_MIN_PIN          20
--#define Z_MAX_PIN          -1
-+#if Z_HOME_DIR < 0
-+# define Z_MIN_PIN          20 
-+# define Z_MAX_PIN          -1
-+#else
-+# define Z_MIN_PIN          -1
-+# define Z_MAX_PIN          20
-+#endif
- #define E0_STEP_PIN         1
- #define E0_DIR_PIN          0