Use PGM_P for PSTR pointers (#11977)

This commit is contained in:
Scott Lahteine
2018-09-30 23:44:33 -05:00
committed by GitHub
parent 4d5566a6b7
commit 11ac75edcb
39 changed files with 166 additions and 165 deletions

View File

@ -366,7 +366,7 @@ void Endstops::event_handler() {
prev_hit_state = hit_state;
} // Endstops::report_state
static void print_es_state(const bool is_hit, const char * const label=NULL) {
static void print_es_state(const bool is_hit, PGM_P const label=NULL) {
if (label) serialprintPGM(label);
SERIAL_PROTOCOLPGM(": ");
serialprintPGM(is_hit ? PSTR(MSG_ENDSTOP_HIT) : PSTR(MSG_ENDSTOP_OPEN));

View File

@ -435,7 +435,7 @@ bool set_probe_deployed(const bool deploy) {
BUZZ(100, 659);
BUZZ(100, 698);
const char * const ds_str = deploy ? PSTR(MSG_MANUAL_DEPLOY) : PSTR(MSG_MANUAL_STOW);
PGM_P const ds_str = deploy ? PSTR(MSG_MANUAL_DEPLOY) : PSTR(MSG_MANUAL_STOW);
lcd_setstatusPGM(ds_str);
serialprintPGM(ds_str);
SERIAL_EOL();

View File

@ -582,7 +582,7 @@ int Temperature::getHeaterPower(const int heater) {
//
// Temperature Error Handlers
//
void Temperature::_temp_error(const int8_t e, const char * const serial_msg, const char * const lcd_msg) {
void Temperature::_temp_error(const int8_t e, PGM_P const serial_msg, PGM_P const lcd_msg) {
static bool killed = false;
if (IsRunning()) {
SERIAL_ERROR_START();

View File

@ -637,7 +637,7 @@ class Temperature {
static float get_pid_output_bed();
#endif
static void _temp_error(const int8_t e, const char * const serial_msg, const char * const lcd_msg);
static void _temp_error(const int8_t e, PGM_P const serial_msg, PGM_P const lcd_msg);
static void min_temp_error(const int8_t e);
static void max_temp_error(const int8_t e);