Merge pull request #643 from PavelSindler/eeprom_conflict_fix
EEPROM address conflict fix
This commit is contained in:
commit
4811561ec7
|
|
@ -7,7 +7,7 @@
|
||||||
#define STR(x) STR_HELPER(x)
|
#define STR(x) STR_HELPER(x)
|
||||||
|
|
||||||
// Firmware version
|
// Firmware version
|
||||||
#define FW_VERSION "3.2.0-RC1"
|
#define FW_VERSION "3.2.0-RC2"
|
||||||
#define FW_COMMIT_NR 461
|
#define FW_COMMIT_NR 461
|
||||||
// FW_VERSION_UNKNOWN means this is an unofficial build.
|
// FW_VERSION_UNKNOWN means this is an unofficial build.
|
||||||
// The firmware should only be checked into github with this symbol.
|
// The firmware should only be checked into github with this symbol.
|
||||||
|
|
@ -132,10 +132,6 @@
|
||||||
// Power loss errors (total)
|
// Power loss errors (total)
|
||||||
#define EEPROM_POWER_COUNT_TOT (EEPROM_FERROR_COUNT_TOT - 2) // uint16
|
#define EEPROM_POWER_COUNT_TOT (EEPROM_FERROR_COUNT_TOT - 2) // uint16
|
||||||
|
|
||||||
#define EEPROM_PRINTER_TYPE (EEPROM_POWER_COUNT_TOT - 2) // uint16
|
|
||||||
#define EEPROM_BOARD_TYPE (EEPROM_PRINTER_TYPE - 2) // uint16
|
|
||||||
|
|
||||||
|
|
||||||
////////////////////////////////////////
|
////////////////////////////////////////
|
||||||
// TMC2130 Accurate sensorless homing
|
// TMC2130 Accurate sensorless homing
|
||||||
|
|
||||||
|
|
@ -174,6 +170,8 @@
|
||||||
#define EEPROM_TMC2130_Z_MRES (EEPROM_TMC2130_Y_MRES - 1) // uint8
|
#define EEPROM_TMC2130_Z_MRES (EEPROM_TMC2130_Y_MRES - 1) // uint8
|
||||||
#define EEPROM_TMC2130_E_MRES (EEPROM_TMC2130_Z_MRES - 1) // uint8
|
#define EEPROM_TMC2130_E_MRES (EEPROM_TMC2130_Z_MRES - 1) // uint8
|
||||||
|
|
||||||
|
#define EEPROM_PRINTER_TYPE (EEPROM_TMC2130_E_MRES - 2) // uint16
|
||||||
|
#define EEPROM_BOARD_TYPE (EEPROM_PRINTER_TYPE - 2) // uint16
|
||||||
|
|
||||||
//TMC2130 configuration
|
//TMC2130 configuration
|
||||||
#define EEPROM_TMC_AXIS_SIZE //axis configuration block size
|
#define EEPROM_TMC_AXIS_SIZE //axis configuration block size
|
||||||
|
|
|
||||||
|
|
@ -1336,7 +1336,8 @@ void setup()
|
||||||
}
|
}
|
||||||
if (eeprom_read_byte((uint8_t*)EEPROM_WIZARD_ACTIVE) == 0) { //dont show calibration status messages if wizard is currently active
|
if (eeprom_read_byte((uint8_t*)EEPROM_WIZARD_ACTIVE) == 0) { //dont show calibration status messages if wizard is currently active
|
||||||
if (calibration_status() == CALIBRATION_STATUS_ASSEMBLED ||
|
if (calibration_status() == CALIBRATION_STATUS_ASSEMBLED ||
|
||||||
calibration_status() == CALIBRATION_STATUS_UNKNOWN) {
|
calibration_status() == CALIBRATION_STATUS_UNKNOWN ||
|
||||||
|
calibration_status() == CALIBRATION_STATUS_XYZ_CALIBRATION) {
|
||||||
// Reset the babystepping values, so the printer will not move the Z axis up when the babystepping is enabled.
|
// Reset the babystepping values, so the printer will not move the Z axis up when the babystepping is enabled.
|
||||||
eeprom_update_word((uint16_t*)EEPROM_BABYSTEP_Z, 0);
|
eeprom_update_word((uint16_t*)EEPROM_BABYSTEP_Z, 0);
|
||||||
// Show the message.
|
// Show the message.
|
||||||
|
|
@ -1357,13 +1358,13 @@ void setup()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef DEBUG_DISABLE_FORCE_SELFTEST
|
#if !defined (DEBUG_DISABLE_FORCE_SELFTEST) && defined (TMC2130)
|
||||||
if (force_selftest_if_fw_version() && calibration_status() < CALIBRATION_STATUS_ASSEMBLED ) {
|
if (force_selftest_if_fw_version() && calibration_status() < CALIBRATION_STATUS_ASSEMBLED) {
|
||||||
lcd_show_fullscreen_message_and_wait_P(MSG_FORCE_SELFTEST);
|
lcd_show_fullscreen_message_and_wait_P(MSG_FORCE_SELFTEST);
|
||||||
update_current_firmware_version_to_eeprom();
|
update_current_firmware_version_to_eeprom();
|
||||||
lcd_selftest();
|
lcd_selftest();
|
||||||
}
|
}
|
||||||
#endif //DEBUG_DISABLE_FORCE_SELFTEST
|
#endif //TMC2130 && !DEBUG_DISABLE_FORCE_SELFTEST
|
||||||
|
|
||||||
KEEPALIVE_STATE(IN_PROCESS);
|
KEEPALIVE_STATE(IN_PROCESS);
|
||||||
#endif //DEBUG_DISABLE_STARTMSGS
|
#endif //DEBUG_DISABLE_STARTMSGS
|
||||||
|
|
|
||||||
|
|
@ -260,6 +260,10 @@ bool force_selftest_if_fw_version()
|
||||||
else if (ver_with_calibration[i] < ver_eeprom[i])
|
else if (ver_with_calibration[i] < ver_eeprom[i])
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//force selftest also in case that version used before flashing new firmware was 3.2.0-RC1
|
||||||
|
if ((ver_eeprom[0] == 3) && (ver_eeprom[1] == 2) && (ver_eeprom[2] == 0) && (ver_eeprom[3] == 3)) force_selftest = true;
|
||||||
|
|
||||||
return force_selftest;
|
return force_selftest;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue