|
@@ -215,14 +215,12 @@ MarlinSettings settings;
|
215
|
215
|
float new_z_fade_height;
|
216
|
216
|
#endif
|
217
|
217
|
|
218
|
|
-#if ENABLED(CNC_COORDINATE_SYSTEMS)
|
219
|
|
- bool position_changed;
|
220
|
|
-#endif
|
221
|
|
-
|
222
|
218
|
/**
|
223
|
219
|
* Post-process after Retrieve or Reset
|
224
|
220
|
*/
|
225
|
221
|
void MarlinSettings::postprocess() {
|
|
222
|
+ const float oldpos[] = { current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS] };
|
|
223
|
+
|
226
|
224
|
// steps per s2 needs to be updated to agree with units per s2
|
227
|
225
|
planner.reset_acceleration_rates();
|
228
|
226
|
|
|
@@ -232,10 +230,6 @@ void MarlinSettings::postprocess() {
|
232
|
230
|
recalc_delta_settings();
|
233
|
231
|
#endif
|
234
|
232
|
|
235
|
|
- // Refresh steps_to_mm with the reciprocal of axis_steps_per_mm
|
236
|
|
- // and init stepper.count[], planner.position[] with current_position
|
237
|
|
- planner.refresh_positioning();
|
238
|
|
-
|
239
|
233
|
#if ENABLED(PIDTEMP)
|
240
|
234
|
thermalManager.updatePID();
|
241
|
235
|
#endif
|
|
@@ -248,7 +242,7 @@ void MarlinSettings::postprocess() {
|
248
|
242
|
#endif
|
249
|
243
|
|
250
|
244
|
#if ENABLED(ENABLE_LEVELING_FADE_HEIGHT)
|
251
|
|
- set_z_fade_height(new_z_fade_height);
|
|
245
|
+ set_z_fade_height(new_z_fade_height, false); // false = no report
|
252
|
246
|
#endif
|
253
|
247
|
|
254
|
248
|
#if ENABLED(AUTO_BED_LEVELING_BILINEAR)
|
|
@@ -260,12 +254,13 @@ void MarlinSettings::postprocess() {
|
260
|
254
|
stepper.refresh_motor_power();
|
261
|
255
|
#endif
|
262
|
256
|
|
263
|
|
- #if ENABLED(CNC_COORDINATE_SYSTEMS)
|
264
|
|
- if (position_changed) {
|
265
|
|
- report_current_position();
|
266
|
|
- position_changed = false;
|
267
|
|
- }
|
268
|
|
- #endif
|
|
257
|
+ // Refresh steps_to_mm with the reciprocal of axis_steps_per_mm
|
|
258
|
+ // and init stepper.count[], planner.position[] with current_position
|
|
259
|
+ planner.refresh_positioning();
|
|
260
|
+
|
|
261
|
+ // Various factors can change the current position
|
|
262
|
+ if (memcmp(oldpos, current_position, sizeof(oldpos)))
|
|
263
|
+ report_current_position();
|
269
|
264
|
}
|
270
|
265
|
|
271
|
266
|
#if ENABLED(EEPROM_SETTINGS)
|
|
@@ -1121,7 +1116,7 @@ void MarlinSettings::postprocess() {
|
1121
|
1116
|
//
|
1122
|
1117
|
|
1123
|
1118
|
#if ENABLED(CNC_COORDINATE_SYSTEMS)
|
1124
|
|
- position_changed = select_coordinate_system(-1); // Go back to machine space
|
|
1119
|
+ (void)select_coordinate_system(-1); // Go back to machine space
|
1125
|
1120
|
EEPROM_READ(coordinate_system); // 27 floats
|
1126
|
1121
|
#else
|
1127
|
1122
|
for (uint8_t q = 27; q--;) EEPROM_READ(dummy);
|