|
@@ -24,18 +24,21 @@
|
24
|
24
|
#if ENABLED(X_AXIS_TWIST_COMPENSATION)
|
25
|
25
|
|
26
|
26
|
#include "x_twist.h"
|
|
27
|
+#include "../module/probe.h"
|
27
|
28
|
|
28
|
29
|
XATC xatc;
|
29
|
30
|
|
30
|
|
-bool XATC::enabled = true;
|
|
31
|
+bool XATC::enabled;
|
31
|
32
|
float XATC::spacing, XATC::start;
|
32
|
33
|
xatc_array_t XATC::z_offset; // Initialized by settings.load()
|
33
|
34
|
|
34
|
35
|
void XATC::reset() {
|
35
|
36
|
constexpr float xzo[] = XATC_Z_OFFSETS;
|
36
|
37
|
static_assert(COUNT(xzo) == XATC_MAX_POINTS, "XATC_Z_OFFSETS is the wrong size.");
|
37
|
|
- enabled = false;
|
38
|
38
|
COPY(z_offset, xzo);
|
|
39
|
+ xatc.spacing = (probe.max_x() - probe.min_x()) / (XATC_MAX_POINTS - 1);
|
|
40
|
+ xatc.start = probe.min_x();
|
|
41
|
+ enabled = true;
|
39
|
42
|
}
|
40
|
43
|
|
41
|
44
|
void XATC::print_points() {
|