Simpler report_current_position for SCARA

2.0.x
Scott Lahteine 8 years ago
parent 83fc5e1540
commit 5efb12e889

@ -5116,20 +5116,8 @@ static void report_current_position() {
stepper.report_positions(); stepper.report_positions();
#if IS_SCARA #if IS_SCARA
SERIAL_PROTOCOLPGM("SCARA Theta:"); SERIAL_PROTOCOLPAIR("SCARA Theta:", stepper.get_axis_position_mm(A_AXIS));
SERIAL_PROTOCOL(delta[A_AXIS]); SERIAL_PROTOCOLLNPAIR(" Psi+Theta:", stepper.get_axis_position_mm(B_AXIS));
SERIAL_PROTOCOLPGM(" Psi+Theta:");
SERIAL_PROTOCOLLN(delta[B_AXIS]);
SERIAL_PROTOCOLPGM("SCARA Cal - Theta:");
SERIAL_PROTOCOL(delta[A_AXIS]);
SERIAL_PROTOCOLPGM(" Psi+Theta (90):");
SERIAL_PROTOCOLLN(delta[B_AXIS] - delta[A_AXIS] - 90);
SERIAL_PROTOCOLPGM("SCARA step Cal - Theta:");
SERIAL_PROTOCOL(delta[A_AXIS] / 90 * planner.axis_steps_per_mm[A_AXIS]);
SERIAL_PROTOCOLPGM(" Psi+Theta:");
SERIAL_PROTOCOLLN((delta[B_AXIS] - delta[A_AXIS]) / 90 * planner.axis_steps_per_mm[A_AXIS]);
SERIAL_EOL; SERIAL_EOL;
#endif #endif
} }

@ -91,11 +91,6 @@ class Stepper {
static bool performing_homing; static bool performing_homing;
#endif #endif
//
// Positions of stepper motors, in step units
//
static volatile long count_position[NUM_AXIS];
private: private:
static unsigned char last_direction_bits; // The next stepping-bits to be output static unsigned char last_direction_bits; // The next stepping-bits to be output
@ -143,6 +138,11 @@ class Stepper {
static const int motor_current_setting[3] = PWM_MOTOR_CURRENT; static const int motor_current_setting[3] = PWM_MOTOR_CURRENT;
#endif #endif
//
// Positions of stepper motors, in step units
//
static volatile long count_position[NUM_AXIS];
// //
// Current direction of stepper motors (+1 or -1) // Current direction of stepper motors (+1 or -1)
// //

Loading…
Cancel
Save