|
@@ -26,11 +26,16 @@
|
26
|
26
|
|
27
|
27
|
class Backlash {
|
28
|
28
|
public:
|
29
|
|
- #if ENABLED(BACKLASH_GCODE)
|
30
|
|
- static uint8_t correction;
|
31
|
|
- #ifdef BACKLASH_DISTANCE_MM
|
|
29
|
+ #ifdef BACKLASH_DISTANCE_MM
|
|
30
|
+ #if ENABLED(BACKLASH_GCODE)
|
32
|
31
|
static float distance_mm[XYZ];
|
|
32
|
+ #else
|
|
33
|
+ static const float distance_mm[XYZ];
|
|
34
|
+ //static constexpr float distance_mm[XYZ] = BACKLASH_DISTANCE_MM; // compiler barks at this
|
33
|
35
|
#endif
|
|
36
|
+ #endif
|
|
37
|
+ #if ENABLED(BACKLASH_GCODE)
|
|
38
|
+ static uint8_t correction;
|
34
|
39
|
#ifdef BACKLASH_SMOOTHING_MM
|
35
|
40
|
static float smoothing_mm;
|
36
|
41
|
#endif
|
|
@@ -38,9 +43,6 @@ public:
|
38
|
43
|
static inline float get_correction() { return float(ui8_to_percent(correction)) / 100.0f; }
|
39
|
44
|
#else
|
40
|
45
|
static constexpr uint8_t correction = (BACKLASH_CORRECTION) * 0xFF;
|
41
|
|
- #ifdef BACKLASH_DISTANCE_MM
|
42
|
|
- static constexpr float distance_mm[XYZ] = BACKLASH_DISTANCE_MM;
|
43
|
|
- #endif
|
44
|
46
|
#ifdef BACKLASH_SMOOTHING_MM
|
45
|
47
|
static constexpr float smoothing_mm = BACKLASH_SMOOTHING_MM;
|
46
|
48
|
#endif
|