chiark / gitweb /
refresh (create temporary patch)
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Fri, 10 Aug 2012 16:52:56 +0000 (17:52 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Fri, 10 Aug 2012 16:52:56 +0000 (17:52 +0100)
meta
patches/refresh-temp [new file with mode: 0644]

diff --git a/meta b/meta
index 2e5d88559a1a1fbf7ef6cccaf2588b50647f6408..b89d2e194413a3743c77e249559f9b659ac67c10 100644 (file)
--- a/meta
+++ b/meta
@@ -1,6 +1,6 @@
 Version: 1
-Previous: efc882a7263dcdb0e352bbb0c706d74e73a69cf6
-Head: 99e56a6974481a96cda947c6e441e2507294086f
+Previous: e899f75158ea664794ceb79e30aecd14c45b56cb
+Head: 00e1d995f16f47e2c77f794df9d5ceaeba04f414
 Applied:
   marlin-pde-include-comment-for: 5b815da4d7f0a5bf87fbd2e70286f928e87b4d0d
   add-to-marlin-gitignore: 79afa80f1a7740edceceb4a4deda713d9b55960e
@@ -11,6 +11,7 @@ Applied:
   enable-eeprom-settings: 4562a2810820a07bd84b55496164b5f4f4858eaa
   eeprom-provide-smaller-code-fo: a18cc767374a4f34713ab94fc092449a1422a821
   homeaxis-function: 99e56a6974481a96cda947c6e441e2507294086f
+  refresh-temp: 00e1d995f16f47e2c77f794df9d5ceaeba04f414
 Unapplied:
   m206-save-values-in-eeprom: 94f5db01474efcbab9861266b525673769975493
 Hidden:
diff --git a/patches/refresh-temp b/patches/refresh-temp
new file mode 100644 (file)
index 0000000..6b922ac
--- /dev/null
@@ -0,0 +1,35 @@
+Bottom: 064d2ebbfaedce0d6a0db10ec0861311bbfbc47e
+Top:    75d4a31db3e7cb32ded340b9de197cee58e943b7
+Author: Ian Jackson <ijackson@chiark.greenend.org.uk>
+Date:   2012-08-10 17:52:55 +0100
+
+Refresh of homeaxis-function
+
+---
+
+diff --git a/Marlin/Marlin.pde b/Marlin/Marlin.pde
+index 36118f8..fdb1b98 100644
+--- a/Marlin/Marlin.pde
++++ b/Marlin/Marlin.pde
+@@ -579,15 +579,13 @@ static void axis_is_at_home(int axis) {
+ }
+ static void homeaxis(int axis) {
+-#define HOMEAXIS_DO_BIT(LETTER) \
+-  ((LETTER##_MIN_PIN > -1 && LETTER##_HOME_DIR==-1) || (LETTER##_MAX_PIN > -1 && LETTER##_HOME_DIR==1) ? 1 << LETTER##_AXIS : 0)
++#define HOMEAXIS_DO(LETTER) \
++  ((LETTER##_MIN_PIN > -1 && LETTER##_HOME_DIR==-1) || (LETTER##_MAX_PIN > -1 && LETTER##_HOME_DIR==1))
+-  const unsigned char doaxis =
+-    HOMEAXIS_DO_BIT(X) | 
+-    HOMEAXIS_DO_BIT(Y) |
+-    HOMEAXIS_DO_BIT(Z);
+-
+-  if (doaxis & (1<<axis)) {
++  if (axis==X_AXIS ? HOMEAXIS_DO(X) :
++      axis==Y_AXIS ? HOMEAXIS_DO(Y) :
++      axis==Z_AXIS ? HOMEAXIS_DO(Z) :
++      0) {
+     current_position[axis] = 0;
+     plan_set_position(current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS], current_position[E_AXIS]);
+     destination[axis] = 1.5 * max_length(axis) * home_dir(axis);