From 392c46c7ad5ce0e649cbaa427ee0163440877f37 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gu=C3=B0ni=20M=C3=A1r=20Gilbert?= Date: Sat, 1 Jul 2023 16:50:00 +0000 Subject: [PATCH] power panic: pull INT4 string into PROGMEM Change in memory: Flash: -4 bytes SRAM 0 bytes --- Firmware/power_panic.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Firmware/power_panic.cpp b/Firmware/power_panic.cpp index c785ce79a..7c25d85ed 100644 --- a/Firmware/power_panic.cpp +++ b/Firmware/power_panic.cpp @@ -21,6 +21,8 @@ #include "temperature.h" #include "ultralcd.h" +static const char MSG_INT4[] PROGMEM = "INT4"; + static bool recover_machine_state_after_power_panic(); static void restore_print_from_eeprom(bool mbl_was_active); @@ -285,14 +287,14 @@ void setup_uvlo_interrupt() { // check if power was lost before we armed the interrupt if(!(PINE & (1 << 4)) && eeprom_read_byte((uint8_t*)EEPROM_UVLO)) { - SERIAL_ECHOLNPGM("INT4"); + SERIAL_ECHOLNRPGM(MSG_INT4); uvlo_drain_reset(); } } ISR(INT4_vect) { EIMSK &= ~(1 << 4); //disable INT4 interrupt to make sure that this code will be executed just once - SERIAL_ECHOLNPGM("INT4"); + SERIAL_ECHOLNRPGM(MSG_INT4); //fire normal uvlo only in case where EEPROM_UVLO is 0 or if IS_SD_PRINTING is 1. if(printer_active() && (!(eeprom_read_byte((uint8_t*)EEPROM_UVLO)))) uvlo_(); if(eeprom_read_byte((uint8_t*)EEPROM_UVLO)) uvlo_tiny();