Fixup axis_is_at_home a little

This commit is contained in:
Scott Lahteine 2015-04-23 18:16:44 -07:00
parent 996d0a9185
commit 64268f3312

View file

@ -990,10 +990,10 @@ static void axis_is_at_home(int axis) {
#endif #endif
#ifdef SCARA #ifdef SCARA
if (axis == X_AXIS || axis == Y_AXIS) {
float homeposition[3]; float homeposition[3];
if (axis < 2) {
for (int i = 0; i < 3; i++) homeposition[i] = base_home_pos(i); for (int i = 0; i < 3; i++) homeposition[i] = base_home_pos(i);
// SERIAL_ECHOPGM("homeposition[x]= "); SERIAL_ECHO(homeposition[0]); // SERIAL_ECHOPGM("homeposition[x]= "); SERIAL_ECHO(homeposition[0]);
@ -1024,16 +1024,13 @@ static void axis_is_at_home(int axis) {
min_pos[axis] = base_min_pos(axis); // + (delta[axis] - base_home_pos(axis)); min_pos[axis] = base_min_pos(axis); // + (delta[axis] - base_home_pos(axis));
max_pos[axis] = base_max_pos(axis); // + (delta[axis] - base_home_pos(axis)); max_pos[axis] = base_max_pos(axis); // + (delta[axis] - base_home_pos(axis));
} }
else { else
#endif
{
current_position[axis] = base_home_pos(axis) + home_offset[axis]; current_position[axis] = base_home_pos(axis) + home_offset[axis];
min_pos[axis] = base_min_pos(axis) + home_offset[axis]; min_pos[axis] = base_min_pos(axis) + home_offset[axis];
max_pos[axis] = base_max_pos(axis) + home_offset[axis]; max_pos[axis] = base_max_pos(axis) + home_offset[axis];
} }
#else
current_position[axis] = base_home_pos(axis) + home_offset[axis];
min_pos[axis] = base_min_pos(axis) + home_offset[axis];
max_pos[axis] = base_max_pos(axis) + home_offset[axis];
#endif
} }
/** /**