Fix probeless delta build (#16537)

This commit is contained in:
Jason Smith 2020-01-11 15:14:33 -08:00 committed by Scott Lahteine
parent fbf2f36cae
commit d22eb261cf
4 changed files with 28 additions and 7 deletions

View File

@ -1020,6 +1020,8 @@ static_assert(Y_MAX_LENGTH >= Y_BED_SIZE, "Movement bounds (Y_MIN_POS, Y_MAX_POS
#error "ENABLE_LEVELING_FADE_HEIGHT on DELTA requires AUTO_BED_LEVELING_BILINEAR or AUTO_BED_LEVELING_UBL."
#elif ENABLED(DELTA_AUTO_CALIBRATION) && !(HAS_BED_PROBE || HAS_LCD_MENU)
#error "DELTA_AUTO_CALIBRATION requires a probe or LCD Controller."
#elif ENABLED(DELTA_CALIBRATION_MENU) && !HAS_LCD_MENU
#error "DELTA_CALIBRATION_MENU requires an LCD Controller."
#elif ABL_GRID
#if (GRID_MAX_POINTS_X & 1) == 0 || (GRID_MAX_POINTS_Y & 1) == 0
#error "DELTA requires GRID_MAX_POINTS_X and GRID_MAX_POINTS_Y to be odd numbers."

View File

@ -86,13 +86,23 @@ void recalc_delta_settings() {
* Get a safe radius for calibration
*/
#if ENABLED(DELTA_AUTO_CALIBRATION)
float calibration_radius_factor = 1;
#endif
#if EITHER(DELTA_AUTO_CALIBRATION, DELTA_CALIBRATION_MENU)
float delta_calibration_radius() {
return FLOOR((DELTA_PRINTABLE_RADIUS - _MAX(HYPOT(probe_offset_xy.x, probe_offset_xy.y), MIN_PROBE_EDGE)) * calibration_radius_factor);
}
#if ENABLED(DELTA_AUTO_CALIBRATION)
float calibration_radius_factor = 1;
#endif
float delta_calibration_radius() {
return calibration_radius_factor * (
#if HAS_BED_PROBE
FLOOR((DELTA_PRINTABLE_RADIUS) - _MAX(HYPOT(probe_offset_xy.x, probe_offset_xy.y), MIN_PROBE_EDGE))
#else
DELTA_PRINTABLE_RADIUS
#endif
);
}
#endif
/**
* Delta Inverse Kinematics

View File

@ -52,7 +52,9 @@ void recalc_delta_settings();
constexpr float calibration_radius_factor = 1;
#endif
float delta_calibration_radius();
#if EITHER(DELTA_AUTO_CALIBRATION, DELTA_CALIBRATION_MENU)
float delta_calibration_radius();
#endif
/**
* Delta Inverse Kinematics

View File

@ -309,6 +309,13 @@ opt_enable AUTO_BED_LEVELING_UBL RESTORE_LEVELING_AFTER_G28 Z_PROBE_ALLEN_KEY EE
OLED_PANEL_TINYBOY2 MESH_EDIT_GFX_OVERLAY
exec_test $1 $2 "RAMPS | DELTA | OLED_PANEL_TINYBOY2 | UBL | Allen Key | EEPROM"
#
# Delta Config (generic) + Probeless
#
use_example_configs delta/generic
opt_enable REPRAP_DISCOUNT_SMART_CONTROLLER DELTA_AUTO_CALIBRATION DELTA_CALIBRATION_MENU
exec_test $1 $2 "RAMPS | DELTA | RRD LCD | DELTA_AUTO_CALIBRATION | DELTA_CALIBRATION_MENU"
#
# Delta Config (FLSUN AC because it's complex)
#