kliment/Sprinter — pull request #197 by felipesanches (2012-07-03 21:08:06+00:00)
Title: Z axis callibration using Z_MAX endstop + recorded z_max_length

this is code for callibrating the z axis in a way similar to what makerbot does:

* you first position the nozzle tip in the position you consider to be z=0
* then you send M111 which will make the printer home z in the ZMAX endstop direction.
* It calculates the distance effectivelly travelled during homing and sets z_max_length with this value.
* It also stores it in EEPROM so that you dont have to callibrate the z axis everytime.

The benefits of this approach is that you dont need to mechanically adjust the endstop. The callibration procedure is completely done in software (logically), so it is more reliable and easier to callibrate.