diff --git a/doc/log/commit_log_v0.9j.txt b/doc/log/commit_log_v0.9j.txt index 3dd0526..e6569c3 100644 --- a/doc/log/commit_log_v0.9j.txt +++ b/doc/log/commit_log_v0.9j.txt @@ -1,3 +1,14 @@ +---------------- +Date: 2016-07-26 +Author: chamnit +Subject: Fixed homing on CoreXY machines only. + +- The homing routine for CoreXY/H-Bot CNC machines has been fixed. + +- Version date bumped, but this update does NOT effect any normal +users. Only CoreXY users. + + ---------------- Date: 2016-07-26 Author: chamnit diff --git a/grbl/system.c b/grbl/system.c index 854221e..48aac64 100644 --- a/grbl/system.c +++ b/grbl/system.c @@ -289,12 +289,14 @@ void system_convert_array_steps_to_mpos(float *position, int32_t *steps) // CoreXY calculation only. Returns x or y-axis "steps" based on CoreXY motor steps. -int32_t system_convert_corexy_to_x_axis_steps(int32_t *steps) -{ - return( (steps[A_MOTOR] + steps[B_MOTOR])/2 ); -} -int32_t system_convert_corexy_to_y_axis_steps(int32_t *steps) -{ - return( (steps[A_MOTOR] - steps[B_MOTOR])/2 ); -} +#ifdef COREXY + int32_t system_convert_corexy_to_x_axis_steps(int32_t *steps) + { + return( (steps[A_MOTOR] + steps[B_MOTOR])/2 ); + } + int32_t system_convert_corexy_to_y_axis_steps(int32_t *steps) + { + return( (steps[A_MOTOR] - steps[B_MOTOR])/2 ); + } +#endif diff --git a/grbl/system.h b/grbl/system.h index 09a3171..d523eb5 100644 --- a/grbl/system.h +++ b/grbl/system.h @@ -107,7 +107,9 @@ float system_convert_axis_steps_to_mpos(int32_t *steps, uint8_t idx); void system_convert_array_steps_to_mpos(float *position, int32_t *steps); // CoreXY calculation only. Returns x or y-axis "steps" based on CoreXY motor steps. -int32_t system_convert_corexy_to_x_axis_steps(int32_t *steps); -int32_t system_convert_corexy_to_y_axis_steps(int32_t *steps); +#ifdef COREXY + int32_t system_convert_corexy_to_x_axis_steps(int32_t *steps); + int32_t system_convert_corexy_to_y_axis_steps(int32_t *steps); +#endif #endif