mirror of
https://github.com/MarlinFirmware/Marlin.git
synced 2025-03-15 02:36:19 +00:00
🔧 Fix Linear Leveling grid size sanity check (#26199)
This commit is contained in:
parent
88cdf487b4
commit
fb74caebb5
1 changed files with 8 additions and 28 deletions
|
@ -1504,46 +1504,26 @@ static_assert(COUNT(arm) == LOGICAL_AXES, "AXIS_RELATIVE_MODES must contain " _L
|
||||||
* Bed Leveling Requirements
|
* Bed Leveling Requirements
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#if ENABLED(AUTO_BED_LEVELING_UBL)
|
#if IS_SCARA && ANY(AUTO_BED_LEVELING_LINEAR, AUTO_BED_LEVELING_3POINT, AUTO_BED_LEVELING_UBL)
|
||||||
|
#error "SCARA machines can only use AUTO_BED_LEVELING_BILINEAR or MESH_BED_LEVELING leveling."
|
||||||
/**
|
#elif ENABLED(AUTO_BED_LEVELING_LINEAR) && !(WITHIN(GRID_MAX_POINTS_X, 2, 255) && WITHIN(GRID_MAX_POINTS_Y, 2, 255))
|
||||||
* Unified Bed Leveling
|
#error "GRID_MAX_POINTS_[XY] must be between 2 and 255 with AUTO_BED_LEVELING_LINEAR."
|
||||||
*/
|
#elif ENABLED(AUTO_BED_LEVELING_BILINEAR) && !(WITHIN(GRID_MAX_POINTS_X, 3, 255) && WITHIN(GRID_MAX_POINTS_Y, 3, 255))
|
||||||
|
#error "GRID_MAX_POINTS_[XY] must be between 3 and 255 with AUTO_BED_LEVELING_BILINEAR."
|
||||||
#if IS_SCARA
|
#elif ENABLED(AUTO_BED_LEVELING_UBL)
|
||||||
#error "AUTO_BED_LEVELING_UBL does not yet support SCARA printers."
|
#if ENABLED(POLAR)
|
||||||
#elif ENABLED(POLAR)
|
|
||||||
#error "AUTO_BED_LEVELING_UBL does not yet support POLAR printers."
|
#error "AUTO_BED_LEVELING_UBL does not yet support POLAR printers."
|
||||||
#elif DISABLED(EEPROM_SETTINGS)
|
#elif DISABLED(EEPROM_SETTINGS)
|
||||||
#error "AUTO_BED_LEVELING_UBL requires EEPROM_SETTINGS."
|
#error "AUTO_BED_LEVELING_UBL requires EEPROM_SETTINGS."
|
||||||
#elif !WITHIN(GRID_MAX_POINTS_X, 3, 255) || !WITHIN(GRID_MAX_POINTS_Y, 3, 255)
|
#elif !WITHIN(GRID_MAX_POINTS_X, 3, 255) || !WITHIN(GRID_MAX_POINTS_Y, 3, 255)
|
||||||
#error "GRID_MAX_POINTS_[XY] must be between 3 and 255."
|
#error "GRID_MAX_POINTS_[XY] must be between 3 and 255."
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#elif HAS_ABL_NOT_UBL
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Auto Bed Leveling
|
|
||||||
*/
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Delta and SCARA have limited bed leveling options
|
|
||||||
*/
|
|
||||||
#if IS_SCARA && DISABLED(AUTO_BED_LEVELING_BILINEAR)
|
|
||||||
#error "SCARA machines can only use the AUTO_BED_LEVELING_BILINEAR leveling option."
|
|
||||||
#elif ABL_USES_GRID && !(WITHIN(GRID_MAX_POINTS_X, 3, 255) && WITHIN(GRID_MAX_POINTS_Y, 3, 255))
|
|
||||||
#error "GRID_MAX_POINTS_[XY] must be between 3 and 255."
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#elif ENABLED(MESH_BED_LEVELING)
|
#elif ENABLED(MESH_BED_LEVELING)
|
||||||
|
|
||||||
// Mesh Bed Leveling
|
|
||||||
#if ENABLED(DELTA)
|
#if ENABLED(DELTA)
|
||||||
#error "MESH_BED_LEVELING is not compatible with DELTA printers."
|
#error "MESH_BED_LEVELING is not compatible with DELTA printers."
|
||||||
#elif (GRID_MAX_POINTS_X) > 9 || (GRID_MAX_POINTS_Y) > 9
|
#elif (GRID_MAX_POINTS_X) > 9 || (GRID_MAX_POINTS_Y) > 9
|
||||||
#error "GRID_MAX_POINTS_X and GRID_MAX_POINTS_Y must be less than 10 for MBL."
|
#error "GRID_MAX_POINTS_X and GRID_MAX_POINTS_Y must be less than 10 for MBL."
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define _POINT_COUNT (defined(PROBE_PT_1) + defined(PROBE_PT_2) + defined(PROBE_PT_3))
|
#define _POINT_COUNT (defined(PROBE_PT_1) + defined(PROBE_PT_2) + defined(PROBE_PT_3))
|
||||||
|
|
Loading…
Add table
Reference in a new issue