From 4b18157b771a19c60930208026fc0d97ab873c5c Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Fri, 10 Aug 2012 17:21:46 +0100 Subject: [PATCH] refresh --- meta | 7 ++- patches/homeaxis-function | 84 +++++++++++++++++++++++++++++++++++- patches/refresh-temp | 90 --------------------------------------- 3 files changed, 85 insertions(+), 96 deletions(-) delete mode 100644 patches/refresh-temp diff --git a/meta b/meta index 89f14e5..95efc22 100644 --- a/meta +++ b/meta @@ -1,6 +1,6 @@ Version: 1 -Previous: b0e82293849440d91ef1375c8125979436543258 -Head: ba401ebd0b06f63d60a4f3480073109df95dfa0b +Previous: 0ca9acbf22e7de2baab209db761628b8c1c15dbd +Head: 3455f9baf8039a65591e71254a0926e3c44dfe0a Applied: marlin-pde-include-comment-for: 5b815da4d7f0a5bf87fbd2e70286f928e87b4d0d add-to-marlin-gitignore: 79afa80f1a7740edceceb4a4deda713d9b55960e @@ -10,8 +10,7 @@ Applied: m206-always-use-homing-homeing: 72e895deb734e65f156210332af659bcf42ea5f1 enable-eeprom-settings: 90e370bcce40d48795f310379a556beda3c0b294 eeprom-provide-smaller-code-fo: 0fbea35eb16f424788f2eb30d8a49dd3808f7a73 - homeaxis-function: cbcc7aa58ad53444050f92de0db19bfd10d1e99c - refresh-temp: ba401ebd0b06f63d60a4f3480073109df95dfa0b + homeaxis-function: 3455f9baf8039a65591e71254a0926e3c44dfe0a Unapplied: m206-save-values-in-eeprom: 94f5db01474efcbab9861266b525673769975493 Hidden: diff --git a/patches/homeaxis-function b/patches/homeaxis-function index a25b34b..b7999f4 100644 --- a/patches/homeaxis-function +++ b/patches/homeaxis-function @@ -1,5 +1,5 @@ Bottom: 36e31553d776fe0068394d49b207ca63596f8dbb -Top: 36e31553d776fe0068394d49b207ca63596f8dbb +Top: 8b7597d0f1ac793cc0fe323614e4d4e5fabead5b Author: Ian Jackson Date: 2012-08-08 18:30:34 +0100 @@ -14,4 +14,84 @@ Signed-off-by: Ian Jackson --- - +diff --git a/Marlin/Marlin.pde b/Marlin/Marlin.pde +index a854714..c6dadfc 100644 +--- a/Marlin/Marlin.pde ++++ b/Marlin/Marlin.pde +@@ -559,6 +559,9 @@ static const PROGMEM type array##_P[3] = { X_##CONFIG, Y_##CONFIG, Z_##CONFIG }; + 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); ++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] = XYZ_CONFIG(float, base_home_pos,axis) + add_homeing[axis]; +@@ -566,32 +569,41 @@ static void axis_is_at_home(int axis) { + max_pos[axis] = XYZ_CONFIG(float, base_max_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 PROGMEM const unsigned char doaxis = ++ HOMEAXIS_DO_BIT(X) | ++ HOMEAXIS_DO_BIT(Y) | ++ HOMEAXIS_DO_BIT(Z); ++ ++ if (doaxis & (1< -Date: 2012-08-10 17:21:46 +0100 - -Refresh of homeaxis-function - ---- - -diff --git a/Marlin/Marlin.pde b/Marlin/Marlin.pde -index a854714..c6dadfc 100644 ---- a/Marlin/Marlin.pde -+++ b/Marlin/Marlin.pde -@@ -559,6 +559,9 @@ static const PROGMEM type array##_P[3] = { X_##CONFIG, Y_##CONFIG, Z_##CONFIG }; - 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); -+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] = XYZ_CONFIG(float, base_home_pos,axis) + add_homeing[axis]; -@@ -566,32 +569,41 @@ static void axis_is_at_home(int axis) { - max_pos[axis] = XYZ_CONFIG(float, base_max_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 PROGMEM const unsigned char doaxis = -+ HOMEAXIS_DO_BIT(X) | -+ HOMEAXIS_DO_BIT(Y) | -+ HOMEAXIS_DO_BIT(Z); -+ -+ if (doaxis & (1<