const arg to inverse_kinematics

This commit is contained in:
Scott Lahteine 2016-07-22 17:42:48 -07:00
parent b6afa028f4
commit 35a610abf9
2 changed files with 4 additions and 4 deletions

View File

@ -315,7 +315,7 @@ float code_value_temp_diff();
extern float delta_diagonal_rod_trim_tower_1; extern float delta_diagonal_rod_trim_tower_1;
extern float delta_diagonal_rod_trim_tower_2; extern float delta_diagonal_rod_trim_tower_2;
extern float delta_diagonal_rod_trim_tower_3; extern float delta_diagonal_rod_trim_tower_3;
void inverse_kinematics(float cartesian[3]); void inverse_kinematics(const float cartesian[3]);
void recalc_delta_settings(float radius, float diagonal_rod); void recalc_delta_settings(float radius, float diagonal_rod);
#if ENABLED(AUTO_BED_LEVELING_FEATURE) #if ENABLED(AUTO_BED_LEVELING_FEATURE)
extern int delta_grid_spacing[2]; extern int delta_grid_spacing[2];
@ -323,7 +323,7 @@ float code_value_temp_diff();
#endif #endif
#elif ENABLED(SCARA) #elif ENABLED(SCARA)
extern float axis_scaling[3]; // Build size scaling extern float axis_scaling[3]; // Build size scaling
void inverse_kinematics(float cartesian[3]); void inverse_kinematics(const float cartesian[3]);
void forward_kinematics_SCARA(float f_scara[3]); void forward_kinematics_SCARA(float f_scara[3]);
#endif #endif

View File

@ -7737,7 +7737,7 @@ void clamp_to_software_endstops(float target[3]) {
delta_diagonal_rod_2_tower_3 = sq(diagonal_rod + delta_diagonal_rod_trim_tower_3); delta_diagonal_rod_2_tower_3 = sq(diagonal_rod + delta_diagonal_rod_trim_tower_3);
} }
void inverse_kinematics(float cartesian[3]) { void inverse_kinematics(const float in_cartesian[3]) {
delta[TOWER_1] = sqrt(delta_diagonal_rod_2_tower_1 delta[TOWER_1] = sqrt(delta_diagonal_rod_2_tower_1
- sq(delta_tower1_x - cartesian[X_AXIS]) - sq(delta_tower1_x - cartesian[X_AXIS])
@ -8353,7 +8353,7 @@ void prepare_move_to_destination() {
//SERIAL_ECHOPGM(" delta[Y_AXIS]="); SERIAL_ECHOLN(delta[Y_AXIS]); //SERIAL_ECHOPGM(" delta[Y_AXIS]="); SERIAL_ECHOLN(delta[Y_AXIS]);
} }
void inverse_kinematics(float cartesian[3]) { void inverse_kinematics(const float cartesian[3]) {
// Inverse kinematics. // Inverse kinematics.
// Perform SCARA IK and place results in delta[3]. // Perform SCARA IK and place results in delta[3].
// The maths and first version were done by QHARLEY. // The maths and first version were done by QHARLEY.