Add conditionals for kinematics, leveling

This commit is contained in:
Scott Lahteine
2016-09-11 20:11:30 -05:00
parent 21514568fd
commit 6ab54c60b1
8 changed files with 114 additions and 81 deletions

View File

@@ -98,7 +98,7 @@ float Planner::min_feedrate_mm_s,
Planner::max_e_jerk,
Planner::min_travel_feedrate_mm_s;
#if ENABLED(AUTO_BED_LEVELING_FEATURE)
#if ENABLED(AUTO_BED_LEVELING_LINEAR)
matrix_3x3 Planner::bed_level_matrix; // Transform to compensate for bed level
#endif
@@ -138,7 +138,7 @@ void Planner::init() {
memset(position, 0, sizeof(position)); // clear position
LOOP_XYZE(i) previous_speed[i] = 0.0;
previous_nominal_speed = 0.0;
#if ENABLED(AUTO_BED_LEVELING_FEATURE)
#if ENABLED(AUTO_BED_LEVELING_LINEAR)
bed_level_matrix.set_to_identity();
#endif
}
@@ -521,7 +521,7 @@ void Planner::check_axes_activity() {
#endif
}
#if ENABLED(AUTO_BED_LEVELING_FEATURE) || ENABLED(MESH_BED_LEVELING)
#if PLANNER_LEVELING
void Planner::apply_leveling(
#if ENABLED(MESH_BED_LEVELING)
@@ -551,7 +551,7 @@ void Planner::check_axes_activity() {
#endif
}
#endif
#endif // PLANNER_LEVELING
/**
* Planner::buffer_line
@@ -1193,7 +1193,7 @@ void Planner::reset_acceleration_rates() {
// Recalculate position, steps_to_mm if axis_steps_per_mm changes!
void Planner::refresh_positioning() {
LOOP_XYZE(i) steps_to_mm[i] = 1.0 / axis_steps_per_mm[i];
#if ENABLED(DELTA) || ENABLED(SCARA)
#if IS_KINEMATIC
inverse_kinematics(current_position);
set_position_mm(delta[X_AXIS], delta[Y_AXIS], delta[Z_AXIS], current_position[E_AXIS]);
#else