Move reachable test to Probe class

This commit is contained in:
Scott Lahteine
2020-02-27 06:16:33 -06:00
parent 9f8ee31144
commit be62ab2d02
9 changed files with 69 additions and 77 deletions

View File

@@ -432,11 +432,11 @@ void GcodeSuite::M422() {
};
if (is_probe_point) {
if (!position_is_reachable_by_probe(pos.x, Y_CENTER)) {
if (!probe.can_reach(pos.x, Y_CENTER)) {
SERIAL_ECHOLNPGM("?(X) out of bounds.");
return;
}
if (!position_is_reachable_by_probe(pos)) {
if (!probe.can_reach(pos)) {
SERIAL_ECHOLNPGM("?(Y) out of bounds.");
return;
}