Merge pull request #2448 from wavexx/save_restore_fix
Save and restore fixes
This commit is contained in:
commit
1ceadcb162
1 changed files with 9 additions and 6 deletions
|
@ -10530,7 +10530,7 @@ void uvlo_()
|
||||||
|
|
||||||
// save the global state at planning time
|
// save the global state at planning time
|
||||||
uint16_t feedrate_bckp;
|
uint16_t feedrate_bckp;
|
||||||
if (blocks_queued())
|
if (current_block)
|
||||||
{
|
{
|
||||||
memcpy(saved_target, current_block->gcode_target, sizeof(saved_target));
|
memcpy(saved_target, current_block->gcode_target, sizeof(saved_target));
|
||||||
feedrate_bckp = current_block->gcode_feedrate;
|
feedrate_bckp = current_block->gcode_feedrate;
|
||||||
|
@ -10799,10 +10799,13 @@ void recover_print(uint8_t automatic) {
|
||||||
// Recover position, temperatures and extrude_multipliers
|
// Recover position, temperatures and extrude_multipliers
|
||||||
bool mbl_was_active = recover_machine_state_after_power_panic();
|
bool mbl_was_active = recover_machine_state_after_power_panic();
|
||||||
|
|
||||||
// Attempt to lift the print head on the first recovery, so one may remove the excess priming material.
|
// Lift the print head 25mm, first to avoid collisions with oozed material with the print,
|
||||||
bool raise_z = (eeprom_read_byte((uint8_t*)EEPROM_UVLO) == 1);
|
// and second also so one may remove the excess priming material.
|
||||||
if(raise_z && (current_position[Z_AXIS]<25))
|
if(eeprom_read_byte((uint8_t*)EEPROM_UVLO) == 1)
|
||||||
enquecommand_P(PSTR("G1 Z25 F800"));
|
{
|
||||||
|
sprintf_P(cmd, PSTR("G1 Z%.3f F800"), current_position[Z_AXIS] + 25);
|
||||||
|
enquecommand(cmd);
|
||||||
|
}
|
||||||
|
|
||||||
// Home X and Y axes. Homing just X and Y shall not touch the babystep and the world2machine
|
// Home X and Y axes. Homing just X and Y shall not touch the babystep and the world2machine
|
||||||
// transformation status. G28 will not touch Z when MBL is off.
|
// transformation status. G28 will not touch Z when MBL is off.
|
||||||
|
@ -11130,7 +11133,7 @@ void stop_and_save_print_to_ram(float z_move, float e_move)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// save the global state at planning time
|
// save the global state at planning time
|
||||||
if (blocks_queued())
|
if (current_block)
|
||||||
{
|
{
|
||||||
memcpy(saved_target, current_block->gcode_target, sizeof(saved_target));
|
memcpy(saved_target, current_block->gcode_target, sizeof(saved_target));
|
||||||
saved_feedrate2 = current_block->gcode_feedrate;
|
saved_feedrate2 = current_block->gcode_feedrate;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue