Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit e353cfc

Browse files
author
FilippoR
committedMar 9, 2023
Z_SERVO_DEACTIVATE_AFTER_STOW
1 parent 32dcd7f commit e353cfc

File tree

2 files changed

+10
-3
lines changed

2 files changed

+10
-3
lines changed
 

‎Marlin/Configuration.h

+1
Original file line numberDiff line numberDiff line change
@@ -1392,6 +1392,7 @@
13921392
//#define Z_SERVO_ANGLES { 70, 0 } // Z Servo Deploy and Stow angles
13931393
//#define Z_SERVO_MEASURE_ANGLE 45 // Use if the servo must move to a "free" position for measuring after deploy.
13941394
//#define Z_SERVO_INTERMEDIATE_STOW // Stow the probe between points.
1395+
//#define Z_SERVO_DEACTIVATE_AFTER_STOW // Deactivate Z_SERVO when probe is stowed
13951396

13961397
/**
13971398
* The BLTouch probe uses a Hall effect sensor and emulates a servo.

‎Marlin/src/module/probe.cpp

+9-3
Original file line numberDiff line numberDiff line change
@@ -404,10 +404,13 @@ FORCE_INLINE void probe_specific_action(const bool deploy) {
404404
#elif HAS_Z_SERVO_PROBE
405405

406406
servo[Z_PROBE_SERVO_NR].move(servo_angles[Z_PROBE_SERVO_NR][deploy ? 0 : 1]);
407-
407+
#ifdef Z_SERVO_DEACTIVATE_AFTER_STOW
408+
if(!deploy)
409+
servo[Z_PROBE_SERVO_NR].detach();
410+
#endif
408411
#ifdef Z_SERVO_MEASURE_ANGLE
409412
// After deploy move back to the measure angle...
410-
if (deploy) MOVE_SERVO(Z_PROBE_SERVO_NR, Z_SERVO_MEASURE_ANGLE);
413+
if (deploy) MOVE_SERVO(Z_PROBE_SERVO_NR, Z_SERVO_MEASURE_ANGLE);
411414
#endif
412415

413416
#elif ANY(TOUCH_MI_PROBE, Z_PROBE_ALLEN_KEY, MAG_MOUNTED_PROBE)
@@ -940,7 +943,10 @@ float Probe::probe_at_point(const_float_t rx, const_float_t ry, const ProbePtRai
940943
* There's no way to know where the nozzle is positioned until
941944
* homing has been done - no homing with z-probe without init!
942945
*/
943-
STOW_Z_SERVO();
946+
servo[Z_PROBE_SERVO_NR].move(servo_angles[Z_PROBE_SERVO_NR][1]);
947+
#ifdef Z_SERVO_DEACTIVATE_AFTER_STOW
948+
servo[Z_PROBE_SERVO_NR].detach();
949+
#endif
944950
}
945951

946952
#endif // HAS_Z_SERVO_PROBE

0 commit comments

Comments
 (0)
Please sign in to comment.