Add bed size as a configuration option

This commit is contained in:
Scott Lahteine
2017-07-21 22:54:39 -05:00
parent dc7c95e07b
commit 51864fd365
37 changed files with 378 additions and 210 deletions

View File

@@ -467,8 +467,8 @@
g29_x_pos = X_HOME_POS;
g29_y_pos = Y_HOME_POS;
#else // cartesian
g29_x_pos = X_PROBE_OFFSET_FROM_EXTRUDER > 0 ? X_MAX_POS : X_MIN_POS;
g29_y_pos = Y_PROBE_OFFSET_FROM_EXTRUDER < 0 ? Y_MAX_POS : Y_MIN_POS;
g29_x_pos = X_PROBE_OFFSET_FROM_EXTRUDER > 0 ? X_BED_SIZE : 0;
g29_y_pos = Y_PROBE_OFFSET_FROM_EXTRUDER < 0 ? Y_BED_SIZE : 0;
#endif
}
@@ -1132,12 +1132,12 @@
SERIAL_PROTOCOLLNPGM("Both X & Y locations must be specified.\n");
err_flag = true;
}
if (!WITHIN(RAW_X_POSITION(g29_x_pos), X_MIN_POS, X_MAX_POS)) {
if (!WITHIN(RAW_X_POSITION(g29_x_pos), X_MIN_BED, X_MAX_BED)) {
SERIAL_PROTOCOLLNPGM("Invalid X location specified.\n");
err_flag = true;
}
if (!WITHIN(RAW_Y_POSITION(g29_y_pos), Y_MIN_POS, Y_MAX_POS)) {
if (!WITHIN(RAW_Y_POSITION(g29_y_pos), Y_MIN_BED, Y_MAX_BED)) {
SERIAL_PROTOCOLLNPGM("Invalid Y location specified.\n");
err_flag = true;
}