Additional cleanup of UBL code
This commit is contained in:
@ -576,17 +576,15 @@ static_assert(1 >= 0
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Check if Probe_Offset * Grid Points is greater than Probing Range
|
||||
* Check auto bed leveling sub-options, especially probe points
|
||||
*/
|
||||
#if ABL_GRID
|
||||
#ifndef DELTA_PROBEABLE_RADIUS
|
||||
// Be sure points are in the right order
|
||||
#if LEFT_PROBE_BED_POSITION > RIGHT_PROBE_BED_POSITION
|
||||
#error "LEFT_PROBE_BED_POSITION must be less than RIGHT_PROBE_BED_POSITION."
|
||||
#elif FRONT_PROBE_BED_POSITION > BACK_PROBE_BED_POSITION
|
||||
#error "FRONT_PROBE_BED_POSITION must be less than BACK_PROBE_BED_POSITION."
|
||||
#endif
|
||||
// Make sure probing points are reachable
|
||||
#if LEFT_PROBE_BED_POSITION < MIN_PROBE_X
|
||||
#error "The given LEFT_PROBE_BED_POSITION can't be reached by the Z probe."
|
||||
#elif RIGHT_PROBE_BED_POSITION > MAX_PROBE_X
|
||||
@ -597,29 +595,39 @@ static_assert(1 >= 0
|
||||
#error "The given BACK_PROBE_BED_POSITION can't be reached by the Z probe."
|
||||
#endif
|
||||
#endif
|
||||
#else // !ABL_GRID
|
||||
#if ENABLED(AUTO_BED_LEVELING_UBL)
|
||||
#ifndef EEPROM_SETTINGS
|
||||
#error "AUTO_BED_LEVELING_UBL requires EEPROM_SETTINGS. Please update your configuration."
|
||||
#endif
|
||||
#else // !UBL
|
||||
// Check the triangulation points
|
||||
#if ABL_PROBE_PT_1_X < MIN_PROBE_X || ABL_PROBE_PT_1_X > MAX_PROBE_X
|
||||
#error "The given ABL_PROBE_PT_1_X can't be reached by the Z probe."
|
||||
#elif ABL_PROBE_PT_2_X < MIN_PROBE_X || ABL_PROBE_PT_2_X > MAX_PROBE_X
|
||||
#error "The given ABL_PROBE_PT_2_X can't be reached by the Z probe."
|
||||
#elif ABL_PROBE_PT_3_X < MIN_PROBE_X || ABL_PROBE_PT_3_X > MAX_PROBE_X
|
||||
#error "The given ABL_PROBE_PT_3_X can't be reached by the Z probe."
|
||||
#elif ABL_PROBE_PT_1_Y < MIN_PROBE_Y || ABL_PROBE_PT_1_Y > MAX_PROBE_Y
|
||||
#error "The given ABL_PROBE_PT_1_Y can't be reached by the Z probe."
|
||||
#elif ABL_PROBE_PT_2_Y < MIN_PROBE_Y || ABL_PROBE_PT_2_Y > MAX_PROBE_Y
|
||||
#error "The given ABL_PROBE_PT_2_Y can't be reached by the Z probe."
|
||||
#elif ABL_PROBE_PT_3_Y < MIN_PROBE_Y || ABL_PROBE_PT_3_Y > MAX_PROBE_Y
|
||||
#error "The given ABL_PROBE_PT_3_Y can't be reached by the Z probe."
|
||||
#endif
|
||||
#endif // !AUTO_BED_LEVEING_UBL
|
||||
|
||||
#endif // !ABL_GRID
|
||||
#elif ENABLED(AUTO_BED_LEVELING_UBL)
|
||||
#if DISABLED(EEPROM_SETTINGS)
|
||||
#error "AUTO_BED_LEVELING_UBL requires EEPROM_SETTINGS. Please update your configuration."
|
||||
#elif UBL_MESH_NUM_X_POINTS < 3 || UBL_MESH_NUM_X_POINTS > 15 || UBL_MESH_NUM_Y_POINTS < 3 || UBL_MESH_NUM_Y_POINTS > 15
|
||||
#error "UBL_MESH_NUM_[XY]_POINTS must be a whole number between 3 and 15."
|
||||
#elif UBL_PROBE_PT_1_X < MIN_PROBE_X || UBL_PROBE_PT_1_X > MAX_PROBE_X
|
||||
#error "The given UBL_PROBE_PT_1_X can't be reached by the Z probe."
|
||||
#elif UBL_PROBE_PT_2_X < MIN_PROBE_X || UBL_PROBE_PT_2_X > MAX_PROBE_X
|
||||
#error "The given UBL_PROBE_PT_2_X can't be reached by the Z probe."
|
||||
#elif UBL_PROBE_PT_3_X < MIN_PROBE_X || UBL_PROBE_PT_3_X > MAX_PROBE_X
|
||||
#error "The given UBL_PROBE_PT_3_X can't be reached by the Z probe."
|
||||
#elif UBL_PROBE_PT_1_Y < MIN_PROBE_Y || UBL_PROBE_PT_1_Y > MAX_PROBE_Y
|
||||
#error "The given UBL_PROBE_PT_1_Y can't be reached by the Z probe."
|
||||
#elif UBL_PROBE_PT_2_Y < MIN_PROBE_Y || UBL_PROBE_PT_2_Y > MAX_PROBE_Y
|
||||
#error "The given UBL_PROBE_PT_2_Y can't be reached by the Z probe."
|
||||
#elif UBL_PROBE_PT_3_Y < MIN_PROBE_Y || UBL_PROBE_PT_3_Y > MAX_PROBE_Y
|
||||
#error "The given UBL_PROBE_PT_3_Y can't be reached by the Z probe."
|
||||
#endif
|
||||
#else // AUTO_BED_LEVELING_3POINT
|
||||
#if ABL_PROBE_PT_1_X < MIN_PROBE_X || ABL_PROBE_PT_1_X > MAX_PROBE_X
|
||||
#error "The given ABL_PROBE_PT_1_X can't be reached by the Z probe."
|
||||
#elif ABL_PROBE_PT_2_X < MIN_PROBE_X || ABL_PROBE_PT_2_X > MAX_PROBE_X
|
||||
#error "The given ABL_PROBE_PT_2_X can't be reached by the Z probe."
|
||||
#elif ABL_PROBE_PT_3_X < MIN_PROBE_X || ABL_PROBE_PT_3_X > MAX_PROBE_X
|
||||
#error "The given ABL_PROBE_PT_3_X can't be reached by the Z probe."
|
||||
#elif ABL_PROBE_PT_1_Y < MIN_PROBE_Y || ABL_PROBE_PT_1_Y > MAX_PROBE_Y
|
||||
#error "The given ABL_PROBE_PT_1_Y can't be reached by the Z probe."
|
||||
#elif ABL_PROBE_PT_2_Y < MIN_PROBE_Y || ABL_PROBE_PT_2_Y > MAX_PROBE_Y
|
||||
#error "The given ABL_PROBE_PT_2_Y can't be reached by the Z probe."
|
||||
#elif ABL_PROBE_PT_3_Y < MIN_PROBE_Y || ABL_PROBE_PT_3_Y > MAX_PROBE_Y
|
||||
#error "The given ABL_PROBE_PT_3_Y can't be reached by the Z probe."
|
||||
#endif
|
||||
#endif // AUTO_BED_LEVELING_3POINT
|
||||
|
||||
#endif // HAS_ABL
|
||||
|
||||
|
Reference in New Issue
Block a user