Fix another saved_printing_type issue
This commit is contained in:
parent
4e032f6f11
commit
15ea2784c3
|
|
@ -1638,21 +1638,18 @@ void setup()
|
|||
#ifdef UVLO_SUPPORT
|
||||
if (printer_recovering()) { //previous print was terminated by UVLO
|
||||
manage_heater(); // Update temperatures
|
||||
//Restore printing type
|
||||
saved_printing_type = eeprom_read_byte((uint8_t*)EEPROM_UVLO_PRINT_TYPE);
|
||||
#ifdef DEBUG_UVLO_AUTOMATIC_RECOVER
|
||||
printf_P(_N("Power panic detected!\nCurrent bed temp:%d\nSaved bed temp:%d\n"), (int)degBed(), eeprom_read_byte((uint8_t*)EEPROM_UVLO_TARGET_BED));
|
||||
#endif
|
||||
uvlo_auto_recovery_ready = (degBed() > ( (float)eeprom_read_byte((uint8_t*)EEPROM_UVLO_TARGET_BED) - AUTOMATIC_UVLO_BED_TEMP_OFFSET));
|
||||
if (uvlo_auto_recovery_ready){
|
||||
#ifdef DEBUG_UVLO_AUTOMATIC_RECOVER
|
||||
puts_P(_N("Automatic recovery!"));
|
||||
#endif
|
||||
recover_print(1);
|
||||
}
|
||||
else{
|
||||
#ifdef DEBUG_UVLO_AUTOMATIC_RECOVER
|
||||
} else {
|
||||
#endif //DEBUG_UVLO_AUTOMATIC_RECOVER
|
||||
puts_P(_N("Normal recovery!"));
|
||||
#endif
|
||||
if (eeprom_read_byte((uint8_t*)EEPROM_UVLO_PRINT_TYPE) == PowerPanic::PRINT_TYPE_HOST) {
|
||||
if (saved_printing_type == PowerPanic::PRINT_TYPE_HOST) {
|
||||
recover_print(0);
|
||||
} else {
|
||||
const uint8_t btn = lcd_show_fullscreen_message_yes_no_and_wait_P(_T(MSG_RECOVER_PRINT), false);
|
||||
|
|
@ -1662,7 +1659,9 @@ void setup()
|
|||
cancel_saved_printing();
|
||||
}
|
||||
}
|
||||
#ifdef DEBUG_UVLO_AUTOMATIC_RECOVER
|
||||
}
|
||||
#endif //DEBUG_UVLO_AUTOMATIC_RECOVER
|
||||
}
|
||||
|
||||
// Only arm the uvlo interrupt _after_ a recovering print has been initialized and
|
||||
|
|
|
|||
Loading…
Reference in New Issue