Remove SCARA axis_scaling

This commit is contained in:
Scott Lahteine
2016-09-16 14:31:53 -05:00
parent d41eeb62af
commit 83a41c7ceb
4 changed files with 17 additions and 68 deletions

View File

@@ -253,7 +253,6 @@
* M362 - SCARA calibration: Move to cal-position PsiA (0 deg calibration)
* M363 - SCARA calibration: Move to cal-position PsiB (90 deg calibration - steps per degree)
* M364 - SCARA calibration: Move to cal-position PSIC (90 deg to Theta calibration position)
* M365 - SCARA calibration: Scaling factor, X, Y, Z axis
* ************* SCARA End ***************
*
* ************ Custom codes - This can change to suit future G-code regulations
@@ -505,8 +504,7 @@ static uint8_t target_extruder;
L2_2 = sq(float(L2));
float delta_segments_per_second = SCARA_SEGMENTS_PER_SECOND,
delta[ABC],
axis_scaling[ABC] = { 1, 1, 1 }; // Build size scaling, default to 1
delta[ABC];
#endif
float cartes[XYZ] = { 0 };
@@ -5750,8 +5748,8 @@ inline void gcode_M303() {
if (IsRunning()) {
//gcode_get_destination(); // For X Y Z E F
forward_kinematics_SCARA(delta_a, delta_b);
destination[X_AXIS] = cartes[X_AXIS] / axis_scaling[X_AXIS];
destination[Y_AXIS] = cartes[Y_AXIS] / axis_scaling[Y_AXIS];
destination[X_AXIS] = cartes[X_AXIS];
destination[Y_AXIS] = cartes[Y_AXIS];
destination[Z_AXIS] = current_position[Z_AXIS];
prepare_move_to_destination();
//ok_to_send();
@@ -5800,15 +5798,6 @@ inline void gcode_M303() {
return SCARA_move_to_cal(45, 135);
}
/**
* M365: SCARA calibration: Scaling factor, X, Y, Z axis
*/
inline void gcode_M365() {
LOOP_XYZ(i)
if (code_seen(axis_codes[i]))
axis_scaling[i] = code_value_float();
}
#endif // SCARA
#if ENABLED(EXT_SOLENOID)
@@ -7407,9 +7396,6 @@ void process_next_command() {
case 364: // M364 SCARA Psi pos3 (90 deg to Theta)
if (gcode_M364()) return;
break;
case 365: // M365 Set SCARA scaling for X Y Z
gcode_M365();
break;
#endif // SCARA
case 400: // M400 finish all moves
@@ -8359,8 +8345,8 @@ void prepare_move_to_destination() {
static float C2, S2, SK1, SK2, THETA, PSI;
float sx = RAW_X_POSITION(cartesian[X_AXIS]) * axis_scaling[X_AXIS] - SCARA_OFFSET_X, //Translate SCARA to standard X Y
sy = RAW_Y_POSITION(cartesian[Y_AXIS]) * axis_scaling[Y_AXIS] - SCARA_OFFSET_Y; // With scaling factor.
float sx = RAW_X_POSITION(cartesian[X_AXIS]) - SCARA_OFFSET_X, //Translate SCARA to standard X Y
sy = RAW_Y_POSITION(cartesian[Y_AXIS]) - SCARA_OFFSET_Y; // With scaling factor.
#if (L1 == L2)
C2 = HYPOT2(sx, sy) / (2 * L1_2) - 1;