From 04efc414aff78c5ba8c3a53f42f9567fdc5740df Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Fri, 10 Aug 2012 17:37:50 +0100 Subject: [PATCH] refresh (create temporary patch) --- meta | 5 +++-- patches/refresh-temp | 43 +++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 46 insertions(+), 2 deletions(-) create mode 100644 patches/refresh-temp diff --git a/meta b/meta index e062a9b..5c885cd 100644 --- a/meta +++ b/meta @@ -1,6 +1,6 @@ Version: 1 -Previous: f967d0ef476b8d427ea2659b072b65f739a30555 -Head: ef16d2c9bd8d55b96310ef873aad725f7974f968 +Previous: d9fbac5f1f6063b41d0fda38dbcfa56f1b0ca454 +Head: b044b21cda2747038c2f917c4dd138a6650c4c7c 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: ef16d2c9bd8d55b96310ef873aad725f7974f968 + refresh-temp: b044b21cda2747038c2f917c4dd138a6650c4c7c Unapplied: enable-eeprom-settings: 8daa65176ac195afeaad4a06c00a97dfff5951fe eeprom-provide-smaller-code-fo: dcb84ce5f56d58178c15475b0611e12bfa121805 diff --git a/patches/refresh-temp b/patches/refresh-temp new file mode 100644 index 0000000..e66d397 --- /dev/null +++ b/patches/refresh-temp @@ -0,0 +1,43 @@ +Bottom: 4cb43b29e74c044fc9b498b6787e34b6a3d43e33 +Top: a47c445c515e8480838e04500acc170cc895298e +Author: Ian Jackson +Date: 2012-08-10 17:37:50 +0100 + +Refresh of m206-always-use-homing-homeing + +--- + +diff --git a/Marlin/Marlin.pde b/Marlin/Marlin.pde +index a772fa6..b358400 100644 +--- a/Marlin/Marlin.pde ++++ b/Marlin/Marlin.pde +@@ -549,20 +549,22 @@ bool code_seen(char code) + 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); + ++#define XYZ_CONSTS_FROM_CONFIG(type, array, CONFIG) \ ++static const PROGMEM type array##_P[3] = \ ++ { X_##CONFIG, Y_##CONFIG, Z_##CONFIG }; \ ++static inline type array(int axis) \ ++ { return pgm_read_any(&array##_P[axis]); } ++ + 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(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]; ++ current_position[axis] = base_home_pos(axis) + add_homeing[axis]; ++ min_pos[axis] = base_min_pos(axis) + add_homeing[axis]; ++ max_pos[axis] = base_max_pos(axis) + add_homeing[axis]; + } + + #define HOMEAXIS(LETTER) \ -- 2.30.2