Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix probeless delta build #16537

Merged
merged 3 commits into from
Jan 11, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions Marlin/src/inc/SanityCheck.h
Original file line number Diff line number Diff line change
Expand Up @@ -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."
Expand Down
22 changes: 16 additions & 6 deletions Marlin/src/module/delta.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 3 additions & 1 deletion Marlin/src/module/delta.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
7 changes: 7 additions & 0 deletions buildroot/share/tests/megaatmega2560-tests
Original file line number Diff line number Diff line change
Expand Up @@ -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)
#
Expand Down