Correct EEPROM read/write disparities. (#12169)
This commit is contained in:
parent
8d3a92fc4a
commit
d801f85963
2 changed files with 20 additions and 21 deletions
|
@ -37,7 +37,7 @@
|
|||
*/
|
||||
|
||||
// Change EEPROM version if the structure changes
|
||||
#define EEPROM_VERSION "V61"
|
||||
#define EEPROM_VERSION "V62"
|
||||
#define EEPROM_OFFSET 100
|
||||
|
||||
// Check the integrity of data offsets.
|
||||
|
@ -194,10 +194,8 @@ typedef struct SettingsDataStruct {
|
|||
#elif ENABLED(X_DUAL_ENDSTOPS) || ENABLED(Y_DUAL_ENDSTOPS) || Z_MULTI_ENDSTOPS
|
||||
float x2_endstop_adj, // M666 X
|
||||
y2_endstop_adj, // M666 Y
|
||||
z2_endstop_adj; // M666 Z
|
||||
#if ENABLED(Z_TRIPLE_ENDSTOPS)
|
||||
float z3_endstop_adj; // M666 Z
|
||||
#endif
|
||||
z2_endstop_adj, // M666 Z (S2)
|
||||
z3_endstop_adj; // M666 Z (S3)
|
||||
#endif
|
||||
|
||||
//
|
||||
|
@ -939,7 +937,7 @@ void MarlinSettings::postprocess() {
|
|||
// SINGLENOZZLE
|
||||
//
|
||||
|
||||
#if ENABLED(SINGLENOZZLE)
|
||||
#if EXTRUDERS > 1
|
||||
_FIELD_TEST(toolchange_settings);
|
||||
EEPROM_WRITE(toolchange_settings);
|
||||
#endif
|
||||
|
@ -1567,7 +1565,7 @@ void MarlinSettings::postprocess() {
|
|||
//
|
||||
// SINGLENOZZLE toolchange values
|
||||
//
|
||||
#if ENABLED(SINGLENOZZLE)
|
||||
#if EXTRUDERS > 1
|
||||
_FIELD_TEST(toolchange_settings);
|
||||
EEPROM_READ(toolchange_settings);
|
||||
#endif
|
||||
|
@ -1831,9 +1829,6 @@ void MarlinSettings::reset(PORTARG_SOLO) {
|
|||
#endif
|
||||
|
||||
#if EXTRUDERS > 1
|
||||
toolchange_settings.z_raise = TOOLCHANGE_ZRAISE;
|
||||
#endif
|
||||
|
||||
#if ENABLED(SINGLENOZZLE)
|
||||
toolchange_settings.swap_length = SINGLENOZZLE_SWAP_LENGTH;
|
||||
toolchange_settings.prime_speed = SINGLENOZZLE_SWAP_PRIME_SPEED;
|
||||
|
@ -1842,6 +1837,8 @@ void MarlinSettings::reset(PORTARG_SOLO) {
|
|||
toolchange_settings.change_point = SINGLENOZZLE_TOOLCHANGE_XY;
|
||||
#endif
|
||||
#endif
|
||||
toolchange_settings.z_raise = TOOLCHANGE_ZRAISE;
|
||||
#endif
|
||||
|
||||
//
|
||||
// Global Leveling
|
||||
|
|
|
@ -26,12 +26,14 @@
|
|||
#if EXTRUDERS > 1
|
||||
|
||||
typedef struct {
|
||||
#if ENABLED(SINGLENOZZLE)
|
||||
float swap_length;
|
||||
int16_t prime_speed, retract_speed;
|
||||
#if ENABLED(SINGLENOZZLE_SWAP_PARK)
|
||||
struct { float x, y; } change_point;
|
||||
#endif
|
||||
float z_raise = TOOLCHANGE_ZRAISE;
|
||||
#endif
|
||||
float z_raise;
|
||||
} toolchange_settings_t;
|
||||
|
||||
extern toolchange_settings_t toolchange_settings;
|
||||
|
|
Reference in a new issue