Use count method for kinematic sanity check
This commit is contained in:
parent
3236762e07
commit
40785ce8ac
@ -573,11 +573,38 @@
|
||||
/**
|
||||
* Don't set more than one kinematic type
|
||||
*/
|
||||
#if (ENABLED(DELTA) && (ENABLED(MORGAN_SCARA) || ENABLED(MAKERARM_SCARA) || ENABLED(COREXY) || ENABLED(COREXZ) || ENABLED(COREYZ))) \
|
||||
|| (ENABLED(DELTA) && (ENABLED(MAKERARM_SCARA) || ENABLED(COREXY) || ENABLED(COREXZ) || ENABLED(COREYZ))) \
|
||||
|| (ENABLED(SCARA) && (ENABLED(COREXY) || ENABLED(COREXZ) || ENABLED(COREYZ))) \
|
||||
|| (ENABLED(COREXY) && (ENABLED(COREXZ) || ENABLED(COREYZ))) \
|
||||
|| (ENABLED(COREXZ) && ENABLED(COREYZ))
|
||||
#define COUNT_KIN_1 0
|
||||
#if ENABLED(DELTA)
|
||||
#define COUNT_KIN_2 INCREMENT(COUNT_KIN_1)
|
||||
#else
|
||||
#define COUNT_KIN_2 COUNT_KIN_1
|
||||
#endif
|
||||
#if ENABLED(MORGAN_SCARA)
|
||||
#define COUNT_KIN_3 INCREMENT(COUNT_KIN_2)
|
||||
#else
|
||||
#define COUNT_KIN_3 COUNT_KIN_2
|
||||
#endif
|
||||
#if ENABLED(MAKERARM_SCARA)
|
||||
#define COUNT_KIN_4 INCREMENT(COUNT_KIN_3)
|
||||
#else
|
||||
#define COUNT_KIN_4 COUNT_KIN_3
|
||||
#endif
|
||||
#if ENABLED(COREXY)
|
||||
#define COUNT_KIN_5 INCREMENT(COUNT_KIN_4)
|
||||
#else
|
||||
#define COUNT_KIN_5 COUNT_KIN_4
|
||||
#endif
|
||||
#if ENABLED(COREXZ)
|
||||
#define COUNT_KIN_6 INCREMENT(COUNT_KIN_5)
|
||||
#else
|
||||
#define COUNT_KIN_6 COUNT_KIN_5
|
||||
#endif
|
||||
#if ENABLED(COREYZ)
|
||||
#define COUNT_KIN_7 INCREMENT(COUNT_KIN_6)
|
||||
#else
|
||||
#define COUNT_KIN_7 COUNT_KIN_6
|
||||
#endif
|
||||
#if COUNT_KIN_7 > 1
|
||||
#error "Please enable only one of DELTA, MORGAN_SCARA, MAKERARM_SCARA, COREXY, COREXZ, or COREYZ."
|
||||
#endif
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user