Make SERVO_ENDSTOP_ANGLES 2-dimensional

This commit is contained in:
Scott Lahteine 2015-07-28 19:22:44 -07:00 committed by Richard Wackerbarth
parent 525d0dc239
commit 0af2a80e06
18 changed files with 22 additions and 22 deletions

View File

@ -789,7 +789,7 @@ const bool Z_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the logic
//#define X_ENDSTOP_SERVO_NR 1 //#define X_ENDSTOP_SERVO_NR 1
//#define Y_ENDSTOP_SERVO_NR 2 //#define Y_ENDSTOP_SERVO_NR 2
//#define Z_ENDSTOP_SERVO_NR 0 //#define Z_ENDSTOP_SERVO_NR 0
//#define SERVO_ENDSTOP_ANGLES {0,0, 0,0, 70,0} // X,Y,Z Axis Extend and Retract angles //#define SERVO_ENDSTOP_ANGLES {{0,0}, {0,0}, {70,0}} // X,Y,Z Axis Extend and Retract angles
// Servo deactivation // Servo deactivation
// //

View File

@ -316,7 +316,7 @@ bool target_direction;
#ifdef SERVO_ENDSTOPS #ifdef SERVO_ENDSTOPS
const int servo_endstops[] = SERVO_ENDSTOPS; const int servo_endstops[] = SERVO_ENDSTOPS;
const int servo_endstop_angles[] = SERVO_ENDSTOP_ANGLES; const int servo_endstop_angles[][] = SERVO_ENDSTOP_ANGLES;
#endif #endif
#ifdef BARICUDA #ifdef BARICUDA
@ -581,7 +581,7 @@ void servo_init() {
#ifdef SERVO_ENDSTOPS #ifdef SERVO_ENDSTOPS
for (int i = 0; i < 3; i++) for (int i = 0; i < 3; i++)
if (servo_endstops[i] >= 0) if (servo_endstops[i] >= 0)
servo[servo_endstops[i]].move(servo_endstop_angles[i * 2 + 1]); servo[servo_endstops[i]].move(servo_endstop_angles[i][1]);
#endif #endif
} }
@ -1325,7 +1325,7 @@ static void setup_for_endstop_move() {
#ifdef SERVO_ENDSTOPS #ifdef SERVO_ENDSTOPS
// Engage Z Servo endstop if enabled // Engage Z Servo endstop if enabled
if (servo_endstops[Z_AXIS] >= 0) servo[servo_endstops[Z_AXIS]].move(servo_endstop_angles[Z_AXIS * 2]); if (servo_endstops[Z_AXIS] >= 0) servo[servo_endstops[Z_AXIS]].move(servo_endstop_angles[Z_AXIS][0]);
#elif defined(Z_PROBE_ALLEN_KEY) #elif defined(Z_PROBE_ALLEN_KEY)
feedrate = Z_PROBE_ALLEN_KEY_DEPLOY_1_FEEDRATE; feedrate = Z_PROBE_ALLEN_KEY_DEPLOY_1_FEEDRATE;
@ -1425,7 +1425,7 @@ static void setup_for_endstop_move() {
#endif #endif
// Change the Z servo angle // Change the Z servo angle
servo[servo_endstops[Z_AXIS]].move(servo_endstop_angles[Z_AXIS * 2 + 1]); servo[servo_endstops[Z_AXIS]].move(servo_endstop_angles[Z_AXIS][1]);
} }
#elif defined(Z_PROBE_ALLEN_KEY) #elif defined(Z_PROBE_ALLEN_KEY)
@ -1783,7 +1783,7 @@ static void homeaxis(AxisEnum axis) {
#ifdef SERVO_ENDSTOPS #ifdef SERVO_ENDSTOPS
// Retract Servo endstop if enabled // Retract Servo endstop if enabled
if (servo_endstops[axis] >= 0) if (servo_endstops[axis] >= 0)
servo[servo_endstops[axis]].move(servo_endstop_angles[axis * 2 + 1]); servo[servo_endstops[axis]].move(servo_endstop_angles[axis][1]);
#endif #endif
} }

View File

