Fix Skew factors (#12555)
- Ensure Skew factors are calculated from test square measurements
This commit is contained in:
parent
03ef2d6c82
commit
8be91677df
2 changed files with 16 additions and 26 deletions
|
@ -1208,34 +1208,28 @@
|
||||||
#define _SKEW_FACTOR(a,b,c) _SKEW_SIDE(float(a),_GET_SIDE(float(a),float(b),float(c)),float(c))
|
#define _SKEW_FACTOR(a,b,c) _SKEW_SIDE(float(a),_GET_SIDE(float(a),float(b),float(c)),float(c))
|
||||||
|
|
||||||
#ifndef XY_SKEW_FACTOR
|
#ifndef XY_SKEW_FACTOR
|
||||||
constexpr float XY_SKEW_FACTOR = (
|
#if defined(XY_DIAG_AC) && defined(XY_DIAG_BD) && defined(XY_SIDE_AD)
|
||||||
#if defined(XY_DIAG_AC) && defined(XY_DIAG_BD) && defined(XY_SIDE_AD)
|
#define XY_SKEW_FACTOR _SKEW_FACTOR(XY_DIAG_AC, XY_DIAG_BD, XY_SIDE_AD)
|
||||||
_SKEW_FACTOR(XY_DIAG_AC, XY_DIAG_BD, XY_SIDE_AD)
|
#else
|
||||||
#else
|
#define XY_SKEW_FACTOR 0.0
|
||||||
0.0
|
#endif
|
||||||
#endif
|
|
||||||
);
|
|
||||||
#endif
|
#endif
|
||||||
#ifndef XZ_SKEW_FACTOR
|
#ifndef XZ_SKEW_FACTOR
|
||||||
#if defined(XY_SIDE_AD) && !defined(XZ_SIDE_AD)
|
#if defined(XY_SIDE_AD) && !defined(XZ_SIDE_AD)
|
||||||
#define XZ_SIDE_AD XY_SIDE_AD
|
#define XZ_SIDE_AD XY_SIDE_AD
|
||||||
#endif
|
#endif
|
||||||
constexpr float XZ_SKEW_FACTOR = (
|
#if defined(XZ_DIAG_AC) && defined(XZ_DIAG_BD) && defined(XZ_SIDE_AD)
|
||||||
#if defined(XZ_DIAG_AC) && defined(XZ_DIAG_BD) && defined(XZ_SIDE_AD)
|
#define XZ_SKEW_FACTOR _SKEW_FACTOR(XZ_DIAG_AC, XZ_DIAG_BD, XZ_SIDE_AD)
|
||||||
_SKEW_FACTOR(XZ_DIAG_AC, XZ_DIAG_BD, XZ_SIDE_AD)
|
#else
|
||||||
#else
|
#define XZ_SKEW_FACTOR 0.0
|
||||||
0.0
|
#endif
|
||||||
#endif
|
|
||||||
);
|
|
||||||
#endif
|
#endif
|
||||||
#ifndef YZ_SKEW_FACTOR
|
#ifndef YZ_SKEW_FACTOR
|
||||||
constexpr float YZ_SKEW_FACTOR = (
|
#if defined(YZ_DIAG_AC) && defined(YZ_DIAG_BD) && defined(YZ_SIDE_AD)
|
||||||
#if defined(YZ_DIAG_AC) && defined(YZ_DIAG_BD) && defined(YZ_SIDE_AD)
|
#define YZ_SKEW_FACTOR _SKEW_FACTOR(YZ_DIAG_AC, YZ_DIAG_BD, YZ_SIDE_AD)
|
||||||
_SKEW_FACTOR(YZ_DIAG_AC, YZ_DIAG_BD, YZ_SIDE_AD)
|
#else
|
||||||
#else
|
#define YZ_SKEW_FACTOR 0.0
|
||||||
0.0
|
#endif
|
||||||
#endif
|
|
||||||
);
|
|
||||||
#endif
|
#endif
|
||||||
#endif // SKEW_CORRECTION
|
#endif // SKEW_CORRECTION
|
||||||
|
|
||||||
|
|
|
@ -175,13 +175,9 @@ typedef struct {
|
||||||
min_travel_feedrate_mm_s; // (mm/s) M205 T - Minimum travel feedrate
|
min_travel_feedrate_mm_s; // (mm/s) M205 T - Minimum travel feedrate
|
||||||
} planner_settings_t;
|
} planner_settings_t;
|
||||||
|
|
||||||
#ifndef XY_SKEW_FACTOR
|
#if DISABLED(SKEW_CORRECTION)
|
||||||
#define XY_SKEW_FACTOR 0
|
#define XY_SKEW_FACTOR 0
|
||||||
#endif
|
|
||||||
#ifndef XZ_SKEW_FACTOR
|
|
||||||
#define XZ_SKEW_FACTOR 0
|
#define XZ_SKEW_FACTOR 0
|
||||||
#endif
|
|
||||||
#ifndef YZ_SKEW_FACTOR
|
|
||||||
#define YZ_SKEW_FACTOR 0
|
#define YZ_SKEW_FACTOR 0
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
Reference in a new issue