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>
Thu, 9 Aug 2012 18:20:23 +0000 (19:20 +0100)
commit33f9aa6d9952e7f643bb2f7eba39f7bd1a765f86
treeff33f6a6b492d6f370c84bddac52ac277dbd0fd9
parent560fd88074327c52739beb389cd339c78f009adf
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