|
@@ -1189,17 +1189,14 @@ void MarlinSettings::postprocess() {
|
1189
|
1189
|
// Backlash Compensation
|
1190
|
1190
|
//
|
1191
|
1191
|
{
|
1192
|
|
- #ifdef BACKLASH_DISTANCE_MM
|
|
1192
|
+ #if ENABLED(BACKLASH_GCODE)
|
1193
|
1193
|
const float (&backlash_distance_mm)[XYZ] = backlash.distance_mm;
|
1194
|
|
- #else
|
1195
|
|
- const float backlash_distance_mm[XYZ] = { 0 };
|
1196
|
|
- #endif
|
1197
|
|
- #if ENABLED(BACKLASH_COMPENSATION)
|
1198
|
1194
|
const uint8_t &backlash_correction = backlash.correction;
|
1199
|
1195
|
#else
|
|
1196
|
+ const float backlash_distance_mm[XYZ] = { 0 };
|
1200
|
1197
|
const uint8_t backlash_correction = 0;
|
1201
|
1198
|
#endif
|
1202
|
|
- #ifdef BACKLASH_SMOOTHING_MM
|
|
1199
|
+ #if ENABLED(BACKLASH_GCODE) && defined(BACKLASH_SMOOTHING_MM)
|
1203
|
1200
|
const float &backlash_smoothing_mm = backlash.smoothing_mm;
|
1204
|
1201
|
#else
|
1205
|
1202
|
const float backlash_smoothing_mm = 3;
|
|
@@ -1992,17 +1989,14 @@ void MarlinSettings::postprocess() {
|
1992
|
1989
|
// Backlash Compensation
|
1993
|
1990
|
//
|
1994
|
1991
|
{
|
1995
|
|
- #ifdef BACKLASH_DISTANCE_MM
|
|
1992
|
+ #if ENABLED(BACKLASH_GCODE)
|
1996
|
1993
|
float (&backlash_distance_mm)[XYZ] = backlash.distance_mm;
|
1997
|
|
- #else
|
1998
|
|
- float backlash_distance_mm[XYZ];
|
1999
|
|
- #endif
|
2000
|
|
- #if ENABLED(BACKLASH_COMPENSATION)
|
2001
|
1994
|
uint8_t &backlash_correction = backlash.correction;
|
2002
|
1995
|
#else
|
|
1996
|
+ float backlash_distance_mm[XYZ];
|
2003
|
1997
|
uint8_t backlash_correction;
|
2004
|
1998
|
#endif
|
2005
|
|
- #ifdef BACKLASH_SMOOTHING_MM
|
|
1999
|
+ #if ENABLED(BACKLASH_GCODE) && defined(BACKLASH_SMOOTHING_MM)
|
2006
|
2000
|
float &backlash_smoothing_mm = backlash.smoothing_mm;
|
2007
|
2001
|
#else
|
2008
|
2002
|
float backlash_smoothing_mm;
|
|
@@ -2293,12 +2287,10 @@ void MarlinSettings::reset() {
|
2293
|
2287
|
|
2294
|
2288
|
#if ENABLED(BACKLASH_GCODE)
|
2295
|
2289
|
backlash.correction = (BACKLASH_CORRECTION) * 255;
|
2296
|
|
- #ifdef BACKLASH_DISTANCE_MM
|
2297
|
|
- constexpr float tmp[XYZ] = BACKLASH_DISTANCE_MM;
|
2298
|
|
- backlash.distance_mm[X_AXIS] = tmp[X_AXIS];
|
2299
|
|
- backlash.distance_mm[Y_AXIS] = tmp[Y_AXIS];
|
2300
|
|
- backlash.distance_mm[Z_AXIS] = tmp[Z_AXIS];
|
2301
|
|
- #endif
|
|
2290
|
+ constexpr float tmp[XYZ] = BACKLASH_DISTANCE_MM;
|
|
2291
|
+ backlash.distance_mm[X_AXIS] = tmp[X_AXIS];
|
|
2292
|
+ backlash.distance_mm[Y_AXIS] = tmp[Y_AXIS];
|
|
2293
|
+ backlash.distance_mm[Z_AXIS] = tmp[Z_AXIS];
|
2302
|
2294
|
#ifdef BACKLASH_SMOOTHING_MM
|
2303
|
2295
|
backlash.smoothing_mm = BACKLASH_SMOOTHING_MM;
|
2304
|
2296
|
#endif
|