@ -36,13 +36,13 @@
*
*
*/
*/
# define EEPROM_VERSION "V3 2 "
# define EEPROM_VERSION "V3 3 "
// Change EEPROM version if these are changed:
// Change EEPROM version if these are changed:
# define EEPROM_OFFSET 100
# define EEPROM_OFFSET 100
/**
/**
* V3 2 EEPROM Layout :
* V3 3 EEPROM Layout :
*
*
* 100 Version ( char x4 )
* 100 Version ( char x4 )
* 104 EEPROM Checksum ( uint16_t )
* 104 EEPROM Checksum ( uint16_t )
@ -64,25 +64,28 @@
* 195 M206 XYZ home_offset ( float x3 )
* 195 M206 XYZ home_offset ( float x3 )
* 207 M218 XYZ hotend_offset ( float x3 per additional hotend )
* 207 M218 XYZ hotend_offset ( float x3 per additional hotend )
*
*
* Global Leveling :
* 219 z_fade_height ( float )
*
* Mesh bed leveling : 43 bytes
* Mesh bed leveling : 43 bytes
* 219 M420 S from mbl . status ( bool )
* 2 23 M420 S from mbl . status ( bool )
* 220 mbl . z_offset ( float )
* 22 4 mbl . z_offset ( float )
* 22 4 GRID_MAX_POINTS_X ( uint8_t )
* 22 8 GRID_MAX_POINTS_X ( uint8_t )
* 22 5 GRID_MAX_POINTS_Y ( uint8_t )
* 22 9 GRID_MAX_POINTS_Y ( uint8_t )
* 2 26 G29 S3 XYZ z_values [ ] [ ] ( float x9 , up to float x 81 ) + 288
* 2 30 G29 S3 XYZ z_values [ ] [ ] ( float x9 , up to float x 81 ) + 288
*
*
* AUTO BED LEVELING 4 bytes
* AUTO BED LEVELING 4 bytes
* 26 2 M851 zprobe_zoffset ( float )
* 26 6 M851 zprobe_zoffset ( float )
*
*
* ABL_PLANAR ( or placeholder ) : 36 bytes
* ABL_PLANAR ( or placeholder ) : 36 bytes
* 2 66 planner . bed_level_matrix ( matrix_3x3 = float x9 )
* 2 70 planner . bed_level_matrix ( matrix_3x3 = float x9 )
*
*
* AUTO_BED_LEVELING_BILINEAR ( or placeholder ) : 47 bytes
* AUTO_BED_LEVELING_BILINEAR ( or placeholder ) : 47 bytes
* 30 2 GRID_MAX_POINTS_X ( uint8_t )
* 30 6 GRID_MAX_POINTS_X ( uint8_t )
* 30 3 GRID_MAX_POINTS_Y ( uint8_t )
* 30 7 GRID_MAX_POINTS_Y ( uint8_t )
* 30 4 bilinear_grid_spacing ( int x2 )
* 30 8 bilinear_grid_spacing ( int x2 )
* 3 08 G29 L F bilinear_start ( int x2 )
* 3 12 G29 L F bilinear_start ( int x2 )
* 31 2 bed_level_grid [ ] [ ] ( float x9 , up to float x256 ) + 988
* 31 6 bed_level_grid [ ] [ ] ( float x9 , up to float x256 ) + 988
*
*
* DELTA ( if deltabot ) : 48 bytes
* DELTA ( if deltabot ) : 48 bytes
* 348 M666 XYZ endstop_adj ( float x3 )
* 348 M666 XYZ endstop_adj ( float x3 )
@ -144,10 +147,10 @@
* 568 M906 E1 stepperE1 current ( uint16_t )
* 568 M906 E1 stepperE1 current ( uint16_t )
* 570 M906 E2 stepperE2 current ( uint16_t )
* 570 M906 E2 stepperE2 current ( uint16_t )
* 572 M906 E3 stepperE3 current ( uint16_t )
* 572 M906 E3 stepperE3 current ( uint16_t )
* 57 2 M906 E4 stepperE4 current ( uint16_t )
* 57 6 M906 E4 stepperE4 current ( uint16_t )
*
*
* 5 76 Minimum end - point
* 5 80 Minimum end - point
* 1 897 ( 576 + 36 + 9 + 288 + 988 ) Maximum end - point
* 1 901 ( 580 + 36 + 9 + 288 + 988 ) Maximum end - point
*/
*/
# include "Marlin.h"
# include "Marlin.h"
# include "language.h"
# include "language.h"
@ -200,6 +203,16 @@ void Config_Postprocess() {
// Software endstops depend on home_offset
// Software endstops depend on home_offset
LOOP_XYZ ( i ) update_software_endstops ( ( AxisEnum ) i ) ;
LOOP_XYZ ( i ) update_software_endstops ( ( AxisEnum ) i ) ;
# endif
# endif
# if ENABLED(ENABLE_LEVELING_FADE_HEIGHT)
set_z_fade_height (
//#if ENABLED(AUTO_BED_LEVELING_UBL)
// ubl.state.g29_correction_fade_height
//#else
planner . z_fade_height
//#endif
) ;
# endif
}
}
# if ENABLED(EEPROM_SETTINGS)
# if ENABLED(EEPROM_SETTINGS)
@ -289,6 +302,17 @@ void Config_Postprocess() {
LOOP_XYZ ( i ) EEPROM_WRITE ( hotend_offset [ i ] [ e ] ) ;
LOOP_XYZ ( i ) EEPROM_WRITE ( hotend_offset [ i ] [ e ] ) ;
# endif
# endif
//
// General Leveling
//
# if ENABLED(ENABLE_LEVELING_FADE_HEIGHT)
EEPROM_WRITE ( planner . z_fade_height ) ;
# else
dummy = 10.0 ;
EEPROM_WRITE ( dummy ) ;
# endif
//
//
// Mesh Bed Leveling
// Mesh Bed Leveling
//
//
@ -618,6 +642,16 @@ void Config_Postprocess() {
LOOP_XYZ ( i ) EEPROM_READ ( hotend_offset [ i ] [ e ] ) ;
LOOP_XYZ ( i ) EEPROM_READ ( hotend_offset [ i ] [ e ] ) ;
# endif
# endif
//
// General Leveling
//
# if ENABLED(ENABLE_LEVELING_FADE_HEIGHT)
EEPROM_READ ( planner . z_fade_height ) ;
# else
EEPROM_READ ( dummy ) ;
# endif
//
//
// Mesh (Manual) Bed Leveling
// Mesh (Manual) Bed Leveling
//
//
@ -927,6 +961,11 @@ void Config_ResetDefault() {
planner . max_jerk [ Y_AXIS ] = DEFAULT_YJERK ;
planner . max_jerk [ Y_AXIS ] = DEFAULT_YJERK ;
planner . max_jerk [ Z_AXIS ] = DEFAULT_ZJERK ;
planner . max_jerk [ Z_AXIS ] = DEFAULT_ZJERK ;
planner . max_jerk [ E_AXIS ] = DEFAULT_EJERK ;
planner . max_jerk [ E_AXIS ] = DEFAULT_EJERK ;
# if ENABLED(ENABLE_LEVELING_FADE_HEIGHT)
planner . z_fade_height = 0.0 ;
# endif
# if DISABLED(NO_WORKSPACE_OFFSETS)
# if DISABLED(NO_WORKSPACE_OFFSETS)
ZERO ( home_offset ) ;
ZERO ( home_offset ) ;
# endif
# endif
@ -968,11 +1007,13 @@ void Config_ResetDefault() {
COPY ( delta_diagonal_rod_trim , drt ) ;
COPY ( delta_diagonal_rod_trim , drt ) ;
COPY ( delta_tower_angle_trim , dta ) ;
COPY ( delta_tower_angle_trim , dta ) ;
# elif ENABLED(Z_DUAL_ENDSTOPS)
# elif ENABLED(Z_DUAL_ENDSTOPS)
# if defined(Z_DUAL_ENDSTOPS_ADJUSTMENT)
float z_endstop_adj =
float z_endstop_adj = Z_DUAL_ENDSTOPS_ADJUSTMENT ;
# ifdef Z_DUAL_ENDSTOPS_ADJUSTMENT
# else
Z_DUAL_ENDSTOPS_ADJUSTMENT
float z_endstop_adj = 0 ;
# else
# endif
0
# endif
;
# endif
# endif
# if ENABLED(ULTIPANEL)
# if ENABLED(ULTIPANEL)
@ -1027,11 +1068,11 @@ void Config_ResetDefault() {
# endif
# endif
volumetric_enabled =
volumetric_enabled =
# if ENABLED(VOLUMETRIC_DEFAULT_ON)
# if ENABLED(VOLUMETRIC_DEFAULT_ON)
true
true
# else
# else
false
false
# endif
# endif
;
;
for ( uint8_t q = 0 ; q < COUNT ( filament_size ) ; q + + )
for ( uint8_t q = 0 ; q < COUNT ( filament_size ) ; q + + )
filament_size [ q ] = DEFAULT_NOMINAL_FILAMENT_DIA ;
filament_size [ q ] = DEFAULT_NOMINAL_FILAMENT_DIA ;
@ -1211,7 +1252,11 @@ void Config_ResetDefault() {
SERIAL_ECHOLNPGM ( " Mesh Bed Leveling: " ) ;
SERIAL_ECHOLNPGM ( " Mesh Bed Leveling: " ) ;
CONFIG_ECHO_START ;
CONFIG_ECHO_START ;
}
}
SERIAL_ECHOLNPAIR ( " M420 S " , mbl . has_mesh ( ) ? 1 : 0 ) ;
SERIAL_ECHOPAIR ( " M420 S " , mbl . has_mesh ( ) ? 1 : 0 ) ;
# if ENABLED(ENABLE_LEVELING_FADE_HEIGHT)
SERIAL_ECHOLNPAIR ( " Z " , planner . z_fade_height ) ;
# endif
SERIAL_EOL ;
for ( uint8_t py = 1 ; py < = GRID_MAX_POINTS_Y ; py + + ) {
for ( uint8_t py = 1 ; py < = GRID_MAX_POINTS_Y ; py + + ) {
for ( uint8_t px = 1 ; px < = GRID_MAX_POINTS_X ; px + + ) {
for ( uint8_t px = 1 ; px < = GRID_MAX_POINTS_X ; px + + ) {
CONFIG_ECHO_START ;
CONFIG_ECHO_START ;
@ -1229,8 +1274,11 @@ void Config_ResetDefault() {
SERIAL_ECHOLNPGM ( " Unified Bed Leveling: " ) ;
SERIAL_ECHOLNPGM ( " Unified Bed Leveling: " ) ;
CONFIG_ECHO_START ;
CONFIG_ECHO_START ;
}
}
SERIAL_ECHOPAIR ( " M420 S " , ubl . state . active ? 1 : 0 ) ;
SERIAL_ECHOLNPAIR ( " M420 S " , ubl . state . active ? 1 : 0 ) ;
//#if ENABLED(ENABLE_LEVELING_FADE_HEIGHT)
// SERIAL_ECHOLNPAIR(" Z", ubl.state.g29_correction_fade_height);
//#endif
SERIAL_EOL ;
if ( ! forReplay ) {
if ( ! forReplay ) {
SERIAL_ECHOPGM ( " \n UBL is " ) ;
SERIAL_ECHOPGM ( " \n UBL is " ) ;
@ -1264,7 +1312,11 @@ void Config_ResetDefault() {
SERIAL_ECHOLNPGM ( " Auto Bed Leveling: " ) ;
SERIAL_ECHOLNPGM ( " Auto Bed Leveling: " ) ;
CONFIG_ECHO_START ;
CONFIG_ECHO_START ;
}
}
SERIAL_ECHOLNPAIR ( " M420 S " , planner . abl_enabled ? 1 : 0 ) ;
SERIAL_ECHOPAIR ( " M420 S " , planner . abl_enabled ? 1 : 0 ) ;
# if ENABLED(ENABLE_LEVELING_FADE_HEIGHT)
SERIAL_ECHOLNPAIR ( " Z " , planner . z_fade_height ) ;
# endif
SERIAL_EOL ;
# endif
# endif