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 18:36:30 +0000 (19:36 +0100)
commit38d204a76f0eb63507865f203ec9638a411904dc
treeff33f6a6b492d6f370c84bddac52ac277dbd0fd9
parent3f15b7c7b863abfa2c6cb157a7f220ab9627d776
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