Serial macros cleanup

This commit is contained in:
Scott Lahteine
2021-02-28 19:43:46 -06:00
committed by Scott Lahteine
parent f0b662ff58
commit dd42831cba
48 changed files with 101 additions and 117 deletions

View File

@ -181,7 +181,7 @@ void unified_bed_leveling::display_map(const int map_type) {
}
else {
SERIAL_ECHOPGM(" for ");
serialprintPGM(csv ? PSTR("CSV:\n") : PSTR("LCD:\n"));
SERIAL_ECHOPGM_P(csv ? PSTR("CSV:\n") : PSTR("LCD:\n"));
}
// Add XY probe offset from extruder because probe.probe_at_point() subtracts them when
@ -212,7 +212,7 @@ void unified_bed_leveling::display_map(const int map_type) {
// TODO: Display on Graphical LCD
}
else if (isnan(f))
serialprintPGM(human ? PSTR(" . ") : PSTR("NAN"));
SERIAL_ECHOPGM_P(human ? PSTR(" . ") : PSTR("NAN"));
else if (human || csv) {
if (human && f >= 0.0) SERIAL_CHAR(f > 0 ? '+' : ' '); // Display sign also for positive numbers (' ' for 0)
SERIAL_ECHO_F(f, 3); // Positive: 5 digits, Negative: 6 digits

View File

@ -908,11 +908,11 @@ void unified_bed_leveling::shift_mesh_height() {
if (do_ubl_mesh_map) display_map(g29_map_type); // show user where we're probing
if (parser.seen('B')) {
serialprintPGM(GET_TEXT(MSG_UBL_BC_INSERT));
SERIAL_ECHOPGM_P(GET_TEXT(MSG_UBL_BC_INSERT));
LCD_MESSAGEPGM(MSG_UBL_BC_INSERT);
}
else {
serialprintPGM(GET_TEXT(MSG_UBL_BC_INSERT2));
SERIAL_ECHOPGM_P(GET_TEXT(MSG_UBL_BC_INSERT2));
LCD_MESSAGEPGM(MSG_UBL_BC_INSERT2);
}
@ -1576,7 +1576,7 @@ void unified_bed_leveling::smart_fill_mesh() {
return normal.x * pos.x + normal.y * pos.y + zadd;
};
auto debug_pt = [](PGM_P const pre, const xy_pos_t &pos, const float &zadd) {
d_from(); serialprintPGM(pre);
d_from(); SERIAL_ECHOPGM_P(pre);
DEBUG_ECHO_F(normed(pos, zadd), 6);
DEBUG_ECHOLNPAIR_F(" Z error = ", zadd - get_z_correction(pos), 6);
};