From: Ian Jackson Date: Thu, 9 Aug 2012 18:05:25 +0000 (+0100) Subject: pop (CONFLICT) X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=commitdiff_plain;h=27822807e4758edbd00ea0c9bd70ed0ebab6a3d2;p=marlin.git pop (CONFLICT) --- diff --git a/meta b/meta index 155ad21..3145f0d 100644 --- a/meta +++ b/meta @@ -1,5 +1,5 @@ Version: 1 -Previous: 31d248be2af8ae7b38ebd906ee76199ac72007ce +Previous: f0b77d1b0d27b29e6c1f0f154d446e060866310b Head: 2b3d05b5970c73c0e075fceacfc1650acf0213ab Applied: marlin-pde-include-comment-for: 121f976406e6921f5b511f6dc4882985cf4b4133 @@ -10,8 +10,8 @@ Applied: m206-always-use-homing-homeing: b5a83e7c60fcd37ea70396d521924b6c62555feb eeprom-provide-smaller-code-fo: 734e4f2645cecfee83e7ac0cb12ffe2a393f5f91 m206-save-values-in-eeprom: edd3bb378915a4d3e17e3425db249807c73cc223 + homeaxis-function: 2b3d05b5970c73c0e075fceacfc1650acf0213ab Unapplied: - homeaxis-function: 48f1b27f67cb5a1b59e72d4ab9c5bfe05c88870d enable-eeprom-settings: d8e404a6e1984efdaa7ede947fed09a0bcf9051c Hidden: enable-eeprom-settings: d8e404a6e1984efdaa7ede947fed09a0bcf9051c diff --git a/patches/homeaxis-function b/patches/homeaxis-function index 7ff39b4..508bf82 100644 --- a/patches/homeaxis-function +++ b/patches/homeaxis-function @@ -1,5 +1,5 @@ -Bottom: d0b029a8140f01e21d7551a3244bc0dfc44861e3 -Top: d4c7ea1a64c2179833d726dac6e9a76d170ff23b +Bottom: 52539e835a54ac0f6858a1c830cc03875bec4769 +Top: 52539e835a54ac0f6858a1c830cc03875bec4769 Author: Ian Jackson Date: 2012-08-08 18:30:34 +0100 @@ -14,91 +14,4 @@ Signed-off-by: Ian Jackson --- -diff --git a/Marlin/Marlin.pde b/Marlin/Marlin.pde -index 5af15f0..d481aae 100644 ---- a/Marlin/Marlin.pde -+++ b/Marlin/Marlin.pde -@@ -551,8 +551,14 @@ bool code_seen(char code) - return (strchr_pointer != NULL); //Return True if a character was found - } - --static const float base_min_pos[3] = { X_MIN_POS, Y_MIN_POS, Z_MIN_POS }; --static const float base_home_pos[3] = { X_HOME_POS, Y_HOME_POS, Z_HOME_POS }; -+#define XYZ_CONSTS_FROM_CONFIG(type, array, CONFIG) \ -+static const type array[3] = { X_##CONFIG, Y_##CONFIG, Z_##CONFIG }; -+ -+XYZ_CONSTS_FROM_CONFIG(float, base_min_pos, MIN_POS); -+XYZ_CONSTS_FROM_CONFIG(float, base_home_pos, HOME_POS); -+XYZ_CONSTS_FROM_CONFIG(float, max_length, MAX_LENGTH); -+XYZ_CONSTS_FROM_CONFIG(float, home_retract_mm, HOME_RETRACT_MM); -+XYZ_CONSTS_FROM_CONFIG(signed char, home_dir, HOME_DIR); - - static void axis_is_at_home(int axis) { - current_position[axis] = base_home_pos[axis] + add_homeing[axis]; -@@ -560,32 +566,41 @@ static void axis_is_at_home(int axis) { - if (add_homeing[axis] < 0) min_pos[axis] += add_homeing[axis]; - } - --#define HOMEAXIS(LETTER) \ -- if ((LETTER##_MIN_PIN > -1 && LETTER##_HOME_DIR==-1) || (LETTER##_MAX_PIN > -1 && LETTER##_HOME_DIR==1))\ -- { \ -- current_position[LETTER##_AXIS] = 0; \ -- plan_set_position(current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS], current_position[E_AXIS]); \ -- destination[LETTER##_AXIS] = 1.5 * LETTER##_MAX_LENGTH * LETTER##_HOME_DIR; \ -- feedrate = homing_feedrate[LETTER##_AXIS]; \ -- 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] = 0;\ -- plan_set_position(current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS], current_position[E_AXIS]);\ -- destination[LETTER##_AXIS] = -LETTER##_HOME_RETRACT_MM * LETTER##_HOME_DIR;\ -- plan_buffer_line(destination[X_AXIS], destination[Y_AXIS], destination[Z_AXIS], destination[E_AXIS], feedrate/60, active_extruder); \ -- st_synchronize();\ -- \ -- destination[LETTER##_AXIS] = 2*LETTER##_HOME_RETRACT_MM * LETTER##_HOME_DIR;\ -- feedrate = homing_feedrate[LETTER##_AXIS]/2 ; \ -- plan_buffer_line(destination[X_AXIS], destination[Y_AXIS], destination[Z_AXIS], destination[E_AXIS], feedrate/60, active_extruder); \ -- st_synchronize();\ -- \ -- axis_is_at_home(LETTER##_AXIS); \ -- destination[LETTER##_AXIS] = current_position[LETTER##_AXIS]; \ -- feedrate = 0.0;\ -- endstops_hit_on_purpose();\ -+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) -+ -+ static const unsigned char doaxis = -+ HOMEAXIS_DO_BIT(X) | -+ HOMEAXIS_DO_BIT(Y) | -+ HOMEAXIS_DO_BIT(Z); -+ -+ if (doaxis & (1<