Browse Source

Add support for SOLENOID_PROBE

pull/1/head
Scott Lahteine 7 years ago
parent
commit
fd2a0784ba
  1. 2
      Marlin/Conditionals_LCD.h
  2. 3
      Marlin/Configuration.h
  3. 20
      Marlin/Marlin_main.cpp
  4. 16
      Marlin/SanityCheck.h
  5. 3
      Marlin/example_configurations/Cartesio/Configuration.h
  6. 3
      Marlin/example_configurations/Felix/Configuration.h
  7. 3
      Marlin/example_configurations/Felix/DUAL/Configuration.h
  8. 3
      Marlin/example_configurations/Hephestos/Configuration.h
  9. 3
      Marlin/example_configurations/Hephestos_2/Configuration.h
  10. 3
      Marlin/example_configurations/K8200/Configuration.h
  11. 3
      Marlin/example_configurations/K8400/Configuration.h
  12. 3
      Marlin/example_configurations/K8400/Dual-head/Configuration.h
  13. 3
      Marlin/example_configurations/RepRapWorld/Megatronics/Configuration.h
  14. 3
      Marlin/example_configurations/RigidBot/Configuration.h
  15. 3
      Marlin/example_configurations/SCARA/Configuration.h
  16. 3
      Marlin/example_configurations/TAZ4/Configuration.h
  17. 3
      Marlin/example_configurations/TinyBoy2/Configuration.h
  18. 3
      Marlin/example_configurations/WITBOX/Configuration.h
  19. 3
      Marlin/example_configurations/adafruit/ST7565/Configuration.h
  20. 3
      Marlin/example_configurations/delta/flsun_kossel_mini/Configuration.h
  21. 3
      Marlin/example_configurations/delta/generic/Configuration.h
  22. 3
      Marlin/example_configurations/delta/kossel_mini/Configuration.h
  23. 3
      Marlin/example_configurations/delta/kossel_pro/Configuration.h
  24. 3
      Marlin/example_configurations/delta/kossel_xl/Configuration.h
  25. 3
      Marlin/example_configurations/makibox/Configuration.h
  26. 3
      Marlin/example_configurations/tvrrug/Round2/Configuration.h
  27. 3
      Marlin/example_configurations/wt150/Configuration.h

2
Marlin/Conditionals_LCD.h

@ -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

3
Marlin/Configuration.h

@ -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.

20
Marlin/Marlin_main.cpp

@ -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();

16
Marlin/SanityCheck.h

@ -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
*/

3
Marlin/example_configurations/Cartesio/Configuration.h

@ -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.

3
Marlin/example_configurations/Felix/Configuration.h

@ -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.

3
Marlin/example_configurations/Felix/DUAL/Configuration.h

@ -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.

3
Marlin/example_configurations/Hephestos/Configuration.h

@ -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.

3
Marlin/example_configurations/Hephestos_2/Configuration.h

@ -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.

3
Marlin/example_configurations/K8200/Configuration.h

@ -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.

3
Marlin/example_configurations/K8400/Configuration.h

@ -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.

3
Marlin/example_configurations/K8400/Dual-head/Configuration.h

@ -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.

3
Marlin/example_configurations/RepRapWorld/Megatronics/Configuration.h

@ -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.

3
Marlin/example_configurations/RigidBot/Configuration.h

@ -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.

3
Marlin/example_configurations/SCARA/Configuration.h

@ -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.

3
Marlin/example_configurations/TAZ4/Configuration.h

@ -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.

3
Marlin/example_configurations/TinyBoy2/Configuration.h

@ -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.

3
Marlin/example_configurations/WITBOX/Configuration.h

@ -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.

3
Marlin/example_configurations/adafruit/ST7565/Configuration.h

@ -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.

3
Marlin/example_configurations/delta/flsun_kossel_mini/Configuration.h

@ -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.

3
Marlin/example_configurations/delta/generic/Configuration.h

@ -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.

3
Marlin/example_configurations/delta/kossel_mini/Configuration.h

@ -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.

3
Marlin/example_configurations/delta/kossel_pro/Configuration.h

@ -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.

3
Marlin/example_configurations/delta/kossel_xl/Configuration.h

@ -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.

3
Marlin/example_configurations/makibox/Configuration.h

@ -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.

3
Marlin/example_configurations/tvrrug/Round2/Configuration.h

@ -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.

3
Marlin/example_configurations/wt150/Configuration.h

@ -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…
Cancel
Save