|
@@ -1523,7 +1523,7 @@ void setup()
|
|
|
calibration_status() == CALIBRATION_STATUS_UNKNOWN ||
|
|
|
calibration_status() == CALIBRATION_STATUS_XYZ_CALIBRATION) {
|
|
|
|
|
|
- eeprom_update_word((uint16_t*)EEPROM_BABYSTEP_Z, 0);
|
|
|
+ eeprom_update_word(reinterpret_cast<uint16_t *>(&(EEPROM_Sheets_base->s[(eeprom_read_byte(&(EEPROM_Sheets_base->active_sheet)))].z_offset)),0);
|
|
|
|
|
|
lcd_show_fullscreen_message_and_wait_P(_T(MSG_FOLLOW_CALIBRATION_FLOW));
|
|
|
}
|
|
@@ -2703,6 +2703,7 @@ static void gcode_G28(bool home_x_axis, long home_x_value, bool home_y_axis, lon
|
|
|
previous_millis_cmd = _millis();
|
|
|
endstops_hit_on_purpose();
|
|
|
#ifndef MESH_BED_LEVELING
|
|
|
+
|
|
|
|
|
|
|
|
|
if(card.sdprinting && eeprom_read_word((uint16_t *)EEPROM_BABYSTEP_Z))
|
|
@@ -2895,7 +2896,7 @@ bool gcode_M45(bool onlyZ, int8_t verbosity_level)
|
|
|
{
|
|
|
|
|
|
calibration_status_store(CALIBRATION_STATUS_XYZ_CALIBRATION);
|
|
|
- eeprom_update_word((uint16_t*)EEPROM_BABYSTEP_Z, 0);
|
|
|
+ eeprom_update_word(reinterpret_cast<uint16_t *>(&(EEPROM_Sheets_base->s[(eeprom_read_byte(&(EEPROM_Sheets_base->active_sheet)))].z_offset)),0);
|
|
|
|
|
|
uint8_t point_too_far_mask = 0;
|
|
|
BedSkewOffsetDetectionResultType result = find_bed_offset_and_skew(verbosity_level, point_too_far_mask);
|
|
@@ -3739,7 +3740,7 @@ void process_commands()
|
|
|
lang_reset();
|
|
|
|
|
|
} else if(code_seen("Lz")) {
|
|
|
- EEPROM_save_B(EEPROM_BABYSTEP_Z,0);
|
|
|
+ eeprom_update_word(reinterpret_cast<uint16_t *>(&(EEPROM_Sheets_base->s[(eeprom_read_byte(&(EEPROM_Sheets_base->active_sheet)))].z_offset)),0);
|
|
|
|
|
|
} else if(code_seen("Beat")) {
|
|
|
|
|
@@ -5510,7 +5511,7 @@ if(eSoundMode!=e_SOUND_MODE_SILENT)
|
|
|
|
|
|
|
|
|
calibration_status_store(CALIBRATION_STATUS_ASSEMBLED);
|
|
|
- eeprom_update_word((uint16_t*)EEPROM_BABYSTEP_Z, 0);
|
|
|
+ eeprom_update_word(reinterpret_cast<uint16_t *>(&(EEPROM_Sheets_base->s[(eeprom_read_byte(&(EEPROM_Sheets_base->active_sheet)))].z_offset)),0);
|
|
|
|
|
|
|
|
|
reset_bed_offset_and_skew();
|