Move more strings to PROGMEM

This commit is contained in:
Scott Lahteine 2018-01-23 21:17:33 -06:00
parent 58671e1bc1
commit 2bea1bda56
11 changed files with 17 additions and 17 deletions

View File

@ -107,7 +107,7 @@ bool write_data(int &pos, const uint8_t *value, uint16_t size, uint16_t *crc) {
SERIAL_PROTOCOLPAIR(" write_data(", pos); // This extra chit-chat goes away soon. But it is helpful SERIAL_PROTOCOLPAIR(" write_data(", pos); // This extra chit-chat goes away soon. But it is helpful
SERIAL_PROTOCOLPAIR(",", (int)value); // right now to see errors that are happening in the SERIAL_PROTOCOLPAIR(",", (int)value); // right now to see errors that are happening in the
SERIAL_PROTOCOLPAIR(",", (int)size); // read_data() and write_data() functions SERIAL_PROTOCOLPAIR(",", (int)size); // read_data() and write_data() functions
SERIAL_PROTOCOL("...)\n"); SERIAL_PROTOCOLLNPGM("...)");
SERIAL_PROTOCOLLNPAIR(" f_lseek()=", (int)s); SERIAL_PROTOCOLLNPAIR(" f_lseek()=", (int)s);
return s; return s;
} }
@ -117,7 +117,7 @@ bool write_data(int &pos, const uint8_t *value, uint16_t size, uint16_t *crc) {
SERIAL_PROTOCOLPAIR(" write_data(", pos); // This extra chit-chat goes away soon. But it is helpful SERIAL_PROTOCOLPAIR(" write_data(", pos); // This extra chit-chat goes away soon. But it is helpful
SERIAL_PROTOCOLPAIR(",", (int)value); // right now to see errors that are happening in the SERIAL_PROTOCOLPAIR(",", (int)value); // right now to see errors that are happening in the
SERIAL_PROTOCOLPAIR(",", size); // read_data() and write_data() functions SERIAL_PROTOCOLPAIR(",", size); // read_data() and write_data() functions
SERIAL_PROTOCOLLN("...)"); SERIAL_PROTOCOLLNPGM("...)");
SERIAL_PROTOCOLLNPAIR(" f_write()=", (int)s); SERIAL_PROTOCOLLNPAIR(" f_write()=", (int)s);
SERIAL_PROTOCOLPAIR(" size=", size); SERIAL_PROTOCOLPAIR(" size=", size);
SERIAL_PROTOCOLLNPAIR("\n bytes_written=", bytes_written); SERIAL_PROTOCOLLNPAIR("\n bytes_written=", bytes_written);
@ -136,7 +136,7 @@ bool read_data(int &pos, uint8_t* value, uint16_t size, uint16_t *crc, const boo
SERIAL_PROTOCOLPAIR(" read_data(", pos); // This extra chit-chat goes away soon. But it is helpful SERIAL_PROTOCOLPAIR(" read_data(", pos); // This extra chit-chat goes away soon. But it is helpful
SERIAL_PROTOCOLPAIR(",", (int)value); // right now to see errors that are happening in the SERIAL_PROTOCOLPAIR(",", (int)value); // right now to see errors that are happening in the
SERIAL_PROTOCOLPAIR(",", size); // read_data() and write_data() functions SERIAL_PROTOCOLPAIR(",", size); // read_data() and write_data() functions
SERIAL_PROTOCOLLN("...)"); SERIAL_PROTOCOLLNPGM("...)");
SERIAL_PROTOCOLLNPAIR(" f_lseek()=", (int)s); SERIAL_PROTOCOLLNPAIR(" f_lseek()=", (int)s);
return true; return true;
} }
@ -153,7 +153,7 @@ bool read_data(int &pos, uint8_t* value, uint16_t size, uint16_t *crc, const boo
SERIAL_PROTOCOLPAIR(" read_data(", pos); // This extra chit-chat goes away soon. But it is helpful SERIAL_PROTOCOLPAIR(" read_data(", pos); // This extra chit-chat goes away soon. But it is helpful
SERIAL_PROTOCOLPAIR(",", (int)value); // right now to see errors that are happening in the SERIAL_PROTOCOLPAIR(",", (int)value); // right now to see errors that are happening in the
SERIAL_PROTOCOLPAIR(",", size); // read_data() and write_data() functions SERIAL_PROTOCOLPAIR(",", size); // read_data() and write_data() functions
SERIAL_PROTOCOLLN("...)"); SERIAL_PROTOCOLLNPGM("...)");
SERIAL_PROTOCOLLNPAIR(" f_write()=", (int)s); SERIAL_PROTOCOLLNPAIR(" f_write()=", (int)s);
SERIAL_PROTOCOLPAIR(" size=", size); SERIAL_PROTOCOLPAIR(" size=", size);
SERIAL_PROTOCOLLNPAIR("\n bytes_read=", bytes_read); SERIAL_PROTOCOLLNPAIR("\n bytes_read=", bytes_read);

View File

@ -1095,7 +1095,7 @@
SERIAL_PROTOCOLLNPAIR("UBL object count: ", (int)ubl_cnt); SERIAL_PROTOCOLLNPAIR("UBL object count: ", (int)ubl_cnt);
#if ENABLED(ENABLE_LEVELING_FADE_HEIGHT) #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_PROTOCOL_F(planner.z_fade_height, 4);
SERIAL_EOL(); SERIAL_EOL();
#endif #endif

View File

@ -114,7 +114,7 @@ void dac_print_values() {
SERIAL_ECHOPAIR(" (", dac_amps(Z_AXIS)); SERIAL_ECHOPAIR(" (", dac_amps(Z_AXIS));
SERIAL_ECHOPAIR(") E:", dac_perc(E_AXIS)); SERIAL_ECHOPAIR(") E:", dac_perc(E_AXIS));
SERIAL_ECHOPAIR(" (", dac_amps(E_AXIS)); SERIAL_ECHOPAIR(" (", dac_amps(E_AXIS));
SERIAL_ECHOLN(")"); SERIAL_ECHOLNPGM(")");
} }
void dac_commit_eeprom() { void dac_commit_eeprom() {

View File

@ -71,7 +71,7 @@ void GcodeSuite::M301() {
} }
else { else {
SERIAL_ERROR_START(); SERIAL_ERROR_START();
SERIAL_ERRORLN(MSG_INVALID_EXTRUDER); SERIAL_ERRORLNPGM(MSG_INVALID_EXTRUDER);
} }
} }

