|
|
@ -28,15 +28,15 @@ |
|
|
|
XATC xatc; |
|
|
|
|
|
|
|
float XATC::spacing, XATC::start; |
|
|
|
xatc_points_t XATC::z_values; |
|
|
|
xatc_array_t XATC::z_offset; |
|
|
|
|
|
|
|
void XATC::print_points() { |
|
|
|
SERIAL_ECHOLNPGM(" X-Twist Correction:"); |
|
|
|
LOOP_L_N(x, XATC_MAX_POINTS) { |
|
|
|
SERIAL_CHAR(' '); |
|
|
|
if (!isnan(z_values[x])) { |
|
|
|
if (z_values[x] >= 0) SERIAL_CHAR('+'); |
|
|
|
SERIAL_ECHO_F(z_values[x], 3); |
|
|
|
if (!isnan(z_offset[x])) { |
|
|
|
if (z_offset[x] >= 0) SERIAL_CHAR('+'); |
|
|
|
SERIAL_ECHO_F(z_offset[x], 3); |
|
|
|
} |
|
|
|
else { |
|
|
|
LOOP_L_N(i, 6) |
|
|
@ -54,7 +54,7 @@ float XATC::compensation(const xy_pos_t &raw) { |
|
|
|
int i = FLOOR(t); |
|
|
|
LIMIT(i, 0, XATC_MAX_POINTS - 2); |
|
|
|
t -= i; |
|
|
|
return lerp(t, z_values[i], z_values[i + 1]); |
|
|
|
return lerp(t, z_offset[i], z_offset[i + 1]); |
|
|
|
} |
|
|
|
|
|
|
|
#endif // X_AXIS_TWIST_COMPENSATION
|
|
|
|