Skip to content

Commit

Permalink
Sanity check 3-point defines
Browse files Browse the repository at this point in the history
Fixes #17870
  • Loading branch information
thinkyhead committed May 10, 2020
1 parent e5b0892 commit 86c1125
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion Marlin/src/inc/Conditionals_post.h
Original file line number Diff line number Diff line change
Expand Up @@ -2338,9 +2338,13 @@
#undef MESH_MAX_Y
#endif

#if defined(PROBE_PT_1_X) && defined(PROBE_PT_2_X) && defined(PROBE_PT_3_X) && defined(PROBE_PT_1_Y) && defined(PROBE_PT_2_Y) && defined(PROBE_PT_3_Y)
#define _POINT_COUNT (defined(PROBE_PT_1_X) + defined(PROBE_PT_2_X) + defined(PROBE_PT_3_X) + defined(PROBE_PT_1_Y) + defined(PROBE_PT_2_Y) + defined(PROBE_PT_3_Y))
#if _POINT_COUNT == 6
#define HAS_FIXED_3POINT 1
#elif _POINT_COUNT > 0
#error "For 3-Point Leveling all XY points must be defined (or none for the defaults)."
#endif
#undef _POINT_COUNT

/**
* Buzzer/Speaker
Expand Down

0 comments on commit 86c1125

Please sign in to comment.