View File

@ -56,10 +56,10 @@ void GcodeSuite::M355() {
// always report case light status // always report case light status
SERIAL_ECHO_START(); SERIAL_ECHO_START();
if (!case_light_on) { if (!case_light_on) {
SERIAL_ECHOLN("Case light: off"); SERIAL_ECHOLNPGM("Case light: off");
} }
else { 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: ", case_light_brightness); else SERIAL_ECHOLNPAIR("Case light: ", case_light_brightness);
} }
#else #else

View File

@ -73,7 +73,7 @@ void GcodeSuite::M261() {
} }
else { else {
SERIAL_ERROR_START(); SERIAL_ERROR_START();
SERIAL_ERRORLN("Bad i2c request"); SERIAL_ERRORLNPGM("Bad i2c request");
} }
} }

View File

@ -1502,7 +1502,7 @@ void MarlinSettings::postprocess() {
HAL::PersistentStore::access_finish(); HAL::PersistentStore::access_finish();
if (status) if (status)
SERIAL_PROTOCOL("?Unable to save mesh data.\n"); SERIAL_PROTOCOLPGM("?Unable to save mesh data.\n");
// Write crc to MAT along with other data, or just tack on to the beginning or end // Write crc to MAT along with other data, or just tack on to the beginning or end
@ -1540,7 +1540,7 @@ void MarlinSettings::postprocess() {
HAL::PersistentStore::access_finish(); HAL::PersistentStore::access_finish();
if (status) if (status)
SERIAL_PROTOCOL("?Unable to load mesh data.\n"); SERIAL_PROTOCOLPGM("?Unable to load mesh data.\n");
#if ENABLED(EEPROM_CHITCHAT) #if ENABLED(EEPROM_CHITCHAT)
else else

View File

@ -266,11 +266,11 @@ uint8_t Temperature::soft_pwm_amount[HOTENDS],
#endif #endif
if (!WITHIN(hotend, _BOT_HOTEND, _TOP_HOTEND)) { if (!WITHIN(hotend, _BOT_HOTEND, _TOP_HOTEND)) {
SERIAL_ECHOLN(MSG_PID_BAD_EXTRUDER_NUM); SERIAL_ECHOLNPGM(MSG_PID_BAD_EXTRUDER_NUM);
return; return;
} }
SERIAL_ECHOLN(MSG_PID_AUTOTUNE_START); SERIAL_ECHOLNPGM(MSG_PID_AUTOTUNE_START);
disable_all_heaters(); // switch off all heaters. disable_all_heaters(); // switch off all heaters.

View File

@ -123,7 +123,7 @@ inline void invalid_extruder_error(const uint8_t e) {
SERIAL_CHAR('T'); SERIAL_CHAR('T');
SERIAL_ECHO_F(e, DEC); SERIAL_ECHO_F(e, DEC);
SERIAL_CHAR(' '); SERIAL_CHAR(' ');
SERIAL_ECHOLN(MSG_INVALID_EXTRUDER); SERIAL_ECHOLNPGM(MSG_INVALID_EXTRUDER);
} }
/** /**

View File

@ -364,7 +364,7 @@ void CardReader::openFile(char* name, const bool read, const bool subcall/*=fals
if (file_subcall_ctr > SD_PROCEDURE_DEPTH - 1) { if (file_subcall_ctr > SD_PROCEDURE_DEPTH - 1) {
SERIAL_ERROR_START(); SERIAL_ERROR_START();
SERIAL_ERRORPGM("trying to call sub-gcode files with too many levels. MAX level is:"); 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)); kill(PSTR(MSG_KILLED));
return; return;
} }