Merge pull request #121 from PavelSindler/MK3

resolving conflicts
This commit is contained in:
PavelSindler 2018-11-29 16:27:53 +01:00 committed by GitHub
commit f9522f5711
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -8267,6 +8267,10 @@ void uvlo_()
// are in action.
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.
cmdqueue_reset();
card.sdprinting = false;
@ -8322,10 +8326,6 @@ void uvlo_()
// for reaching the zero full step before powering off.
eeprom_update_word((uint16_t*)(EEPROM_UVLO_Z_MICROSTEPS), z_microsteps);
// 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 + 4), current_position[Y_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);
uint32_t position = eeprom_read_dword((uint32_t*)(EEPROM_FILE_POSITION));
SERIAL_ECHOPGM("Position read from eeprom:");
MYSERIAL.println(position);
MYSERIAL.println(position);
// 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.
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))));