AnHardt / Marlin

Reprap FW with look ahead. SDcard and LCD support. It works on Gen6, Ultimaker, RAMPS and Sanguinololu
GNU General Public License v3.0
1 stars 1 forks source link

Simplify dock_sled() #49

Closed AnHardt closed 8 years ago

AnHardt commented 8 years ago

Simplify dock_sled() dock_sled() is never called with offset parameter - remove it. We move x only - so only that needs to be homed. Consequence is - we can home to z-min now with a sled probe! Feedrates are set and restored in do_blocking_move(). We already checked if the probe is deployed/stowed in deploy/stow_probe.

if (z_loc < _Z_RAISE_PROBE_DEPLOY_STOW + 5) z_loc = _Z_RAISE_PROBE_DEPLOY_STOW;

makes no sense - remove. Now the raise is the same for deploy/stow -> move before the if - and remove at all because already done in deploy/stow_probe. Replace the if with a ternary. Instead writing LOW/HIGH use the boolean stow we already have.

There is no reason for not using the sled probe in G29/M48 with 'E'. It takes a while but works. (tested!)

universalize axis_unhomed_error()

Some more tweaks Feedrates are set in do_blocking_move() _Z_RAISE_PROBE_DEPLOY_STOW is always defined here. If HAS_BED_PROBE is defined in G28 we have a shothand. Debug output for home y for the HOME_Y_BEFORE_X case.