|
@@ -8267,6 +8267,10 @@ void uvlo_()
|
|
// are in action.
|
|
// are in action.
|
|
planner_abort_hard();
|
|
planner_abort_hard();
|
|
|
|
|
|
|
|
+ // Store the current extruder position.
|
|
|
|
+ eeprom_update_float((float*)(EEPROM_UVLO_CURRENT_POSITION_E), st_get_position_mm(E_AXIS));
|
|
|
|
+ eeprom_update_byte((uint8_t*)EEPROM_UVLO_E_ABS, axis_relative_modes[3]?0:1);
|
|
|
|
+
|
|
// Clean the input command queue.
|
|
// Clean the input command queue.
|
|
cmdqueue_reset();
|
|
cmdqueue_reset();
|
|
card.sdprinting = false;
|
|
card.sdprinting = false;
|
|
@@ -8322,10 +8326,6 @@ void uvlo_()
|
|
// for reaching the zero full step before powering off.
|
|
// for reaching the zero full step before powering off.
|
|
eeprom_update_word((uint16_t*)(EEPROM_UVLO_Z_MICROSTEPS), z_microsteps);
|
|
eeprom_update_word((uint16_t*)(EEPROM_UVLO_Z_MICROSTEPS), z_microsteps);
|
|
// Store the current position.
|
|
// Store the current position.
|
|
- // Store the current extruder position.
|
|
|
|
- // eeprom_update_float((float*)(EEPROM_UVLO_CURRENT_POSITION_E), st_get_position_mm(E_AXIS));
|
|
|
|
- eeprom_update_float((float*)(EEPROM_UVLO_CURRENT_POSITION_E), current_position[E_AXIS]);
|
|
|
|
- eeprom_update_byte((uint8_t*)EEPROM_UVLO_E_ABS, axis_relative_modes[3] ? 0 : 1);
|
|
|
|
eeprom_update_float((float*)(EEPROM_UVLO_CURRENT_POSITION + 0), current_position[X_AXIS]);
|
|
eeprom_update_float((float*)(EEPROM_UVLO_CURRENT_POSITION + 0), current_position[X_AXIS]);
|
|
eeprom_update_float((float*)(EEPROM_UVLO_CURRENT_POSITION + 4), current_position[Y_AXIS]);
|
|
eeprom_update_float((float*)(EEPROM_UVLO_CURRENT_POSITION + 4), current_position[Y_AXIS]);
|
|
eeprom_update_float((float*)(EEPROM_UVLO_CURRENT_POSITION_Z), current_position[Z_AXIS]);
|
|
eeprom_update_float((float*)(EEPROM_UVLO_CURRENT_POSITION_Z), current_position[Z_AXIS]);
|
|
@@ -8624,10 +8624,9 @@ void restore_print_from_eeprom() {
|
|
enquecommand(cmd);
|
|
enquecommand(cmd);
|
|
uint32_t position = eeprom_read_dword((uint32_t*)(EEPROM_FILE_POSITION));
|
|
uint32_t position = eeprom_read_dword((uint32_t*)(EEPROM_FILE_POSITION));
|
|
SERIAL_ECHOPGM("Position read from eeprom:");
|
|
SERIAL_ECHOPGM("Position read from eeprom:");
|
|
- MYSERIAL.println(position);
|
|
|
|
-
|
|
|
|
|
|
+ MYSERIAL.println(position);
|
|
// E axis relative mode.
|
|
// E axis relative mode.
|
|
- enquecommand_P(PSTR("M83"));
|
|
|
|
|
|
+ enquecommand_P(PSTR("M83"));
|
|
// Move to the XY print position in logical coordinates, where the print has been killed.
|
|
// Move to the XY print position in logical coordinates, where the print has been killed.
|
|
strcpy_P(cmd, PSTR("G1 X")); strcat(cmd, ftostr32(eeprom_read_float((float*)(EEPROM_UVLO_CURRENT_POSITION + 0))));
|
|
strcpy_P(cmd, PSTR("G1 X")); strcat(cmd, ftostr32(eeprom_read_float((float*)(EEPROM_UVLO_CURRENT_POSITION + 0))));
|
|
strcat_P(cmd, PSTR(" Y")); strcat(cmd, ftostr32(eeprom_read_float((float*)(EEPROM_UVLO_CURRENT_POSITION + 4))));
|
|
strcat_P(cmd, PSTR(" Y")); strcat(cmd, ftostr32(eeprom_read_float((float*)(EEPROM_UVLO_CURRENT_POSITION + 4))));
|