Browse Source

Add a method to refresh bilinear bed level after a change

pull/1/head
Scott Lahteine 8 years ago
parent
commit
23cdbbb2d3
  1. 11
      Marlin/Marlin_main.cpp
  2. 13
      Marlin/configuration_store.cpp

11
Marlin/Marlin_main.cpp

@ -2714,6 +2714,14 @@ static void clean_up_after_endstop_or_probe_move() {
}
}
#endif // ABL_BILINEAR_SUBDIVISION
// Refresh after other values have been updated
void refresh_bed_level() {
#if ENABLED(ABL_BILINEAR_SUBDIVISION)
bed_level_virt_interpolate();
#endif
}
#endif // AUTO_BED_LEVELING_BILINEAR
/**
@ -4730,8 +4738,9 @@ inline void gcode_G28() {
if (!dryrun) extrapolate_unprobed_bed_level();
print_bilinear_leveling_grid();
refresh_bed_level();
#if ENABLED(ABL_BILINEAR_SUBDIVISION)
bed_level_virt_interpolate();
bed_level_virt_print();
#endif

13
Marlin/configuration_store.cpp

@ -179,8 +179,8 @@ MarlinSettings settings;
#include "ubl.h"
#endif
#if ENABLED(ABL_BILINEAR_SUBDIVISION)
extern void bed_level_virt_interpolate();
#if ENABLED(AUTO_BED_LEVELING_BILINEAR)
extern void refresh_bed_level();
#endif
/**
@ -218,6 +218,11 @@ void MarlinSettings::postprocess() {
#if HAS_BED_PROBE
refresh_zprobe_zoffset();
#endif
#if ENABLED(AUTO_BED_LEVELING_BILINEAR)
refresh_bed_level();
//set_bed_leveling_enabled(leveling_is_on);
#endif
}
#if ENABLED(EEPROM_SETTINGS)
@ -753,10 +758,6 @@ void MarlinSettings::postprocess() {
EEPROM_READ(bilinear_grid_spacing); // 2 ints
EEPROM_READ(bilinear_start); // 2 ints
EEPROM_READ(bed_level_grid); // 9 to 256 floats
#if ENABLED(ABL_BILINEAR_SUBDIVISION)
bed_level_virt_interpolate();
#endif
//set_bed_leveling_enabled(leveling_is_on);
}
else // EEPROM data is stale
#endif // AUTO_BED_LEVELING_BILINEAR

Loading…
Cancel
Save