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

diff --git a/meta b/meta
index 9dd913b8c294a41263f2a73012138cf1de7fdbd7..778353314f7dd01095bdd5c7518b91da33178f4f 100644 (file)
--- a/meta
+++ b/meta
@@ -1,6 +1,6 @@
 Version: 1
-Previous: 7ba509dd35adcbef7d6fa240f2e87ee36657e398
-Head: 72e895deb734e65f156210332af659bcf42ea5f1
+Previous: dce75fbd2eb07f82f5d7b8422a14a40c3c4328c4
+Head: 71488c39ecb9c2d2fcd9a56a5e9e89ca118bdfe9
 Applied:
   marlin-pde-include-comment-for: 5b815da4d7f0a5bf87fbd2e70286f928e87b4d0d
   add-to-marlin-gitignore: 79afa80f1a7740edceceb4a4deda713d9b55960e
@@ -8,6 +8,7 @@ Applied:
   makefile-avr-size: b1f12330781628c6463068489f7f052bf791bf0e
   motion-control-max-min: fef5e25d43e7d8429283b9e34205172aaa3a6a2f
   m206-always-use-homing-homeing: 72e895deb734e65f156210332af659bcf42ea5f1
+  refresh-temp: 71488c39ecb9c2d2fcd9a56a5e9e89ca118bdfe9
 Unapplied:
   enable-eeprom-settings: 90e370bcce40d48795f310379a556beda3c0b294
   eeprom-provide-smaller-code-fo: 0fbea35eb16f424788f2eb30d8a49dd3808f7a73
diff --git a/patches/refresh-temp b/patches/refresh-temp
new file mode 100644 (file)
index 0000000..7caf0be
--- /dev/null
@@ -0,0 +1,42 @@
+Bottom: d755416e1e02ccf9a60164760460cedc7a2fa44a
+Top:    4cb43b29e74c044fc9b498b6787e34b6a3d43e33
+Author: Ian Jackson <ijackson@chiark.greenend.org.uk>
+Date:   2012-08-10 17:31:32 +0100
+
+Refresh of m206-always-use-homing-homeing
+
+---
+
+diff --git a/Marlin/Marlin.pde b/Marlin/Marlin.pde
+index 5b00f9c..a772fa6 100644
+--- a/Marlin/Marlin.pde
++++ b/Marlin/Marlin.pde
+@@ -545,18 +545,24 @@ bool code_seen(char code)
+   return (strchr_pointer != NULL);  //Return True if a character was found
+ }
+-#define XYZ_CONFIG(type,array,axis) (pgm_read_##type##_near(&array##_P[(axis)]))
++#define DEFINE_PGM_READ_ANY(type, reader)             \
++    static inline float pgm_read_any(const type *p)   \
++      { return pgm_read_##reader##_near(p); }
++
++#define XYZ_CONFIG(array,axis) (pgm_read_any(&array##_P[(axis)]))
+ #define XYZ_CONSTS_FROM_CONFIG(type, array, CONFIG) \
+ static const PROGMEM type array##_P[3] = { X_##CONFIG, Y_##CONFIG, Z_##CONFIG };
++DEFINE_PGM_READ_ANY(float,       float);
++
+ XYZ_CONSTS_FROM_CONFIG(float, base_min_pos,    MIN_POS);
+ XYZ_CONSTS_FROM_CONFIG(float, base_max_pos,    MAX_POS);
+ XYZ_CONSTS_FROM_CONFIG(float, base_home_pos,   HOME_POS);
+ static void axis_is_at_home(int axis) {
+-  current_position[axis] = XYZ_CONFIG(float, base_home_pos,axis) + add_homeing[axis];
+-  min_pos[axis] = XYZ_CONFIG(float, base_min_pos, axis) + add_homeing[axis];
+-  max_pos[axis] = XYZ_CONFIG(float, base_max_pos, axis) + add_homeing[axis];
++  current_position[axis] = XYZ_CONFIG(base_home_pos, axis) + add_homeing[axis];
++  min_pos[axis] =          XYZ_CONFIG(base_min_pos, axis) + add_homeing[axis];
++  max_pos[axis] =          XYZ_CONFIG(base_max_pos, axis) + add_homeing[axis];
+ }
+ #define HOMEAXIS(LETTER) \