Browse Source

Fix probeless delta build (#16537)

pull/1/head
Jason Smith 5 years ago
committed by Scott Lahteine
parent
commit
d22eb261cf
  1. 2
      Marlin/src/inc/SanityCheck.h
  2. 22
      Marlin/src/module/delta.cpp
  3. 4
      Marlin/src/module/delta.h
  4. 7
      buildroot/share/tests/megaatmega2560-tests

2
Marlin/src/inc/SanityCheck.h

@ -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."

22
Marlin/src/module/delta.cpp

@ -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

4
Marlin/src/module/delta.h

@ -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

7
buildroot/share/tests/megaatmega2560-tests

@ -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)
#

Loading…
Cancel
Save