fix - tmc2130 conditional translation

This commit is contained in:
Robert Pelnar 2018-12-14 15:46:50 +01:00
parent cfe83daf4a
commit 927898151a
1 changed files with 4 additions and 0 deletions

View File

@ -4531,11 +4531,15 @@ if((eSoundMode==e_SOUND_MODE_LOUD)||(eSoundMode==e_SOUND_MODE_ONCE))
plan_buffer_line(current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS], current_position[E_AXIS], homing_feedrate[Z_AXIS] / 40, active_extruder);
st_synchronize();
enable_z_endstop(true);
#ifdef TMC2130
tmc2130_home_enter(Z_AXIS_MASK);
#endif // TMC2130
current_position[Z_AXIS] = MESH_HOME_Z_SEARCH;
plan_buffer_line(current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS], current_position[E_AXIS], homing_feedrate[Z_AXIS] / 40, active_extruder);
st_synchronize();
#ifdef TMC2130
tmc2130_home_exit();
#endif // TMC2130
enable_z_endstop(bState);
} while (st_get_position_mm(Z_AXIS) > MESH_HOME_Z_SEARCH); // i.e. Z-leveling not o.k.
// plan_set_z_position(MESH_HOME_Z_SEARCH); // is not necessary ('do-while' loop always ends at the expected Z-position)