Non-CoreXY compiling fix.

This commit is contained in:
chamnit
2016-07-26 13:16:43 -06:00
parent 66a64af239
commit 658eb6a8b3
3 changed files with 25 additions and 10 deletions

View File

@@ -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

View File

@@ -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

View File

@@ -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