Some more servo code tweaks
Just set up the pin. Don't move to a random position. Simplify servo::move() * servo::move() does not need the pin parameter - The pin is set during servo_init() with attach(). * servo::move() does not need a return value. SERVO_LEVELING is the wrong condition to deactivate the servos. Remove some temporary (Servo *) variables. SanityCheck for the servo indexes.
This commit is contained in:
committed by
Richard Wackerbarth
parent
b116c096bd
commit
8b876241bd
@ -654,7 +654,7 @@ const bool Z_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the logic
|
||||
// If you want to still use the Z min endstop for homing, disable Z_SAFE_HOMING above. Eg; to park the head outside the bed area when homing with G28.
|
||||
// WARNING: The Z MIN endstop will need to set properly as it would without a Z PROBE to prevent head crashes and premature stopping during a print.
|
||||
// To use a separate Z PROBE endstop, you must have a Z_PROBE_PIN defined in the pins.h file for your control board.
|
||||
// If you are using a servo based Z PROBE, you will need to enable NUM_SERVOS, SERVO_ENDSTOPS and SERVO_ENDSTOPS_ANGLES in the R/C Servo below.
|
||||
// If you are using a servo based Z PROBE, you will need to enable NUM_SERVOS, Z_ENDSTOP_SERVO_NR and SERVO_ENDSTOPS_ANGLES in the R/C Servo below.
|
||||
// RAMPS 1.3/1.4 boards may be able to use the 5V, Ground and the D32 pin in the Aux 4 section of the RAMPS board. Use 5V for powered sensors, otherwise connect to ground and D32
|
||||
// for normally closed configuration and 5V and D32 for normally open configurations. Normally closed configuration is advised and assumed.
|
||||
// The D32 pin in Aux 4 on RAMPS maps to the Arduino D32 pin. Z_PROBE_PIN is setting the pin to use on the Arduino. Since the D32 pin on the RAMPS maps to D32 on Arduino, this works.
|
||||
@ -907,7 +907,9 @@ const bool Z_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the logic
|
||||
// This allows for servo actuated endstops, primary usage is for the Z Axis to eliminate calibration or bed height changes.
|
||||
// Use M851 to set the z-probe vertical offset from the nozzle. Store that setting with M500.
|
||||
//
|
||||
//#define SERVO_ENDSTOPS {-1, -1, 0} // Servo index for X, Y, Z. Disable with -1
|
||||
//#define X_ENDSTOP_SERVO_NR 1
|
||||
//#define Y_ENDSTOP_SERVO_NR 2
|
||||
//#define Z_ENDSTOP_SERVO_NR 0
|
||||
//#define SERVO_ENDSTOP_ANGLES {0,0, 0,0, 70,0} // X,Y,Z Axis Extend and Retract angles
|
||||
|
||||
// Servo deactivation
|
||||
|
Reference in New Issue
Block a user