From 3ab4736ac97edcac8c65fb086eb010d42188f77e Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Tue, 23 Jan 2018 20:51:37 -0600 Subject: [PATCH] Move some strings to PROGMEM --- Marlin/Marlin_main.cpp | 10 +++++----- Marlin/cardreader.cpp | 2 +- Marlin/gcode.cpp | 2 +- Marlin/stepper_dac.cpp | 2 +- Marlin/temperature.cpp | 4 ++-- Marlin/ubl_G29.cpp | 2 +- 6 files changed, 11 insertions(+), 11 deletions(-) diff --git a/Marlin/Marlin_main.cpp b/Marlin/Marlin_main.cpp index 135832c01..57998c62e 100644 --- a/Marlin/Marlin_main.cpp +++ b/Marlin/Marlin_main.cpp @@ -9165,7 +9165,7 @@ inline void gcode_M226() { } else { SERIAL_ERROR_START(); - SERIAL_ERRORLN("Bad i2c request"); + SERIAL_ERRORLNPGM("Bad i2c request"); } } @@ -9296,7 +9296,7 @@ inline void gcode_M226() { } else { SERIAL_ERROR_START(); - SERIAL_ERRORLN(MSG_INVALID_EXTRUDER); + SERIAL_ERRORLNPGM(MSG_INVALID_EXTRUDER); } } @@ -10786,10 +10786,10 @@ inline void gcode_M355() { // always report case light status SERIAL_ECHO_START(); if (!case_light_on) { - SERIAL_ECHOLN("Case light: off"); + SERIAL_ECHOLNPGM("Case light: off"); } else { - if (!USEABLE_HARDWARE_PWM(CASE_LIGHT_PIN)) SERIAL_ECHOLN("Case light: on"); + if (!USEABLE_HARDWARE_PWM(CASE_LIGHT_PIN)) SERIAL_ECHOLNPGM("Case light: on"); else SERIAL_ECHOLNPAIR("Case light: ", (int)case_light_brightness); } @@ -10912,7 +10912,7 @@ inline void invalid_extruder_error(const uint8_t e) { SERIAL_CHAR('T'); SERIAL_ECHO_F(e, DEC); SERIAL_CHAR(' '); - SERIAL_ECHOLN(MSG_INVALID_EXTRUDER); + SERIAL_ECHOLNPGM(MSG_INVALID_EXTRUDER); } #if ENABLED(PARKING_EXTRUDER) diff --git a/Marlin/cardreader.cpp b/Marlin/cardreader.cpp index 979580bd7..dcf33d895 100644 --- a/Marlin/cardreader.cpp +++ b/Marlin/cardreader.cpp @@ -335,7 +335,7 @@ void CardReader::openFile(char* name, const bool read, const bool subcall/*=fals if (file_subcall_ctr > SD_PROCEDURE_DEPTH - 1) { SERIAL_ERROR_START(); SERIAL_ERRORPGM("trying to call sub-gcode files with too many levels. MAX level is:"); - SERIAL_ERRORLN(SD_PROCEDURE_DEPTH); + SERIAL_ERRORLN((int)SD_PROCEDURE_DEPTH); kill(PSTR(MSG_KILLED)); return; } diff --git a/Marlin/gcode.cpp b/Marlin/gcode.cpp index 0fdd2bc9c..4f82c7537 100644 --- a/Marlin/gcode.cpp +++ b/Marlin/gcode.cpp @@ -276,7 +276,7 @@ void GCodeParser::unknown_command_error() { SERIAL_ECHO(codenum); SERIAL_ECHOLNPGM(")"); #if ENABLED(FASTER_GCODE_PARSER) - SERIAL_ECHO(" args: \""); + SERIAL_ECHOPGM(" args: \""); for (char c = 'A'; c <= 'Z'; ++c) if (seen(c)) { SERIAL_CHAR(c); SERIAL_CHAR(' '); } #else diff --git a/Marlin/stepper_dac.cpp b/Marlin/stepper_dac.cpp index f7161e346..2013d2030 100644 --- a/Marlin/stepper_dac.cpp +++ b/Marlin/stepper_dac.cpp @@ -114,7 +114,7 @@ SERIAL_ECHOPAIR(" (", dac_amps(Z_AXIS)); SERIAL_ECHOPAIR(") E:", dac_perc(E_AXIS)); SERIAL_ECHOPAIR(" (", dac_amps(E_AXIS)); - SERIAL_ECHOLN(")"); + SERIAL_ECHOLNPGM(")"); } void dac_commit_eeprom() { diff --git a/Marlin/temperature.cpp b/Marlin/temperature.cpp index e56538a39..3516d0394 100644 --- a/Marlin/temperature.cpp +++ b/Marlin/temperature.cpp @@ -264,11 +264,11 @@ uint8_t Temperature::soft_pwm_amount[HOTENDS], #endif if (!WITHIN(hotend, _BOT_HOTEND, _TOP_HOTEND)) { - SERIAL_ECHOLN(MSG_PID_BAD_EXTRUDER_NUM); + SERIAL_ECHOLNPGM(MSG_PID_BAD_EXTRUDER_NUM); return; } - SERIAL_ECHOLN(MSG_PID_AUTOTUNE_START); + SERIAL_ECHOLNPGM(MSG_PID_AUTOTUNE_START); disable_all_heaters(); // switch off all heaters. diff --git a/Marlin/ubl_G29.cpp b/Marlin/ubl_G29.cpp index 7d9fb0176..39fe9d0bd 100644 --- a/Marlin/ubl_G29.cpp +++ b/Marlin/ubl_G29.cpp @@ -1220,7 +1220,7 @@ SERIAL_PROTOCOLLNPAIR("UBL object count: ", (int)ubl_cnt); #if ENABLED(ENABLE_LEVELING_FADE_HEIGHT) - SERIAL_PROTOCOL("planner.z_fade_height : "); + SERIAL_PROTOCOLPGM("planner.z_fade_height : "); SERIAL_PROTOCOL_F(planner.z_fade_height, 4); SERIAL_EOL(); #endif