Serial macros cleanup
This commit is contained in:
committed by
Scott Lahteine
parent
f0b662ff58
commit
dd42831cba
@@ -405,10 +405,9 @@ void Endstops::event_handler() {
|
||||
}
|
||||
|
||||
static void print_es_state(const bool is_hit, PGM_P const label=nullptr) {
|
||||
if (label) serialprintPGM(label);
|
||||
if (label) SERIAL_ECHOPGM_P(label);
|
||||
SERIAL_ECHOPGM(": ");
|
||||
serialprintPGM(is_hit ? PSTR(STR_ENDSTOP_HIT) : PSTR(STR_ENDSTOP_OPEN));
|
||||
SERIAL_EOL();
|
||||
SERIAL_ECHOLNPGM_P(is_hit ? PSTR(STR_ENDSTOP_HIT) : PSTR(STR_ENDSTOP_OPEN));
|
||||
}
|
||||
|
||||
void _O2 Endstops::report_states() {
|
||||
|
@@ -2973,7 +2973,7 @@ inline void limit_and_warn(float &val, const uint8_t axis, PGM_P const setting_n
|
||||
if (before != val) {
|
||||
SERIAL_CHAR(axis_codes[lim_axis]);
|
||||
SERIAL_ECHOPGM(" Max ");
|
||||
serialprintPGM(setting_name);
|
||||
SERIAL_ECHOPGM_P(setting_name);
|
||||
SERIAL_ECHOLNPAIR(" limited to ", val);
|
||||
}
|
||||
}
|
||||
|
@@ -118,7 +118,7 @@ void PrintCounter::initStats() {
|
||||
inline bool _service_warn(const char * const msg) {
|
||||
_print_divider();
|
||||
SERIAL_ECHO_START();
|
||||
serialprintPGM(msg);
|
||||
SERIAL_ECHOPGM_P(msg);
|
||||
SERIAL_ECHOLNPGM("!");
|
||||
_print_divider();
|
||||
return true;
|
||||
@@ -177,7 +177,7 @@ void PrintCounter::saveStats() {
|
||||
#if HAS_SERVICE_INTERVALS
|
||||
inline void _service_when(char buffer[], const char * const msg, const uint32_t when) {
|
||||
SERIAL_ECHOPGM(STR_STATS);
|
||||
serialprintPGM(msg);
|
||||
SERIAL_ECHOPGM_P(msg);
|
||||
SERIAL_ECHOLNPAIR(" in ", duration_t(when).toString(buffer));
|
||||
}
|
||||
#endif
|
||||
@@ -339,7 +339,7 @@ void PrintCounter::reset() {
|
||||
void PrintCounter::debug(const char func[]) {
|
||||
if (DEBUGGING(INFO)) {
|
||||
SERIAL_ECHOPGM("PrintCounter::");
|
||||
serialprintPGM(func);
|
||||
SERIAL_ECHOPGM_P(func);
|
||||
SERIAL_ECHOLNPGM("()");
|
||||
}
|
||||
}
|
||||
|
@@ -279,8 +279,7 @@ FORCE_INLINE void probe_specific_action(const bool deploy) {
|
||||
PGM_P const ds_str = deploy ? GET_TEXT(MSG_MANUAL_DEPLOY) : GET_TEXT(MSG_MANUAL_STOW);
|
||||
ui.return_to_status(); // To display the new status message
|
||||
ui.set_status_P(ds_str, 99);
|
||||
serialprintPGM(ds_str);
|
||||
SERIAL_EOL();
|
||||
SERIAL_ECHOLNPGM_P(ds_str);
|
||||
|
||||
TERN_(HOST_PROMPT_SUPPORT, host_prompt_do(PROMPT_USER_CONTINUE, PSTR("Stow Probe"), CONTINUE_STR));
|
||||
TERN_(EXTENSIBLE_UI, ExtUI::onUserConfirmRequired_P(PSTR("Stow Probe")));
|
||||
@@ -586,7 +585,7 @@ float Probe::run_z_probe(const bool sanity_check/*=true*/) {
|
||||
early_fail = (scheck && current_position.z > -offset.z + clearance); // Probe triggered too high?
|
||||
#if ENABLED(DEBUG_LEVELING_FEATURE)
|
||||
if (DEBUGGING(LEVELING) && (probe_fail || early_fail)) {
|
||||
DEBUG_PRINT_P(plbl);
|
||||
DEBUG_ECHOPGM_P(plbl);
|
||||
DEBUG_ECHOPGM(" Probe fail! -");
|
||||
if (probe_fail) DEBUG_ECHOPGM(" No trigger.");
|
||||
if (early_fail) DEBUG_ECHOPGM(" Triggered early.");
|
||||
|
@@ -2990,7 +2990,7 @@ void MarlinSettings::reset() {
|
||||
if (!repl) {
|
||||
SERIAL_ECHO_START();
|
||||
SERIAL_ECHOPGM("; ");
|
||||
serialprintPGM(pstr);
|
||||
SERIAL_ECHOPGM_P(pstr);
|
||||
if (eol) SERIAL_EOL();
|
||||
}
|
||||
}
|
||||
@@ -3007,7 +3007,7 @@ void MarlinSettings::reset() {
|
||||
SERIAL_ECHOPGM(" M569 S1");
|
||||
if (etc) {
|
||||
SERIAL_CHAR(' ');
|
||||
serialprintPGM(etc);
|
||||
SERIAL_ECHOPGM_P(etc);
|
||||
}
|
||||
if (newLine) SERIAL_EOL();
|
||||
}
|
||||
@@ -3025,7 +3025,7 @@ void MarlinSettings::reset() {
|
||||
#endif
|
||||
|
||||
inline void say_units(const bool colon) {
|
||||
serialprintPGM(
|
||||
SERIAL_ECHOPGM_P(
|
||||
#if ENABLED(INCH_MODE_SUPPORT)
|
||||
parser.linear_unit_factor != 1.0 ? PSTR(" (in)") :
|
||||
#endif
|
||||
@@ -3066,7 +3066,7 @@ void MarlinSettings::reset() {
|
||||
SERIAL_ECHOPGM(" M149 ");
|
||||
SERIAL_CHAR(parser.temp_units_code());
|
||||
SERIAL_ECHOPGM(" ; Units in ");
|
||||
serialprintPGM(parser.temp_units_name());
|
||||
SERIAL_ECHOPGM_P(parser.temp_units_name());
|
||||
#else
|
||||
SERIAL_ECHOLNPGM(" M149 C ; Units in Celsius");
|
||||
#endif
|
||||
@@ -3254,12 +3254,12 @@ void MarlinSettings::reset() {
|
||||
LOOP_L_N(py, GRID_MAX_POINTS_Y) {
|
||||
LOOP_L_N(px, GRID_MAX_POINTS_X) {
|
||||
CONFIG_ECHO_START();
|
||||
SERIAL_ECHOPAIR_P(PSTR(" G29 S3 I"), px, PSTR(" J"), py);
|
||||
SERIAL_ECHOPAIR(" G29 S3 I", px, " J", py);
|
||||
SERIAL_ECHOLNPAIR_F_P(SP_Z_STR, LINEAR_UNIT(mbl.z_values[px][py]), 5);
|
||||
}
|
||||
}
|
||||
CONFIG_ECHO_START();
|
||||
SERIAL_ECHOLNPAIR_F_P(PSTR(" G29 S4 Z"), LINEAR_UNIT(mbl.z_offset), 5);
|
||||
SERIAL_ECHOLNPAIR_F(" G29 S4 Z", LINEAR_UNIT(mbl.z_offset), 5);
|
||||
}
|
||||
|
||||
#elif ENABLED(AUTO_BED_LEVELING_UBL)
|
||||
|
@@ -664,9 +664,9 @@ volatile bool Temperature::raw_temps_ready = false;
|
||||
|
||||
#if EITHER(PIDTEMPBED, PIDTEMPCHAMBER)
|
||||
PGM_P const estring = GHV(PSTR("chamber"), PSTR("bed"), NUL_STR);
|
||||
say_default_(); serialprintPGM(estring); SERIAL_ECHOLNPAIR("Kp ", tune_pid.Kp);
|
||||
say_default_(); serialprintPGM(estring); SERIAL_ECHOLNPAIR("Ki ", tune_pid.Ki);
|
||||
say_default_(); serialprintPGM(estring); SERIAL_ECHOLNPAIR("Kd ", tune_pid.Kd);
|
||||
say_default_(); SERIAL_ECHOPGM_P(estring); SERIAL_ECHOLNPAIR("Kp ", tune_pid.Kp);
|
||||
say_default_(); SERIAL_ECHOPGM_P(estring); SERIAL_ECHOLNPAIR("Ki ", tune_pid.Ki);
|
||||
say_default_(); SERIAL_ECHOPGM_P(estring); SERIAL_ECHOLNPAIR("Kd ", tune_pid.Kd);
|
||||
#else
|
||||
say_default_(); SERIAL_ECHOLNPAIR("Kp ", tune_pid.Kp);
|
||||
say_default_(); SERIAL_ECHOLNPAIR("Ki ", tune_pid.Ki);
|
||||
@@ -868,7 +868,7 @@ void Temperature::_temp_error(const heater_id_t heater_id, PGM_P const serial_ms
|
||||
|
||||
if (IsRunning() && TERN1(BOGUS_TEMPERATURE_GRACE_PERIOD, killed == 2)) {
|
||||
SERIAL_ERROR_START();
|
||||
serialprintPGM(serial_msg);
|
||||
SERIAL_ECHOPGM_P(serial_msg);
|
||||
SERIAL_ECHOPGM(STR_STOPPED_HEATER);
|
||||
if (heater_id >= 0)
|
||||
SERIAL_ECHO(heater_id);
|
||||
@@ -1532,7 +1532,7 @@ void Temperature::manage_heater() {
|
||||
SERIAL_ECHOPAIR_F_P(SP_B_STR, t.beta, 1);
|
||||
SERIAL_ECHOPAIR_F_P(SP_C_STR, t.sh_c_coeff, 9);
|
||||
SERIAL_ECHOPGM(" ; ");
|
||||
serialprintPGM(
|
||||
SERIAL_ECHOPGM_P(
|
||||
TERN_(TEMP_SENSOR_0_IS_CUSTOM, t_index == CTI_HOTEND_0 ? PSTR("HOTEND 0") :)
|
||||
TERN_(TEMP_SENSOR_1_IS_CUSTOM, t_index == CTI_HOTEND_1 ? PSTR("HOTEND 1") :)
|
||||
TERN_(TEMP_SENSOR_2_IS_CUSTOM, t_index == CTI_HOTEND_2 ? PSTR("HOTEND 2") :)
|
||||
|
Reference in New Issue
Block a user