Add power panic recovery to active state
Fix M79 send only recovery action when power panic recovery is pending Fix rebase issues
This commit is contained in:
parent
d1b88e1684
commit
ffeda98894
|
|
@ -522,7 +522,8 @@ bool __attribute__((noinline)) printer_active() {
|
||||||
|| (lcd_commands_type != LcdCommands::Idle)
|
|| (lcd_commands_type != LcdCommands::Idle)
|
||||||
|| MMU2::mmu2.MMU_PRINT_SAVED()
|
|| MMU2::mmu2.MMU_PRINT_SAVED()
|
||||||
|| homing_flag
|
|| homing_flag
|
||||||
|| mesh_bed_leveling_flag;
|
|| mesh_bed_leveling_flag
|
||||||
|
|| (eeprom_read_byte((uint8_t*)EEPROM_UVLO) != PowerPanic::NO_PENDING_RECOVERY);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Currently only used in one place, allowed to be inlined
|
// Currently only used in one place, allowed to be inlined
|
||||||
|
|
@ -4126,8 +4127,8 @@ void process_commands()
|
||||||
// M24 - Start SD print
|
// M24 - Start SD print
|
||||||
enquecommand_P(MSG_M24);
|
enquecommand_P(MSG_M24);
|
||||||
|
|
||||||
// Print is recovered, clear the recovery flag
|
// Print is recovered, clear the recovery flag
|
||||||
eeprom_update_byte((uint8_t*)EEPROM_UVLO, PowerPanic::NO_PENDING_RECOVERY);
|
eeprom_update_byte((uint8_t*)EEPROM_UVLO, PowerPanic::NO_PENDING_RECOVERY);
|
||||||
}
|
}
|
||||||
else if (eeprom_read_byte((uint8_t*)EEPROM_UVLO_PRINT_TYPE) == PowerPanic::PRINT_TYPE_USB)
|
else if (eeprom_read_byte((uint8_t*)EEPROM_UVLO_PRINT_TYPE) == PowerPanic::PRINT_TYPE_USB)
|
||||||
{
|
{
|
||||||
|
|
@ -5998,7 +5999,9 @@ Sigma_Exit:
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (eeprom_read_byte((uint8_t*)EEPROM_UVLO_PRINT_TYPE) == PowerPanic::PRINT_TYPE_USB && printingIsPaused()) {
|
if (eeprom_read_byte((uint8_t*)EEPROM_UVLO_PRINT_TYPE) == PowerPanic::PRINT_TYPE_USB
|
||||||
|
&& eeprom_read_byte((uint8_t*)EEPROM_UVLO) != PowerPanic::NO_PENDING_RECOVERY
|
||||||
|
&& printingIsPaused()) {
|
||||||
// The print is in a paused state. The print was recovered following a power panic
|
// The print is in a paused state. The print was recovered following a power panic
|
||||||
// but up to this point the printer has been waiting for the M79 from the host
|
// but up to this point the printer has been waiting for the M79 from the host
|
||||||
// Send action to the host, so the host can resume the print. It is up to the host
|
// Send action to the host, so the host can resume the print. It is up to the host
|
||||||
|
|
|
||||||
|
|
@ -45,6 +45,8 @@
|
||||||
|
|
||||||
#include "Prusa_farm.h"
|
#include "Prusa_farm.h"
|
||||||
|
|
||||||
|
#include "power_panic.h"
|
||||||
|
|
||||||
static void lcd_sd_updir();
|
static void lcd_sd_updir();
|
||||||
static void lcd_mesh_bed_leveling_settings();
|
static void lcd_mesh_bed_leveling_settings();
|
||||||
#ifdef LCD_BL_PIN
|
#ifdef LCD_BL_PIN
|
||||||
|
|
@ -5281,7 +5283,11 @@ static void lcd_main_menu()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if((printJobOngoing() || printingIsPaused()) && (custom_message_type != CustomMsg::MeshBedLeveling) && !processing_tcode) {
|
if((printJobOngoing()
|
||||||
|
|| printingIsPaused()
|
||||||
|
|| (eeprom_read_byte((uint8_t*)EEPROM_UVLO) != PowerPanic::NO_PENDING_RECOVERY))
|
||||||
|
&& (custom_message_type != CustomMsg::MeshBedLeveling)
|
||||||
|
&& !processing_tcode) {
|
||||||
MENU_ITEM_SUBMENU_P(_T(MSG_STOP_PRINT), lcd_sdcard_stop);
|
MENU_ITEM_SUBMENU_P(_T(MSG_STOP_PRINT), lcd_sdcard_stop);
|
||||||
}
|
}
|
||||||
#ifdef THERMAL_MODEL
|
#ifdef THERMAL_MODEL
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue