Consolidate "bedlevel" code
This commit is contained in:
@@ -93,7 +93,7 @@
|
||||
* 329 G29 S ubl.state.storage_slot (int8_t)
|
||||
*
|
||||
* DELTA: 48 bytes
|
||||
* 348 M666 XYZ endstop_adj (float x3)
|
||||
* 348 M666 XYZ delta_endstop_adj (float x3)
|
||||
* 360 M665 R delta_radius (float)
|
||||
* 364 M665 L delta_diagonal_rod (float)
|
||||
* 368 M665 S delta_segments_per_second (float)
|
||||
@@ -187,6 +187,10 @@ MarlinSettings settings;
|
||||
|
||||
#include "../gcode/parser.h"
|
||||
|
||||
#if HAS_LEVELING
|
||||
#include "../feature/bedlevel/bedlevel.h"
|
||||
#endif
|
||||
|
||||
#if HAS_BED_PROBE
|
||||
#include "../module/probe.h"
|
||||
#endif
|
||||
@@ -199,14 +203,6 @@ MarlinSettings settings;
|
||||
#include "../feature/fwretract.h"
|
||||
#endif
|
||||
|
||||
#if ENABLED(AUTO_BED_LEVELING_BILINEAR)
|
||||
extern void refresh_bed_level();
|
||||
#endif
|
||||
|
||||
#if ENABLED(FWRETRACT)
|
||||
#include "../gcode/feature/fwretract/fwretract.h"
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Post-process after Retrieve or Reset
|
||||
*/
|
||||
@@ -421,7 +417,7 @@ void MarlinSettings::postprocess() {
|
||||
|
||||
// 9 floats for DELTA / Z_DUAL_ENDSTOPS
|
||||
#if ENABLED(DELTA)
|
||||
EEPROM_WRITE(endstop_adj); // 3 floats
|
||||
EEPROM_WRITE(delta_endstop_adj); // 3 floats
|
||||
EEPROM_WRITE(delta_radius); // 1 float
|
||||
EEPROM_WRITE(delta_diagonal_rod); // 1 float
|
||||
EEPROM_WRITE(delta_segments_per_second); // 1 float
|
||||
@@ -806,7 +802,7 @@ void MarlinSettings::postprocess() {
|
||||
#endif // AUTO_BED_LEVELING_UBL
|
||||
|
||||
#if ENABLED(DELTA)
|
||||
EEPROM_READ(endstop_adj); // 3 floats
|
||||
EEPROM_READ(delta_endstop_adj); // 3 floats
|
||||
EEPROM_READ(delta_radius); // 1 float
|
||||
EEPROM_READ(delta_diagonal_rod); // 1 float
|
||||
EEPROM_READ(delta_segments_per_second); // 1 float
|
||||
@@ -1196,7 +1192,7 @@ void MarlinSettings::reset() {
|
||||
#if ENABLED(DELTA)
|
||||
const float adj[ABC] = DELTA_ENDSTOP_ADJ,
|
||||
dta[ABC] = DELTA_TOWER_ANGLE_TRIM;
|
||||
COPY(endstop_adj, adj);
|
||||
COPY(delta_endstop_adj, adj);
|
||||
delta_radius = DELTA_RADIUS;
|
||||
delta_diagonal_rod = DELTA_DIAGONAL_ROD;
|
||||
delta_segments_per_second = DELTA_SEGMENTS_PER_SECOND;
|
||||
@@ -1602,9 +1598,9 @@ void MarlinSettings::reset() {
|
||||
SERIAL_ECHOLNPGM("Endstop adjustment:");
|
||||
}
|
||||
CONFIG_ECHO_START;
|
||||
SERIAL_ECHOPAIR(" M666 X", LINEAR_UNIT(endstop_adj[X_AXIS]));
|
||||
SERIAL_ECHOPAIR(" Y", LINEAR_UNIT(endstop_adj[Y_AXIS]));
|
||||
SERIAL_ECHOLNPAIR(" Z", LINEAR_UNIT(endstop_adj[Z_AXIS]));
|
||||
SERIAL_ECHOPAIR(" M666 X", LINEAR_UNIT(delta_endstop_adj[X_AXIS]));
|
||||
SERIAL_ECHOPAIR(" Y", LINEAR_UNIT(delta_endstop_adj[Y_AXIS]));
|
||||
SERIAL_ECHOLNPAIR(" Z", LINEAR_UNIT(delta_endstop_adj[Z_AXIS]));
|
||||
if (!forReplay) {
|
||||
CONFIG_ECHO_START;
|
||||
SERIAL_ECHOLNPGM("Delta settings: L<diagonal_rod> R<radius> H<height> S<segments_per_s> B<calibration radius> XYZ<tower angle corrections>");
|
||||
|
Reference in New Issue
Block a user