Fix MK2.5 builds

- removed `reset_uvlo` as `#ifdef UVLO_SUPPORT` everywhere for MK2.5 is a huge change.
This commit is contained in:
3d-gussner 2024-03-27 09:42:59 +01:00
parent 1ac69247d7
commit 5f26d5f7da
3 changed files with 6 additions and 8 deletions

View File

@ -4182,7 +4182,8 @@ void process_commands()
enquecommand_P(MSG_M24); enquecommand_P(MSG_M24);
// Print is recovered, clear the recovery flag // Print is recovered, clear the recovery flag
reset_uvlo(); eeprom_update_byte_notify((uint8_t*)EEPROM_UVLO, PowerPanic::NO_PENDING_RECOVERY);
eeprom_update_byte_notify((uint8_t*)EEPROM_UVLO_Z_LIFTED, 0);
} else if (eeprom_read_byte((uint8_t*)EEPROM_UVLO_PRINT_TYPE) == PowerPanic::PRINT_TYPE_HOST) { } else if (eeprom_read_byte((uint8_t*)EEPROM_UVLO_PRINT_TYPE) == PowerPanic::PRINT_TYPE_HOST) {
// For Host prints we need to start the timer so that the pause has any effect // For Host prints we need to start the timer so that the pause has any effect
// this will allow g-codes to be processed while in the paused state // this will allow g-codes to be processed while in the paused state
@ -11070,7 +11071,8 @@ void restore_print_from_ram_and_continue(float e_move)
set_destination_to_current(); set_destination_to_current();
restore_print_file_state(); restore_print_file_state();
reset_uvlo(); eeprom_update_byte_notify((uint8_t*)EEPROM_UVLO, PowerPanic::NO_PENDING_RECOVERY);
eeprom_update_byte_notify((uint8_t*)EEPROM_UVLO_Z_LIFTED, 0);
lcd_setstatuspgm(MSG_WELCOME); lcd_setstatuspgm(MSG_WELCOME);
saved_printing_type = PowerPanic::PRINT_TYPE_NONE; saved_printing_type = PowerPanic::PRINT_TYPE_NONE;
saved_printing = false; saved_printing = false;
@ -11080,7 +11082,8 @@ void restore_print_from_ram_and_continue(float e_move)
// Cancel the state related to a currently saved print // Cancel the state related to a currently saved print
void cancel_saved_printing() void cancel_saved_printing()
{ {
reset_uvlo(); eeprom_update_byte_notify((uint8_t*)EEPROM_UVLO, PowerPanic::NO_PENDING_RECOVERY);
eeprom_update_byte_notify((uint8_t*)EEPROM_UVLO_Z_LIFTED, 0);
saved_start_position[0] = SAVED_START_POSITION_UNSET; saved_start_position[0] = SAVED_START_POSITION_UNSET;
saved_printing_type = PowerPanic::PRINT_TYPE_NONE; saved_printing_type = PowerPanic::PRINT_TYPE_NONE;
saved_printing = false; saved_printing = false;

View File

@ -495,8 +495,4 @@ void restore_print_from_eeprom(bool mbl_was_active) {
enquecommand_P(PSTR("PRUSA uvlo")); enquecommand_P(PSTR("PRUSA uvlo"));
} }
void reset_uvlo() {
eeprom_update_byte_notify((uint8_t*)EEPROM_UVLO, PowerPanic::NO_PENDING_RECOVERY);
eeprom_update_byte_notify((uint8_t*)EEPROM_UVLO_Z_LIFTED, 0);
}
#endif //UVLO_SUPPORT #endif //UVLO_SUPPORT

View File

@ -18,4 +18,3 @@ enum PrintType : uint8_t {
void uvlo_(); void uvlo_();
void recover_print(uint8_t automatic); void recover_print(uint8_t automatic);
void setup_uvlo_interrupt(); void setup_uvlo_interrupt();
void reset_uvlo();