Z_SERVO_DEACTIVATE_AFTER_STOW (#24215)

This commit is contained in:
FilippoR 2023-03-19 09:55:34 +01:00 committed by GitHub
parent 9249f61a80
commit fd36e69bd2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 15 additions and 7 deletions

View file

@ -1387,10 +1387,13 @@
/** /**
* Z Servo Probe, such as an endstop switch on a rotating arm. * Z Servo Probe, such as an endstop switch on a rotating arm.
*/ */
//#define Z_PROBE_SERVO_NR 0 // Defaults to SERVO 0 connector. //#define Z_PROBE_SERVO_NR 0
//#define Z_SERVO_ANGLES { 70, 0 } // Z Servo Deploy and Stow angles #ifdef Z_PROBE_SERVO_NR
//#define Z_SERVO_MEASURE_ANGLE 45 // Use if the servo must move to a "free" position for measuring after deploy. //#define Z_SERVO_ANGLES { 70, 0 } // Z Servo Deploy and Stow angles
//#define Z_SERVO_INTERMEDIATE_STOW // Stow the probe between points. //#define Z_SERVO_MEASURE_ANGLE 45 // Use if the servo must move to a "free" position for measuring after deploy
//#define Z_SERVO_INTERMEDIATE_STOW // Stow the probe between points
//#define Z_SERVO_DEACTIVATE_AFTER_STOW // Deactivate the servo when probe is stowed
#endif
/** /**
* The BLTouch probe uses a Hall effect sensor and emulates a servo. * The BLTouch probe uses a Hall effect sensor and emulates a servo.

View file

@ -403,13 +403,16 @@ FORCE_INLINE void probe_specific_action(const bool deploy) {
#elif HAS_Z_SERVO_PROBE #elif HAS_Z_SERVO_PROBE
// i.e., deploy ? DEPLOY_Z_SERVO() : STOW_Z_SERVO();
servo[Z_PROBE_SERVO_NR].move(servo_angles[Z_PROBE_SERVO_NR][deploy ? 0 : 1]); servo[Z_PROBE_SERVO_NR].move(servo_angles[Z_PROBE_SERVO_NR][deploy ? 0 : 1]);
#ifdef Z_SERVO_MEASURE_ANGLE #ifdef Z_SERVO_MEASURE_ANGLE
// After deploy move back to the measure angle... // After deploy move back to the measure angle...
if (deploy) MOVE_SERVO(Z_PROBE_SERVO_NR, Z_SERVO_MEASURE_ANGLE); if (deploy) servo[Z_PROBE_SERVO_NR].move(Z_SERVO_MEASURE_ANGLE);
#endif #endif
if (TERN0(Z_SERVO_DEACTIVATE_AFTER_STOW, !deploy)) servo[Z_PROBE_SERVO_NR].detach();
#elif ANY(TOUCH_MI_PROBE, Z_PROBE_ALLEN_KEY, MAG_MOUNTED_PROBE) #elif ANY(TOUCH_MI_PROBE, Z_PROBE_ALLEN_KEY, MAG_MOUNTED_PROBE)
deploy ? run_deploy_moves() : run_stow_moves(); deploy ? run_deploy_moves() : run_stow_moves();
@ -950,6 +953,8 @@ float Probe::probe_at_point(const_float_t rx, const_float_t ry, const ProbePtRai
* homing has been done - no homing with z-probe without init! * homing has been done - no homing with z-probe without init!
*/ */
STOW_Z_SERVO(); STOW_Z_SERVO();
TERN_(Z_SERVO_DEACTIVATE_AFTER_STOW, servo[Z_PROBE_SERVO_NR].detach());
} }
#endif // HAS_Z_SERVO_PROBE #endif // HAS_Z_SERVO_PROBE

View file

@ -63,13 +63,13 @@ opt_set MOTHERBOARD BOARD_AZTEEG_X3_PRO NUM_SERVOS 1 \
NUM_RUNOUT_SENSORS 5 FIL_RUNOUT2_PIN 44 FIL_RUNOUT3_PIN 45 FIL_RUNOUT4_PIN 46 FIL_RUNOUT5_PIN 47 \ NUM_RUNOUT_SENSORS 5 FIL_RUNOUT2_PIN 44 FIL_RUNOUT3_PIN 45 FIL_RUNOUT4_PIN 46 FIL_RUNOUT5_PIN 47 \
FIL_RUNOUT3_STATE HIGH FILAMENT_RUNOUT_SCRIPT '"M600 T%c"' FIL_RUNOUT3_STATE HIGH FILAMENT_RUNOUT_SCRIPT '"M600 T%c"'
opt_enable VIKI2 BOOT_MARLIN_LOGO_ANIMATED SDSUPPORT AUTO_REPORT_SD_STATUS \ opt_enable VIKI2 BOOT_MARLIN_LOGO_ANIMATED SDSUPPORT AUTO_REPORT_SD_STATUS \
Z_PROBE_SERVO_NR Z_SERVO_ANGLES DEACTIVATE_SERVOS_AFTER_MOVE \ Z_PROBE_SERVO_NR Z_SERVO_ANGLES Z_SERVO_MEASURE_ANGLE DEACTIVATE_SERVOS_AFTER_MOVE Z_SERVO_DEACTIVATE_AFTER_STOW \
AUTO_BED_LEVELING_3POINT DEBUG_LEVELING_FEATURE PROBE_PT_1 PROBE_PT_2 PROBE_PT_3 \ AUTO_BED_LEVELING_3POINT DEBUG_LEVELING_FEATURE PROBE_PT_1 PROBE_PT_2 PROBE_PT_3 \
EEPROM_SETTINGS EEPROM_CHITCHAT M114_DETAIL AUTO_REPORT_POSITION \ EEPROM_SETTINGS EEPROM_CHITCHAT M114_DETAIL AUTO_REPORT_POSITION \
NO_VOLUMETRICS EXTENDED_CAPABILITIES_REPORT AUTO_REPORT_TEMPERATURES AUTOTEMP G38_PROBE_TARGET JOYSTICK \ NO_VOLUMETRICS EXTENDED_CAPABILITIES_REPORT AUTO_REPORT_TEMPERATURES AUTOTEMP G38_PROBE_TARGET JOYSTICK \
DIRECT_STEPPING DETECT_BROKEN_ENDSTOP \ DIRECT_STEPPING DETECT_BROKEN_ENDSTOP \
FILAMENT_RUNOUT_SENSOR NOZZLE_PARK_FEATURE ADVANCED_PAUSE_FEATURE Z_SAFE_HOMING FIL_RUNOUT3_PULLUP FILAMENT_RUNOUT_SENSOR NOZZLE_PARK_FEATURE ADVANCED_PAUSE_FEATURE Z_SAFE_HOMING FIL_RUNOUT3_PULLUP
exec_test $1 $2 "Multiple runout sensors (x5) | Distinct runout states" "$3" exec_test $1 $2 "Z Servo Probe | Multiple runout sensors (x5)" "$3"
# #