Browse Source

Fix Skew factors (#12555)

- Ensure Skew factors are calculated from test square measurements
pull/1/head
Jacob Jordan 6 years ago
committed by Scott Lahteine
parent
commit
8be91677df
  1. 36
      Marlin/src/inc/Conditionals_post.h
  2. 6
      Marlin/src/module/planner.h

36
Marlin/src/inc/Conditionals_post.h

@ -1208,34 +1208,28 @@
#define _SKEW_FACTOR(a,b,c) _SKEW_SIDE(float(a),_GET_SIDE(float(a),float(b),float(c)),float(c))
#ifndef XY_SKEW_FACTOR
constexpr float XY_SKEW_FACTOR = (
#if defined(XY_DIAG_AC) && defined(XY_DIAG_BD) && defined(XY_SIDE_AD)
_SKEW_FACTOR(XY_DIAG_AC, XY_DIAG_BD, XY_SIDE_AD)
#else
0.0
#endif
);
#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)
#else
#define XY_SKEW_FACTOR 0.0
#endif
#endif
#ifndef XZ_SKEW_FACTOR
#if defined(XY_SIDE_AD) && !defined(XZ_SIDE_AD)
#define XZ_SIDE_AD XY_SIDE_AD
#endif
constexpr float XZ_SKEW_FACTOR = (
#if defined(XZ_DIAG_AC) && defined(XZ_DIAG_BD) && defined(XZ_SIDE_AD)
_SKEW_FACTOR(XZ_DIAG_AC, XZ_DIAG_BD, XZ_SIDE_AD)
#else
0.0
#endif
);
#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)
#else
#define XZ_SKEW_FACTOR 0.0
#endif
#endif
#ifndef YZ_SKEW_FACTOR
constexpr float YZ_SKEW_FACTOR = (
#if defined(YZ_DIAG_AC) && defined(YZ_DIAG_BD) && defined(YZ_SIDE_AD)
_SKEW_FACTOR(YZ_DIAG_AC, YZ_DIAG_BD, YZ_SIDE_AD)
#else
0.0
#endif
);
#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)
#else
#define YZ_SKEW_FACTOR 0.0
#endif
#endif
#endif // SKEW_CORRECTION

6
Marlin/src/module/planner.h

@ -175,13 +175,9 @@ typedef struct {
min_travel_feedrate_mm_s; // (mm/s) M205 T - Minimum travel feedrate
} planner_settings_t;
#ifndef XY_SKEW_FACTOR
#if DISABLED(SKEW_CORRECTION)
#define XY_SKEW_FACTOR 0
#endif
#ifndef XZ_SKEW_FACTOR
#define XZ_SKEW_FACTOR 0
#endif
#ifndef YZ_SKEW_FACTOR
#define YZ_SKEW_FACTOR 0
#endif

Loading…
Cancel
Save