Allow servo features in combination (#16960)

This commit is contained in:
Scott Lahteine
2020-02-26 06:26:54 -06:00
committed by GitHub
parent daa32013b1
commit 0a7e7a6fa5
6 changed files with 56 additions and 40 deletions

View File

@ -502,6 +502,10 @@
* Set a flag for a servo probe (or BLTouch)
*/
#define HAS_Z_SERVO_PROBE (defined(Z_PROBE_SERVO_NR) && Z_PROBE_SERVO_NR >= 0)
#define HAS_SERVO_ANGLES (HAS_Z_SERVO_PROBE || EITHER(SWITCHING_EXTRUDER, SWITCHING_NOZZLE))
#if !HAS_SERVO_ANGLES
#undef EDITABLE_SERVO_ANGLES
#endif
/**
* Set flags for enabled probes

View File

@ -1546,16 +1546,6 @@
#define HAS_SERVO_3 (PIN_EXISTS(SERVO3) && NUM_SERVOS > 3)
#define HAS_SERVOS (NUM_SERVOS > 0)
#if HAS_SERVOS && !defined(Z_PROBE_SERVO_NR)
#define Z_PROBE_SERVO_NR -1
#endif
#define HAS_SERVO_ANGLES (EITHER(SWITCHING_EXTRUDER, SWITCHING_NOZZLE) || (HAS_Z_SERVO_PROBE && defined(Z_PROBE_SERVO_NR)))
#if !HAS_SERVO_ANGLES || ENABLED(BLTOUCH)
#undef EDITABLE_SERVO_ANGLES
#endif
// Sensors
#define HAS_FILAMENT_WIDTH_SENSOR (PIN_EXISTS(FILWIDTH))