chiark / gitweb /
software_endstops: use *_MIN_POS and *_MAX_POS for arcs
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Thu, 9 Aug 2012 17:15:32 +0000 (18:15 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Fri, 10 Aug 2012 15:49:16 +0000 (16:49 +0100)
commitfef5e25d43e7d8429283b9e34205172aaa3a6a2f
treeff33f6a6b492d6f370c84bddac52ac277dbd0fd9
parentb1f12330781628c6463068489f7f052bf791bf0e
software_endstops: use *_MIN_POS and *_MAX_POS for arcs

If [XYZ]_HOME_POS and [XYZ]_MIN_POS aren't 0, these corrections are
wrong.  Use the same logic as in Marlin.pde:prepare_move: ie, clamp to
[XYZ]_{MIN,MAX}_POS.

While we're here, put this cut-and-paste code in a function
clamp_to_software_endstops.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
Marlin/Marlin.h
Marlin/Marlin.pde
Marlin/motion_control.cpp