G34 automatic point assignment (#16473)

This commit is contained in:
InsanityAutomation
2020-02-01 05:50:44 -05:00
committed by GitHub
parent 90b6324563
commit e58d1bf974
6 changed files with 298 additions and 105 deletions

View File

@ -37,7 +37,7 @@
*/
// Change EEPROM version if the structure changes
#define EEPROM_VERSION "V75"
#define EEPROM_VERSION "V76"
#define EEPROM_OFFSET 100
// Check the integrity of data offsets.
@ -66,6 +66,10 @@
#include "../feature/bedlevel/bedlevel.h"
#endif
#if ENABLED(Z_STEPPER_AUTO_ALIGN)
#include "../feature/z_stepper_align.h"
#endif
#if ENABLED(EXTENSIBLE_UI)
#include "../lcd/extensible_ui/ui_api.h"
#endif
@ -251,6 +255,16 @@ typedef struct SettingsDataStruct {
z4_endstop_adj; // M666 (S4) Z
#endif
//
// Z_STEPPER_AUTO_ALIGN, Z_STEPPER_ALIGN_KNOWN_STEPPER_POSITIONS
//
#if ENABLED(Z_STEPPER_AUTO_ALIGN)
xy_pos_t z_stepper_align_xy[NUM_Z_STEPPER_DRIVERS]; // M422 S X Y
#if ENABLED(Z_STEPPER_ALIGN_KNOWN_STEPPER_POSITIONS)
xy_pos_t z_stepper_align_stepper_xy[NUM_Z_STEPPER_DRIVERS]; // M422 W X Y
#endif
#endif
//
// ULTIPANEL
//
@ -801,6 +815,13 @@ void MarlinSettings::postprocess() {
#endif
}
#if ENABLED(Z_STEPPER_AUTO_ALIGN)
EEPROM_WRITE(z_stepper_align.xy);
#if ENABLED(Z_STEPPER_ALIGN_KNOWN_STEPPER_POSITIONS)
EEPROM_WRITE(z_stepper_align.stepper_xy);
#endif
#endif
//
// LCD Preheat settings
//
@ -1669,6 +1690,13 @@ void MarlinSettings::postprocess() {
#endif
}
#if ENABLED(Z_STEPPER_AUTO_ALIGN)
EEPROM_READ(z_stepper_align.xy);
#if ENABLED(Z_STEPPER_ALIGN_KNOWN_STEPPER_POSITIONS)
EEPROM_READ(z_stepper_align.stepper_xy);
#endif
#endif
//
// LCD Preheat settings
//
@ -2473,6 +2501,14 @@ void MarlinSettings::reset() {
#endif
#endif
//
// Z Stepper Auto-alignment points
//
#if ENABLED(Z_STEPPER_AUTO_ALIGN)
z_stepper_align.reset_to_default();
#endif
//
// Servo Angles
//