Move fade_scaling_factor_for_z to Planner

This commit is contained in:
Scott Lahteine 2017-10-13 16:16:32 -05:00
parent 8e808fcadc
commit 88857e8028
12 changed files with 266 additions and 304 deletions

View file

@ -28,8 +28,7 @@
#include "ubl.h"
#include "hex_print_routines.h"
#include "temperature.h"
extern Planner planner;
#include "planner.h"
/**
* These support functions allow the use of large bit arrays of flags that take very
@ -48,7 +47,7 @@
void unified_bed_leveling::report_state() {
echo_name();
SERIAL_PROTOCOLPGM(" System v" UBL_VERSION " ");
if (!state.active) SERIAL_PROTOCOLPGM("in");
if (!planner.leveling_active) SERIAL_PROTOCOLPGM("in");
SERIAL_PROTOCOLLNPGM("active.");
safe_delay(50);
}
@ -64,8 +63,7 @@
ubl_state unified_bed_leveling::state;
float unified_bed_leveling::z_values[GRID_MAX_POINTS_X][GRID_MAX_POINTS_Y],
unified_bed_leveling::last_specified_z;
float unified_bed_leveling::z_values[GRID_MAX_POINTS_X][GRID_MAX_POINTS_Y];
// 15 is the maximum nubmer of grid points supported + 1 safety margin for now,
// until determinism prevails
@ -86,10 +84,9 @@
set_bed_leveling_enabled(false);
state.storage_slot = -1;
#if ENABLED(ENABLE_LEVELING_FADE_HEIGHT)
planner.z_fade_height = 10.0;
planner.set_z_fade_height(10.0);
#endif
ZERO(z_values);
last_specified_z = -999.9;
}
void unified_bed_leveling::invalidate() {