Add support for SOLENOID_PROBE
This commit is contained in:
parent
5803ba43a9
commit
fd2a0784ba
|
@ -374,7 +374,7 @@
|
|||
/**
|
||||
* Set a flag for any enabled probe
|
||||
*/
|
||||
#define PROBE_SELECTED (ENABLED(PROBE_MANUALLY) || ENABLED(FIX_MOUNTED_PROBE) || ENABLED(Z_PROBE_ALLEN_KEY) || HAS_Z_SERVO_ENDSTOP || ENABLED(Z_PROBE_SLED))
|
||||
#define PROBE_SELECTED (ENABLED(PROBE_MANUALLY) || ENABLED(FIX_MOUNTED_PROBE) || ENABLED(Z_PROBE_ALLEN_KEY) || HAS_Z_SERVO_ENDSTOP || ENABLED(Z_PROBE_SLED) || ENABLED(SOLENOID_PROBE))
|
||||
|
||||
/**
|
||||
* Clear probe pin settings when no probe is selected
|
||||
|
|
|
@ -593,6 +593,9 @@
|
|||
* is enabled then it also applies to Z_PROBE_SPEED_SLOW.
|
||||
*/
|
||||
|
||||
// A probe that is deployed and stowed with a solenoid pin (SOL1_PIN)
|
||||
//#define SOLENOID_PROBE
|
||||
|
||||
// Enable if you have a Z probe mounted on a sled like those designed by Charles Bell.
|
||||
//#define Z_PROBE_SLED
|
||||
//#define SLED_DOCKING_OFFSET 5 // The extra distance the X axis must travel to pickup the sled. 0 should be fine but you can push it further if you'd like.
|
||||
|
|
|
@ -1854,8 +1854,8 @@ static void clean_up_after_endstop_or_probe_move() {
|
|||
// Dock sled a bit closer to ensure proper capturing
|
||||
do_blocking_move_to_x(X_MAX_POS + SLED_DOCKING_OFFSET - ((stow) ? 1 : 0));
|
||||
|
||||
#if PIN_EXISTS(SLED)
|
||||
digitalWrite(SLED_PIN, !stow); // switch solenoid
|
||||
#if HAS_SOLENOID_1 && DISABLED(EXT_SOLENOID)
|
||||
WRITE(SOL1_PIN, !stow); // switch solenoid
|
||||
#endif
|
||||
}
|
||||
|
||||
|
@ -2123,7 +2123,13 @@ static void clean_up_after_endstop_or_probe_move() {
|
|||
// otherwise an Allen-Key probe can't be stowed.
|
||||
#endif
|
||||
|
||||
#if ENABLED(Z_PROBE_SLED)
|
||||
#if ENABLED(SOLENOID_PROBE)
|
||||
|
||||
#if HAS_SOLENOID_1
|
||||
WRITE(SOL1_PIN, deploy);
|
||||
#endif
|
||||
|
||||
#elif ENABLED(Z_PROBE_SLED)
|
||||
|
||||
dock_sled(!deploy);
|
||||
|
||||
|
@ -7588,7 +7594,7 @@ inline void gcode_M303() {
|
|||
|
||||
#if ENABLED(EXT_SOLENOID)
|
||||
|
||||
void enable_solenoid(uint8_t num) {
|
||||
void enable_solenoid(const uint8_t num) {
|
||||
switch (num) {
|
||||
case 0:
|
||||
OUT_WRITE(SOL0_PIN, HIGH);
|
||||
|
@ -11437,9 +11443,9 @@ void setup() {
|
|||
dac_init();
|
||||
#endif
|
||||
|
||||
#if ENABLED(Z_PROBE_SLED) && PIN_EXISTS(SLED)
|
||||
OUT_WRITE(SLED_PIN, LOW); // turn it off
|
||||
#endif // Z_PROBE_SLED
|
||||
#if (ENABLED(Z_PROBE_SLED) || ENABLED(SOLENOID_PROBE)) && HAS_SOLENOID_1
|
||||
OUT_WRITE(SOL1_PIN, LOW); // turn it off
|
||||
#endif
|
||||
|
||||
setup_homepin();
|
||||
|
||||
|
|
|
@ -172,6 +172,8 @@
|
|||
#error "EXTRUDER_[0123]_AUTO_FAN_PIN is now E[0123]_AUTO_FAN_PIN. Please update your Configuration_adv.h."
|
||||
#elif defined(min_software_endstops) || defined(max_software_endstops)
|
||||
#error "(min|max)_software_endstops are now (MIN|MAX)_SOFTWARE_ENDSTOPS. Please update your configuration."
|
||||
#elif ENABLED(Z_PROBE_SLED) && defined(SLED_PIN)
|
||||
#error "Replace SLED_PIN with SOL1_PIN (applies to both Z_PROBE_SLED and SOLENOID_PROBE)."
|
||||
#endif
|
||||
|
||||
/**
|
||||
|
@ -459,6 +461,9 @@ static_assert(1 >= 0
|
|||
#if ENABLED(Z_PROBE_SLED)
|
||||
+ 1
|
||||
#endif
|
||||
#if ENABLED(SOLENOID_PROBE)
|
||||
+ 1
|
||||
#endif
|
||||
, "Please enable only one probe: PROBE_MANUALLY, FIX_MOUNTED_PROBE, Z Servo, BLTOUCH, Z_PROBE_ALLEN_KEY, or Z_PROBE_SLED."
|
||||
);
|
||||
|
||||
|
@ -472,6 +477,17 @@ static_assert(1 >= 0
|
|||
#error "You cannot use Z_PROBE_SLED with DELTA."
|
||||
#endif
|
||||
|
||||
/**
|
||||
* SOLENOID_PROBE requirements
|
||||
*/
|
||||
#if ENABLED(SOLENOID_PROBE)
|
||||
#if ENABLED(EXT_SOLENOID)
|
||||
#error "SOLENOID_PROBE is incompatible with EXT_SOLENOID."
|
||||
#elif !HAS_SOLENOID_1
|
||||
#error "SOLENOID_PROBE requires SOL1_PIN. It can be added to your Configuration.h."
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/**
|
||||
* NUM_SERVOS is required for a Z servo probe
|
||||
*/
|
||||
|
|
|
@ -592,6 +592,9 @@
|
|||
* is enabled then it also applies to Z_PROBE_SPEED_SLOW.
|
||||
*/
|
||||
|
||||
// A probe that is deployed and stowed with a solenoid pin (SOL1_PIN)
|
||||
//#define SOLENOID_PROBE
|
||||
|
||||
// Enable if you have a Z probe mounted on a sled like those designed by Charles Bell.
|
||||
//#define Z_PROBE_SLED
|
||||
//#define SLED_DOCKING_OFFSET 5 // The extra distance the X axis must travel to pickup the sled. 0 should be fine but you can push it further if you'd like.
|
||||
|
|
|
@ -576,6 +576,9 @@
|
|||
* is enabled then it also applies to Z_PROBE_SPEED_SLOW.
|
||||
*/
|
||||
|
||||
// A probe that is deployed and stowed with a solenoid pin (SOL1_PIN)
|
||||
//#define SOLENOID_PROBE
|
||||
|
||||
// Enable if you have a Z probe mounted on a sled like those designed by Charles Bell.
|
||||
//#define Z_PROBE_SLED
|
||||
//#define SLED_DOCKING_OFFSET 5 // The extra distance the X axis must travel to pickup the sled. 0 should be fine but you can push it further if you'd like.
|
||||
|
|
|
@ -576,6 +576,9 @@
|
|||
* is enabled then it also applies to Z_PROBE_SPEED_SLOW.
|
||||
*/
|
||||
|
||||
// A probe that is deployed and stowed with a solenoid pin (SOL1_PIN)
|
||||
//#define SOLENOID_PROBE
|
||||
|
||||
// Enable if you have a Z probe mounted on a sled like those designed by Charles Bell.
|
||||
//#define Z_PROBE_SLED
|
||||
//#define SLED_DOCKING_OFFSET 5 // The extra distance the X axis must travel to pickup the sled. 0 should be fine but you can push it further if you'd like.
|
||||
|
|
|
@ -584,6 +584,9 @@
|
|||
* is enabled then it also applies to Z_PROBE_SPEED_SLOW.
|
||||
*/
|
||||
|
||||
// A probe that is deployed and stowed with a solenoid pin (SOL1_PIN)
|
||||
//#define SOLENOID_PROBE
|
||||
|
||||
// Enable if you have a Z probe mounted on a sled like those designed by Charles Bell.
|
||||
//#define Z_PROBE_SLED
|
||||
//#define SLED_DOCKING_OFFSET 5 // The extra distance the X axis must travel to pickup the sled. 0 should be fine but you can push it further if you'd like.
|
||||
|
|
|
@ -587,6 +587,9 @@
|
|||
* is enabled then it also applies to Z_PROBE_SPEED_SLOW.
|
||||
*/
|
||||
|
||||
// A probe that is deployed and stowed with a solenoid pin (SOL1_PIN)
|
||||
//#define SOLENOID_PROBE
|
||||
|
||||
// Enable if you have a Z probe mounted on a sled like those designed by Charles Bell.
|
||||
//#define Z_PROBE_SLED
|
||||
//#define SLED_DOCKING_OFFSET 5 // The extra distance the X axis must travel to pickup the sled. 0 should be fine but you can push it further if you'd like.
|
||||
|
|
|
@ -622,6 +622,9 @@
|
|||
* is enabled then it also applies to Z_PROBE_SPEED_SLOW.
|
||||
*/
|
||||
|
||||
// A probe that is deployed and stowed with a solenoid pin (SOL1_PIN)
|
||||
//#define SOLENOID_PROBE
|
||||
|
||||
// Enable if you have a Z probe mounted on a sled like those designed by Charles Bell.
|
||||
//#define Z_PROBE_SLED
|
||||
//#define SLED_DOCKING_OFFSET 5 // The extra distance the X axis must travel to pickup the sled. 0 should be fine but you can push it further if you'd like.
|
||||
|
|
|
@ -593,6 +593,9 @@
|
|||
* is enabled then it also applies to Z_PROBE_SPEED_SLOW.
|
||||
*/
|
||||
|
||||
// A probe that is deployed and stowed with a solenoid pin (SOL1_PIN)
|
||||
//#define SOLENOID_PROBE
|
||||
|
||||
// Enable if you have a Z probe mounted on a sled like those designed by Charles Bell.
|
||||
//#define Z_PROBE_SLED
|
||||
//#define SLED_DOCKING_OFFSET 5 // The extra distance the X axis must travel to pickup the sled. 0 should be fine but you can push it further if you'd like.
|
||||
|
|
|
@ -593,6 +593,9 @@
|
|||
* is enabled then it also applies to Z_PROBE_SPEED_SLOW.
|
||||
*/
|
||||
|
||||
// A probe that is deployed and stowed with a solenoid pin (SOL1_PIN)
|
||||
//#define SOLENOID_PROBE
|
||||
|
||||
// Enable if you have a Z probe mounted on a sled like those designed by Charles Bell.
|
||||
//#define Z_PROBE_SLED
|
||||
//#define SLED_DOCKING_OFFSET 5 // The extra distance the X axis must travel to pickup the sled. 0 should be fine but you can push it further if you'd like.
|
||||
|
|
|
@ -593,6 +593,9 @@
|
|||
* is enabled then it also applies to Z_PROBE_SPEED_SLOW.
|
||||
*/
|
||||
|
||||
// A probe that is deployed and stowed with a solenoid pin (SOL1_PIN)
|
||||
//#define SOLENOID_PROBE
|
||||
|
||||
// Enable if you have a Z probe mounted on a sled like those designed by Charles Bell.
|
||||
//#define Z_PROBE_SLED
|
||||
//#define SLED_DOCKING_OFFSET 5 // The extra distance the X axis must travel to pickup the sled. 0 should be fine but you can push it further if you'd like.
|
||||
|
|
|
@ -592,6 +592,9 @@
|
|||
* is enabled then it also applies to Z_PROBE_SPEED_SLOW.
|
||||
*/
|
||||
|
||||
// A probe that is deployed and stowed with a solenoid pin (SOL1_PIN)
|
||||
//#define SOLENOID_PROBE
|
||||
|
||||
// Enable if you have a Z probe mounted on a sled like those designed by Charles Bell.
|
||||
//#define Z_PROBE_SLED
|
||||
//#define SLED_DOCKING_OFFSET 5 // The extra distance the X axis must travel to pickup the sled. 0 should be fine but you can push it further if you'd like.
|
||||
|
|
|
@ -608,6 +608,9 @@
|
|||
* is enabled then it also applies to Z_PROBE_SPEED_SLOW.
|
||||
*/
|
||||
|
||||
// A probe that is deployed and stowed with a solenoid pin (SOL1_PIN)
|
||||
//#define SOLENOID_PROBE
|
||||
|
||||
// Enable if you have a Z probe mounted on a sled like those designed by Charles Bell.
|
||||
//#define Z_PROBE_SLED
|
||||
//#define SLED_DOCKING_OFFSET 5 // The extra distance the X axis must travel to pickup the sled. 0 should be fine but you can push it further if you'd like.
|
||||
|
|
|
@ -613,6 +613,9 @@
|
|||
* is enabled then it also applies to Z_PROBE_SPEED_SLOW.
|
||||
*/
|
||||
|
||||
// A probe that is deployed and stowed with a solenoid pin (SOL1_PIN)
|
||||
//#define SOLENOID_PROBE
|
||||
|
||||
// Enable if you have a Z probe mounted on a sled like those designed by Charles Bell.
|
||||
//#define Z_PROBE_SLED
|
||||
//#define SLED_DOCKING_OFFSET 5 // The extra distance the X axis must travel to pickup the sled. 0 should be fine but you can push it further if you'd like.
|
||||
|
|
|
@ -644,6 +644,9 @@
|
|||
* is enabled then it also applies to Z_PROBE_SPEED_SLOW.
|
||||
*/
|
||||
|
||||
// A probe that is deployed and stowed with a solenoid pin (SOL1_PIN)
|
||||
//#define SOLENOID_PROBE
|
||||
|
||||
// Enable if you have a Z probe mounted on a sled like those designed by Charles Bell.
|
||||
//#define Z_PROBE_SLED
|
||||
//#define SLED_DOCKING_OFFSET 5 // The extra distance the X axis must travel to pickup the sled. 0 should be fine but you can push it further if you'd like.
|
||||
|
|
|
@ -584,6 +584,9 @@
|
|||
* is enabled then it also applies to Z_PROBE_SPEED_SLOW.
|
||||
*/
|
||||
|
||||
// A probe that is deployed and stowed with a solenoid pin (SOL1_PIN)
|
||||
//#define SOLENOID_PROBE
|
||||
|
||||
// Enable if you have a Z probe mounted on a sled like those designed by Charles Bell.
|
||||
//#define Z_PROBE_SLED
|
||||
//#define SLED_DOCKING_OFFSET 5 // The extra distance the X axis must travel to pickup the sled. 0 should be fine but you can push it further if you'd like.
|
||||
|
|
|
@ -593,6 +593,9 @@
|
|||
* is enabled then it also applies to Z_PROBE_SPEED_SLOW.
|
||||
*/
|
||||
|
||||
// A probe that is deployed and stowed with a solenoid pin (SOL1_PIN)
|
||||
//#define SOLENOID_PROBE
|
||||
|
||||
// Enable if you have a Z probe mounted on a sled like those designed by Charles Bell.
|
||||
//#define Z_PROBE_SLED
|
||||
//#define SLED_DOCKING_OFFSET 5 // The extra distance the X axis must travel to pickup the sled. 0 should be fine but you can push it further if you'd like.
|
||||
|
|
|
@ -662,6 +662,9 @@
|
|||
* is enabled then it also applies to Z_PROBE_SPEED_SLOW.
|
||||
*/
|
||||
|
||||
// A probe that is deployed and stowed with a solenoid pin (SOL1_PIN)
|
||||
//#define SOLENOID_PROBE
|
||||
|
||||
// Enable if you have a Z probe mounted on a sled like those designed by Charles Bell.
|
||||
//#define Z_PROBE_SLED
|
||||
//#define SLED_DOCKING_OFFSET 5 // The extra distance the X axis must travel to pickup the sled. 0 should be fine but you can push it further if you'd like.
|
||||
|
|
|
@ -649,6 +649,9 @@
|
|||
* is enabled then it also applies to Z_PROBE_SPEED_SLOW.
|
||||
*/
|
||||
|
||||
// A probe that is deployed and stowed with a solenoid pin (SOL1_PIN)
|
||||
//#define SOLENOID_PROBE
|
||||
|
||||
// Enable if you have a Z probe mounted on a sled like those designed by Charles Bell.
|
||||
//#define Z_PROBE_SLED
|
||||
//#define SLED_DOCKING_OFFSET 5 // The extra distance the X axis must travel to pickup the sled. 0 should be fine but you can push it further if you'd like.
|
||||
|
|
|
@ -642,6 +642,9 @@
|
|||
* is enabled then it also applies to Z_PROBE_SPEED_SLOW.
|
||||
*/
|
||||
|
||||
// A probe that is deployed and stowed with a solenoid pin (SOL1_PIN)
|
||||
//#define SOLENOID_PROBE
|
||||
|
||||
// Enable if you have a Z probe mounted on a sled like those designed by Charles Bell.
|
||||
//#define Z_PROBE_SLED
|
||||
//#define SLED_DOCKING_OFFSET 5 // The extra distance the X axis must travel to pickup the sled. 0 should be fine but you can push it further if you'd like.
|
||||
|
|
|
@ -643,6 +643,9 @@
|
|||
* is enabled then it also applies to Z_PROBE_SPEED_SLOW.
|
||||
*/
|
||||
|
||||
// A probe that is deployed and stowed with a solenoid pin (SOL1_PIN)
|
||||
//#define SOLENOID_PROBE
|
||||
|
||||
// Enable if you have a Z probe mounted on a sled like those designed by Charles Bell.
|
||||
//#define Z_PROBE_SLED
|
||||
//#define SLED_DOCKING_OFFSET 5 // The extra distance the X axis must travel to pickup the sled. 0 should be fine but you can push it further if you'd like.
|
||||
|
|
|
@ -662,6 +662,9 @@
|
|||
* is enabled then it also applies to Z_PROBE_SPEED_SLOW.
|
||||
*/
|
||||
|
||||
// A probe that is deployed and stowed with a solenoid pin (SOL1_PIN)
|
||||
//#define SOLENOID_PROBE
|
||||
|
||||
// Enable if you have a Z probe mounted on a sled like those designed by Charles Bell.
|
||||
//#define Z_PROBE_SLED
|
||||
//#define SLED_DOCKING_OFFSET 5 // The extra distance the X axis must travel to pickup the sled. 0 should be fine but you can push it further if you'd like.
|
||||
|
|
|
@ -596,6 +596,9 @@
|
|||
* is enabled then it also applies to Z_PROBE_SPEED_SLOW.
|
||||
*/
|
||||
|
||||
// A probe that is deployed and stowed with a solenoid pin (SOL1_PIN)
|
||||
//#define SOLENOID_PROBE
|
||||
|
||||
// Enable if you have a Z probe mounted on a sled like those designed by Charles Bell.
|
||||
//#define Z_PROBE_SLED
|
||||
//#define SLED_DOCKING_OFFSET 5 // The extra distance the X axis must travel to pickup the sled. 0 should be fine but you can push it further if you'd like.
|
||||
|
|
|
@ -589,6 +589,9 @@
|
|||
* is enabled then it also applies to Z_PROBE_SPEED_SLOW.
|
||||
*/
|
||||
|
||||
// A probe that is deployed and stowed with a solenoid pin (SOL1_PIN)
|
||||
//#define SOLENOID_PROBE
|
||||
|
||||
// Enable if you have a Z probe mounted on a sled like those designed by Charles Bell.
|
||||
//#define Z_PROBE_SLED
|
||||
//#define SLED_DOCKING_OFFSET 5 // The extra distance the X axis must travel to pickup the sled. 0 should be fine but you can push it further if you'd like.
|
||||
|
|
|
@ -598,6 +598,9 @@
|
|||
* is enabled then it also applies to Z_PROBE_SPEED_SLOW.
|
||||
*/
|
||||
|
||||
// A probe that is deployed and stowed with a solenoid pin (SOL1_PIN)
|
||||
//#define SOLENOID_PROBE
|
||||
|
||||
// Enable if you have a Z probe mounted on a sled like those designed by Charles Bell.
|
||||
//#define Z_PROBE_SLED
|
||||
//#define SLED_DOCKING_OFFSET 5 // The extra distance the X axis must travel to pickup the sled. 0 should be fine but you can push it further if you'd like.
|
||||
|
|
Loading…
Reference in a new issue