Sync and report changed position

This commit is contained in:
Scott Lahteine
2017-12-10 21:17:07 -06:00
parent 11f9c253e0
commit 03ba79f144
6 changed files with 24 additions and 4 deletions

View File

@@ -71,17 +71,19 @@
volatile int unified_bed_leveling::encoder_diff;
unified_bed_leveling::unified_bed_leveling() {
ubl_cnt++; // Debug counter to insure we only have one UBL object present in memory. We can eliminate this (and all references to ubl_cnt) very soon.
ubl_cnt++; // Debug counter to ensure we only have one UBL object present in memory. We can eliminate this (and all references to ubl_cnt) very soon.
reset();
}
void unified_bed_leveling::reset() {
const bool was_enabled = planner.leveling_active;
set_bed_leveling_enabled(false);
storage_slot = -1;
#if ENABLED(ENABLE_LEVELING_FADE_HEIGHT)
planner.set_z_fade_height(10.0);
#endif
ZERO(z_values);
if (was_enabled) report_current_position();
}
void unified_bed_leveling::invalidate() {