Version: 1
-Previous: ed5bd360c8309422cb348084f8184f69aef020bf
-Head: f378c618e94a886db0864170e79f5fb0b98e8bb4
+Previous: 29a5226c1e9301a1080d603715b65d4390637416
+Head: 71f5d005126298c899d87701cbdd432c76dd4480
Applied:
marlin-pde-include-comment-for: 5b815da4d7f0a5bf87fbd2e70286f928e87b4d0d
add-to-marlin-gitignore: 79afa80f1a7740edceceb4a4deda713d9b55960e
makefile-support-v-1: 5f826531e0328e319ddb53617e4f3ade33537c92
makefile-avr-size: 560fd88074327c52739beb389cd339c78f009adf
motion-control-max-min: 33f9aa6d9952e7f643bb2f7eba39f7bd1a765f86
- m206-always-use-homing-homeing: 965d378ed7d5793305f1d4fda8d4c39a386660cb
- refresh-temp: f378c618e94a886db0864170e79f5fb0b98e8bb4
+ m206-always-use-homing-homeing: 71f5d005126298c899d87701cbdd432c76dd4480
Unapplied:
eeprom-provide-smaller-code-fo: 7efd5690d57a016afbe296adc23a652966703635
m206-save-values-in-eeprom: 59c1673d4b5d6cf92e3cd9d164a88222fe658d69
Bottom: ff33f6a6b492d6f370c84bddac52ac277dbd0fd9
-Top: c2feea4afd56caea863e82cd486423f93f510614
+Top: ad98c0229e8c7036d7c4e6d12cdf7a7e26176d84
Author: Ian Jackson <ijackson@chiark.greenend.org.uk>
Date: 2012-08-01 21:12:14 +0100
to the home position shift or change the possible range of movement
permitted by the software endstops ?
-I have taken the view that the software endstops are a backstop safety
-feature which is not necessarily entirely accurate, and that reducing
-the scope of movement, at either end, is not desirable. I have
-therefore arranged that nonzero values for M206 increase the total
-range of movement.
-
-So for example with
- #define X_MIN_POS 0
+The documentation in Configuration.h describes these limits as:
+ // Travel limits after homing
+Since this is a file containing physical limits, and actual suggested
+values for these configuration parameters appear to include a certain
+amount of slop, I've taken the view that these should be regarded as
+nominal physical distances from the limit switches, and that the
+permissible travel should be unaffected by M206.
+
+So for example with the (rather unrealistic)
+ #define X_HOME_DIR -1
+ #define X_MIN_POS -20
#define X_HOME_POS 0
#define X_MAX_POS 100
+no matter the setting of M206 X, the machine would be permitted
+to move from 20mm "beyond" the limit switch trigger point in
+the negative X direction and 100mm away from the limit switch in
+the positive X direction, for a total travel of 120mm.
-M206 X-10 would permit the machine to move from the endstop
-(considered X=-10) 110mm in the positive X direction (considered
-X=+100).
-
-M206 X+10 would permit the machine to move from the endstop
-(considered X=-10) 110mm in the positive X direction (considered
-X=+110).
+With M206 X-10 that would be considered to correspond to X coordinates
+-30 to +90. With M206 X+10 that would be considered to correspond to
+X coordinates -10 to +110.
fixes #200 (in ErikZalm/Marlin).
// Handling multiple extruders pins
diff --git a/Marlin/Marlin.pde b/Marlin/Marlin.pde
-index d471d49..be91124 100644
+index d471d49..05e7d5a 100644
--- a/Marlin/Marlin.pde
+++ b/Marlin/Marlin.pde
@@ -143,6 +143,8 @@ volatile bool feedmultiplychanged=false;
uint8_t active_extruder = 0;
unsigned char FanSpeed=0;
-@@ -543,6 +545,18 @@ bool code_seen(char code)
+@@ -543,6 +545,16 @@ bool code_seen(char code)
return (strchr_pointer != NULL); //Return True if a character was found
}
+
+static void axis_is_at_home(int axis) {
+ current_position[axis] = base_home_pos[axis] + add_homeing[axis];
-+ min_pos[axis] = base_min_pos[axis];
-+ max_pos[axis] = base_max_pos[axis];
-+ if (add_homeing[axis] < 0) min_pos[axis] += add_homeing[axis];
-+ else max_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) \
if ((LETTER##_MIN_PIN > -1 && LETTER##_HOME_DIR==-1) || (LETTER##_MAX_PIN > -1 && LETTER##_HOME_DIR==1))\
{ \
-@@ -564,8 +578,8 @@ bool code_seen(char code)
+@@ -564,8 +576,8 @@ bool code_seen(char code)
plan_buffer_line(destination[X_AXIS], destination[Y_AXIS], destination[Z_AXIS], destination[E_AXIS], feedrate/60, active_extruder); \
st_synchronize();\
\
feedrate = 0.0;\
endstops_hit_on_purpose();\
}
-@@ -678,8 +692,8 @@ void process_commands()
+@@ -678,8 +690,8 @@ void process_commands()
plan_buffer_line(destination[X_AXIS], destination[Y_AXIS], destination[Z_AXIS], destination[E_AXIS], feedrate/60, active_extruder);
st_synchronize();
plan_set_position(current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS], current_position[E_AXIS]);
destination[X_AXIS] = current_position[X_AXIS];
destination[Y_AXIS] = current_position[Y_AXIS];
-@@ -1544,15 +1558,15 @@ void get_arc_coordinates()
+@@ -1544,15 +1556,15 @@ void get_arc_coordinates()
void clamp_to_software_endstops(float target[3])
{
if (min_software_endstops) {
+++ /dev/null
-Bottom: c2feea4afd56caea863e82cd486423f93f510614
-Top: ad98c0229e8c7036d7c4e6d12cdf7a7e26176d84
-Author: Ian Jackson <ijackson@chiark.greenend.org.uk>
-Date: 2012-08-09 19:54:45 +0100
-
-Refresh of m206-always-use-homing-homeing
-
----
-
-diff --git a/Marlin/Marlin.pde b/Marlin/Marlin.pde
-index be91124..05e7d5a 100644
---- a/Marlin/Marlin.pde
-+++ b/Marlin/Marlin.pde
-@@ -551,10 +551,8 @@ static const PROGMEM float base_home_pos[3] = { X_HOME_POS, Y_HOME_POS, Z_HOME_P
-
- static void axis_is_at_home(int axis) {
- current_position[axis] = base_home_pos[axis] + add_homeing[axis];
-- min_pos[axis] = base_min_pos[axis];
-- max_pos[axis] = base_max_pos[axis];
-- if (add_homeing[axis] < 0) min_pos[axis] += add_homeing[axis];
-- else max_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) \