@ -789,7 +789,7 @@ const bool Z_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the logic
//#define X_ENDSTOP_SERVO_NR 1 //#define X_ENDSTOP_SERVO_NR 1
//#define Y_ENDSTOP_SERVO_NR 2 //#define Y_ENDSTOP_SERVO_NR 2
//#define Z_ENDSTOP_SERVO_NR 0 //#define Z_ENDSTOP_SERVO_NR 0
//#define SERVO_ENDSTOP_ANGLES {0,0, 0,0, 70,0} // X,Y,Z Axis Extend and Retract angles //#define SERVO_ENDSTOP_ANGLES {{0,0}, {0,0}, {70,0}} // X,Y,Z Axis Extend and Retract angles
// Servo deactivation // Servo deactivation
// //

View File

@ -767,7 +767,7 @@ const bool Z_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the logic
//#define X_ENDSTOP_SERVO_NR 1 //#define X_ENDSTOP_SERVO_NR 1
//#define Y_ENDSTOP_SERVO_NR 2 //#define Y_ENDSTOP_SERVO_NR 2
//#define Z_ENDSTOP_SERVO_NR 0 //#define Z_ENDSTOP_SERVO_NR 0
//#define SERVO_ENDSTOP_ANGLES {0,0, 0,0, 70,0} // X,Y,Z Axis Extend and Retract angles //#define SERVO_ENDSTOP_ANGLES {{0,0}, {0,0}, {70,0}} // X,Y,Z Axis Extend and Retract angles
// Servo deactivation // Servo deactivation
// //

View File

@ -719,7 +719,7 @@ const bool Z_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the logic
//#define X_ENDSTOP_SERVO_NR 1 //#define X_ENDSTOP_SERVO_NR 1
//#define Y_ENDSTOP_SERVO_NR 2 //#define Y_ENDSTOP_SERVO_NR 2
//#define Z_ENDSTOP_SERVO_NR 0 //#define Z_ENDSTOP_SERVO_NR 0
//#define SERVO_ENDSTOP_ANGLES {0,0, 0,0, 70,0} // X,Y,Z Axis Extend and Retract angles //#define SERVO_ENDSTOP_ANGLES {{0,0}, {0,0}, {70,0}} // X,Y,Z Axis Extend and Retract angles
// Servo deactivation // Servo deactivation
// //

View File

@ -776,7 +776,7 @@ const bool Z_PROBE_ENDSTOP_INVERTING = true; // set to true to invert the logic
//#define X_ENDSTOP_SERVO_NR 1 //#define X_ENDSTOP_SERVO_NR 1
//#define Y_ENDSTOP_SERVO_NR 2 //#define Y_ENDSTOP_SERVO_NR 2
//#define Z_ENDSTOP_SERVO_NR 0 //#define Z_ENDSTOP_SERVO_NR 0
//#define SERVO_ENDSTOP_ANGLES {0,0, 0,0, 70,0} // X,Y,Z Axis Extend and Retract angles //#define SERVO_ENDSTOP_ANGLES {{0,0}, {0,0}, {70,0}} // X,Y,Z Axis Extend and Retract angles
// Servo deactivation // Servo deactivation
// //

View File

@ -772,7 +772,7 @@ const bool Z_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the logic
//#define X_ENDSTOP_SERVO_NR 1 //#define X_ENDSTOP_SERVO_NR 1
//#define Y_ENDSTOP_SERVO_NR 2 //#define Y_ENDSTOP_SERVO_NR 2
//#define Z_ENDSTOP_SERVO_NR 0 //#define Z_ENDSTOP_SERVO_NR 0
//#define SERVO_ENDSTOP_ANGLES {0,0, 0,0, 70,0} // X,Y,Z Axis Extend and Retract angles //#define SERVO_ENDSTOP_ANGLES {{0,0}, {0,0}, {70,0}} // X,Y,Z Axis Extend and Retract angles
// Servo deactivation // Servo deactivation
// //

View File

