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

@ -49,7 +49,7 @@ class TwoWire {
uint8_t requestFrom(uint8_t, uint8_t);
uint8_t requestFrom(int, int);
virtual size_t write(uint8_t);
virtual size_t write(const uint8_t *, size_t);
virtual int available(void);

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(",", (int)value); // right now to see errors that are happening in the
SERIAL_PROTOCOLPAIR(",", (int)size); // read_data() and write_data() functions
SERIAL_PROTOCOL("...)\n");
SERIAL_PROTOCOLLNPGM("...)");
SERIAL_PROTOCOLLNPAIR(" f_lseek()=", (int)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(",", (int)value); // right now to see errors that are happening in the
SERIAL_PROTOCOLPAIR(",", size); // read_data() and write_data() functions
SERIAL_PROTOCOLLN("...)");
SERIAL_PROTOCOLLNPGM("...)");
SERIAL_PROTOCOLLNPAIR(" f_write()=", (int)s);
SERIAL_PROTOCOLPAIR(" size=", size);
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(",", (int)value); // right now to see errors that are happening in the
SERIAL_PROTOCOLPAIR(",", size); // read_data() and write_data() functions
SERIAL_PROTOCOLLN("...)");
SERIAL_PROTOCOLLNPGM("...)");
SERIAL_PROTOCOLLNPAIR(" f_lseek()=", (int)s);
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(",", (int)value); // right now to see errors that are happening in the
SERIAL_PROTOCOLPAIR(",", size); // read_data() and write_data() functions
SERIAL_PROTOCOLLN("...)");
SERIAL_PROTOCOLLNPGM("...)");
SERIAL_PROTOCOLLNPAIR(" f_write()=", (int)s);
SERIAL_PROTOCOLPAIR(" size=", size);
SERIAL_PROTOCOLLNPAIR("\n bytes_read=", bytes_read);

View file

@ -1095,7 +1095,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

View file

@ -114,7 +114,7 @@ void dac_print_values() {
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() {

View file

@ -71,7 +71,7 @@ void GcodeSuite::M301() {
}
else {
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
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: ", case_light_brightness);
}
#else

View file

@ -73,7 +73,7 @@ void GcodeSuite::M261() {
}
else {
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();
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
@ -1540,7 +1540,7 @@ void MarlinSettings::postprocess() {
HAL::PersistentStore::access_finish();
if (status)
SERIAL_PROTOCOL("?Unable to load mesh data.\n");
SERIAL_PROTOCOLPGM("?Unable to load mesh data.\n");
#if ENABLED(EEPROM_CHITCHAT)
else

View file

@ -266,11 +266,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.

View file

@ -123,7 +123,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);
}
/**

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) {
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;
}