wizard: Resume the wizard for missing calibrations during upgrades
Instead of checking for explicit versions, resume the wizard if some (new) wizard is missing. This handles both the old SELFTEST check, the new thermal model and any future check in the same fashion.
This commit is contained in:
parent
05f37edad5
commit
fbfacd76a4
@ -1553,11 +1553,16 @@ void setup()
|
||||
// printer upgraded from FW<3.2.0.4 and requires re-running selftest
|
||||
lcd_show_fullscreen_message_and_wait_P(_i("Selftest will be run to calibrate accurate sensorless rehoming."));////MSG_FORCE_SELFTEST c=20 r=8
|
||||
calibration_status &= ~CALIBRATION_STATUS_SELFTEST;
|
||||
run_wizard = true;
|
||||
}
|
||||
}
|
||||
eeprom_update_byte((uint8_t*)EEPROM_CALIBRATION_STATUS_V2, calibration_status);
|
||||
}
|
||||
if (eeprom_fw_version_older_than_p(FW_VERSION_NR)) {
|
||||
if (!calibration_status_get(CALIBRATION_WIZARD_STEPS)) {
|
||||
// we just did a FW upgrade and some (new) wizard step is missing: resume the wizard
|
||||
run_wizard = true;
|
||||
}
|
||||
}
|
||||
update_current_firmware_version_to_eeprom();
|
||||
|
||||
if (eeprom_read_byte((uint8_t*)EEPROM_WIZARD_ACTIVE)) {
|
||||
|
@ -10,7 +10,7 @@
|
||||
|
||||
// Allocate the version string in the program memory. Otherwise the string lands either on the stack or in the global RAM.
|
||||
static const char FW_VERSION_STR[] PROGMEM = FW_VERSION;
|
||||
static const uint16_t FW_VERSION_NR[4] PROGMEM = {
|
||||
const uint16_t FW_VERSION_NR[4] PROGMEM = {
|
||||
FW_MAJOR,
|
||||
FW_MINOR,
|
||||
FW_REVISION,
|
||||
|
@ -1,6 +1,7 @@
|
||||
#pragma once
|
||||
#include <stdint.h>
|
||||
|
||||
extern const uint16_t FW_VERSION_NR[4];
|
||||
extern const char* FW_VERSION_STR_P();
|
||||
|
||||
// Definition of a firmware flavor numerical values.
|
||||
|
Loading…
Reference in New Issue
Block a user