@ -784,7 +784,7 @@ const bool Z_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the logic
//#define X_ENDSTOP_SERVO_NR 1 //#define X_ENDSTOP_SERVO_NR 1
//#define Y_ENDSTOP_SERVO_NR 2 //#define Y_ENDSTOP_SERVO_NR 2
//#define Z_ENDSTOP_SERVO_NR 0 //#define Z_ENDSTOP_SERVO_NR 0
//#define SERVO_ENDSTOP_ANGLES {0,0, 0,0, 70,0} // X,Y,Z Axis Extend and Retract angles //#define SERVO_ENDSTOP_ANGLES {{0,0}, {0,0}, {70,0}} // X,Y,Z Axis Extend and Retract angles
// Servo deactivation // Servo deactivation
// //

View File

@ -767,7 +767,7 @@ const bool Z_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the logic
//#define X_ENDSTOP_SERVO_NR 1 //#define X_ENDSTOP_SERVO_NR 1
//#define Y_ENDSTOP_SERVO_NR 2 //#define Y_ENDSTOP_SERVO_NR 2
//#define Z_ENDSTOP_SERVO_NR 0 //#define Z_ENDSTOP_SERVO_NR 0
//#define SERVO_ENDSTOP_ANGLES {0,0, 0,0, 70,0} // X,Y,Z Axis Extend and Retract angles //#define SERVO_ENDSTOP_ANGLES {{0,0}, {0,0}, {70,0}} // X,Y,Z Axis Extend and Retract angles
// Servo deactivation // Servo deactivation
// //

View File

@ -792,7 +792,7 @@ const bool Z_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the logic
//#define X_ENDSTOP_SERVO_NR 1 //#define X_ENDSTOP_SERVO_NR 1
//#define Y_ENDSTOP_SERVO_NR 2 //#define Y_ENDSTOP_SERVO_NR 2
//#define Z_ENDSTOP_SERVO_NR 0 //#define Z_ENDSTOP_SERVO_NR 0
//#define SERVO_ENDSTOP_ANGLES {0,0, 0,0, 70,0} // X,Y,Z Axis Extend and Retract angles //#define SERVO_ENDSTOP_ANGLES {{0,0}, {0,0}, {70,0}} // X,Y,Z Axis Extend and Retract angles
// Servo deactivation // Servo deactivation
// //

View File

@ -776,7 +776,7 @@ const bool Z_PROBE_ENDSTOP_INVERTING = true; // set to true to invert the logic
//#define X_ENDSTOP_SERVO_NR 1 //#define X_ENDSTOP_SERVO_NR 1
//#define Y_ENDSTOP_SERVO_NR 2 //#define Y_ENDSTOP_SERVO_NR 2
//#define Z_ENDSTOP_SERVO_NR 0 //#define Z_ENDSTOP_SERVO_NR 0
//#define SERVO_ENDSTOP_ANGLES {0,0, 0,0, 70,0} // X,Y,Z Axis Extend and Retract angles //#define SERVO_ENDSTOP_ANGLES {{0,0}, {0,0}, {70,0}} // X,Y,Z Axis Extend and Retract angles
// Servo deactivation // Servo deactivation
// //

View File

@ -784,7 +784,7 @@ const bool Z_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the logic
//#define X_ENDSTOP_SERVO_NR 1 //#define X_ENDSTOP_SERVO_NR 1
//#define Y_ENDSTOP_SERVO_NR 2 //#define Y_ENDSTOP_SERVO_NR 2
//#define Z_ENDSTOP_SERVO_NR 0 //#define Z_ENDSTOP_SERVO_NR 0
//#define SERVO_ENDSTOP_ANGLES {0,0, 0,0, 70,0} // X,Y,Z Axis Extend and Retract angles //#define SERVO_ENDSTOP_ANGLES {{0,0}, {0,0}, {70,0}} // X,Y,Z Axis Extend and Retract angles
// Servo deactivation // Servo deactivation
// //

View File

@ -907,7 +907,7 @@ const bool Z_PROBE_ENDSTOP_INVERTING = true; // set to true to invert the logic
//#define X_ENDSTOP_SERVO_NR 1 //#define X_ENDSTOP_SERVO_NR 1
//#define Y_ENDSTOP_SERVO_NR 2 //#define Y_ENDSTOP_SERVO_NR 2
//#define Z_ENDSTOP_SERVO_NR 0 //#define Z_ENDSTOP_SERVO_NR 0
//#define SERVO_ENDSTOP_ANGLES {0,0, 0,0, 70,0} // X,Y,Z Axis Extend and Retract angles //#define SERVO_ENDSTOP_ANGLES {{0,0}, {0,0}, {70,0}} // X,Y,Z Axis Extend and Retract angles
// Servo deactivation // Servo deactivation
// //

View File

@ -911,7 +911,7 @@ const bool Z_PROBE_ENDSTOP_INVERTING = true; // set to true to invert the logic
//#define X_ENDSTOP_SERVO_NR 1 //#define X_ENDSTOP_SERVO_NR 1
//#define Y_ENDSTOP_SERVO_NR 2 //#define Y_ENDSTOP_SERVO_NR 2
//#define Z_ENDSTOP_SERVO_NR 0 //#define Z_ENDSTOP_SERVO_NR 0
//#define SERVO_ENDSTOP_ANGLES {0,0, 0,0, 70,0} // X,Y,Z Axis Extend and Retract angles //#define SERVO_ENDSTOP_ANGLES {{0,0}, {0,0}, {70,0}} // X,Y,Z Axis Extend and Retract angles
// Servo deactivation // Servo deactivation
// //

View File

@ -911,7 +911,7 @@ const bool Z_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the logic
//#define X_ENDSTOP_SERVO_NR 1 //#define X_ENDSTOP_SERVO_NR 1
//#define Y_ENDSTOP_SERVO_NR 2 //#define Y_ENDSTOP_SERVO_NR 2
//#define Z_ENDSTOP_SERVO_NR 0 //#define Z_ENDSTOP_SERVO_NR 0
//#define SERVO_ENDSTOP_ANGLES {0,0, 0,0, 70,0} // X,Y,Z Axis Extend and Retract angles //#define SERVO_ENDSTOP_ANGLES {{0,0}, {0,0}, {70,0}} // X,Y,Z Axis Extend and Retract angles
// Servo deactivation // Servo deactivation
// //

View File

@ -906,7 +906,7 @@ const bool Z_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the logic
//#define X_ENDSTOP_SERVO_NR 1 //#define X_ENDSTOP_SERVO_NR 1
//#define Y_ENDSTOP_SERVO_NR 2 //#define Y_ENDSTOP_SERVO_NR 2
//#define Z_ENDSTOP_SERVO_NR 0 //#define Z_ENDSTOP_SERVO_NR 0
//#define SERVO_ENDSTOP_ANGLES {0,0, 0,0, 70,0} // X,Y,Z Axis Extend and Retract angles //#define SERVO_ENDSTOP_ANGLES {{0,0}, {0,0}, {70,0}} // X,Y,Z Axis Extend and Retract angles
// Servo deactivation // Servo deactivation
// //

View File

@ -787,7 +787,7 @@ const bool Z_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the logic
//#define X_ENDSTOP_SERVO_NR 1 //#define X_ENDSTOP_SERVO_NR 1
//#define Y_ENDSTOP_SERVO_NR 2 //#define Y_ENDSTOP_SERVO_NR 2
//#define Z_ENDSTOP_SERVO_NR 0 //#define Z_ENDSTOP_SERVO_NR 0
//#define SERVO_ENDSTOP_ANGLES {0,0, 0,0, 70,0} // X,Y,Z Axis Extend and Retract angles //#define SERVO_ENDSTOP_ANGLES {{0,0}, {0,0}, {70,0}} // X,Y,Z Axis Extend and Retract angles
// Servo deactivation // Servo deactivation
// //

View File

@ -778,7 +778,7 @@ const bool Z_PROBE_ENDSTOP_INVERTING = true; // set to true to invert the logic
//#define X_ENDSTOP_SERVO_NR 1 //#define X_ENDSTOP_SERVO_NR 1
//#define Y_ENDSTOP_SERVO_NR 2 //#define Y_ENDSTOP_SERVO_NR 2
//#define Z_ENDSTOP_SERVO_NR 0 //#define Z_ENDSTOP_SERVO_NR 0
//#define SERVO_ENDSTOP_ANGLES {0,0, 0,0, 70,0} // X,Y,Z Axis Extend and Retract angles //#define SERVO_ENDSTOP_ANGLES {{0,0}, {0,0}, {70,0}} // X,Y,Z Axis Extend and Retract angles
// Servo deactivation // Servo deactivation
// //