Sync and report changed position

This commit is contained in:
Scott Lahteine 2017-12-10 20:49:45 -06:00
parent ccca1ade2d
commit 684692091e
2 changed files with 20 additions and 3 deletions

View file

@ -67,17 +67,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() {