|
@@ -1177,17 +1177,20 @@ void MarlinSettings::postprocess() {
|
1177
|
1177
|
// Backlash Compensation
|
1178
|
1178
|
//
|
1179
|
1179
|
{
|
|
1180
|
+ #ifdef BACKLASH_DISTANCE_MM
|
|
1181
|
+ const float (&backlash_distance_mm)[XYZ] = backlash.distance_mm;
|
|
1182
|
+ #else
|
|
1183
|
+ const float backlash_distance_mm[XYZ] = { 0 };
|
|
1184
|
+ #endif
|
1180
|
1185
|
#if ENABLED(BACKLASH_COMPENSATION)
|
1181
|
|
- const float (&backlash_distance_mm)[XYZ] = backlash.distance_mm;
|
1182
|
|
- const uint8_t &backlash_correction = backlash.correction;
|
|
1186
|
+ const uint8_t &backlash_correction = backlash.correction;
|
1183
|
1187
|
#else
|
1184
|
|
- const float backlash_distance_mm[XYZ] = { 0 };
|
1185
|
|
- const uint8_t backlash_correction = 0;
|
|
1188
|
+ const uint8_t backlash_correction = 0;
|
1186
|
1189
|
#endif
|
1187
|
1190
|
#ifdef BACKLASH_SMOOTHING_MM
|
1188
|
|
- const float &backlash_smoothing_mm = backlash.smoothing_mm;
|
|
1191
|
+ const float &backlash_smoothing_mm = backlash.smoothing_mm;
|
1189
|
1192
|
#else
|
1190
|
|
- const float backlash_smoothing_mm = 3;
|
|
1193
|
+ const float backlash_smoothing_mm = 3;
|
1191
|
1194
|
#endif
|
1192
|
1195
|
_FIELD_TEST(backlash_distance_mm);
|
1193
|
1196
|
EEPROM_WRITE(backlash_distance_mm[X_AXIS]);
|
|
@@ -1962,17 +1965,20 @@ void MarlinSettings::postprocess() {
|
1962
|
1965
|
// Backlash Compensation
|
1963
|
1966
|
//
|
1964
|
1967
|
{
|
|
1968
|
+ #ifdef BACKLASH_DISTANCE_MM
|
|
1969
|
+ float (&backlash_distance_mm)[XYZ] = backlash.distance_mm;
|
|
1970
|
+ #else
|
|
1971
|
+ float backlash_distance_mm[XYZ];
|
|
1972
|
+ #endif
|
1965
|
1973
|
#if ENABLED(BACKLASH_COMPENSATION)
|
1966
|
|
- float (&backlash_distance_mm)[XYZ] = backlash.distance_mm;
|
1967
|
|
- uint8_t &backlash_correction = backlash.correction;
|
|
1974
|
+ uint8_t &backlash_correction = backlash.correction;
|
1968
|
1975
|
#else
|
1969
|
|
- float backlash_distance_mm[XYZ];
|
1970
|
1976
|
uint8_t backlash_correction;
|
1971
|
1977
|
#endif
|
1972
|
1978
|
#ifdef BACKLASH_SMOOTHING_MM
|
1973
|
1979
|
float &backlash_smoothing_mm = backlash.smoothing_mm;
|
1974
|
1980
|
#else
|
1975
|
|
- float backlash_smoothing_mm;
|
|
1981
|
+ float backlash_smoothing_mm;
|
1976
|
1982
|
#endif
|
1977
|
1983
|
_FIELD_TEST(backlash_distance_mm);
|
1978
|
1984
|
EEPROM_READ(backlash_distance_mm[X_AXIS]);
|