🎨 Apply F() to status message

This commit is contained in:
Scott Lahteine
2021-09-25 17:05:11 -05:00
committed by Scott Lahteine
parent 433eedd50f
commit 360311f232
44 changed files with 194 additions and 196 deletions

View File

@ -156,7 +156,7 @@
homeaxis(Z_AXIS);
}
else {
LCD_MESSAGEPGM(MSG_ZPROBE_OUT);
LCD_MESSAGE(MSG_ZPROBE_OUT);
SERIAL_ECHO_MSG(STR_ZPROBE_OUT_SER);
}
}

View File

@ -477,11 +477,11 @@ void GcodeSuite::G33() {
SERIAL_ECHOLNPGM("G33 Auto Calibrate");
// Report settings
PGM_P const checkingac = PSTR("Checking... AC");
SERIAL_ECHOPGM_P(checkingac);
FSTR_P const checkingac = F("Checking... AC");
SERIAL_ECHOF(checkingac);
if (verbose_level == 0) SERIAL_ECHOPGM(" (DRY-RUN)");
SERIAL_EOL();
ui.set_status_P(checkingac);
ui.set_status(checkingac);
print_calibration_settings(_endstop_results, _angle_results);

View File

@ -31,7 +31,7 @@
#include "../../module/stepper.h"
#include "../../module/planner.h"
#include "../../module/probe.h"
#include "../../lcd/marlinui.h" // for LCD_MESSAGEPGM
#include "../../lcd/marlinui.h" // for LCD_MESSAGE
#if HAS_LEVELING
#include "../../feature/bedlevel/bedlevel.h"
@ -229,7 +229,7 @@ void GcodeSuite::G34() {
const float z_probed_height = probe.probe_at_point(z_stepper_align.xy[iprobe], raise_after, 0, true, false);
if (isnan(z_probed_height)) {
SERIAL_ECHOLNPGM("Probing failed");
LCD_MESSAGEPGM(MSG_LCD_PROBING_FAILED);
LCD_MESSAGE(MSG_LCD_PROBING_FAILED);
err_break = true;
break;
}
@ -328,7 +328,7 @@ void GcodeSuite::G34() {
auto decreasing_accuracy = [](const_float_t v1, const_float_t v2) {
if (v1 < v2 * 0.7f) {
SERIAL_ECHOLNPGM("Decreasing Accuracy Detected.");
LCD_MESSAGEPGM(MSG_DECREASING_ACCURACY);
LCD_MESSAGE(MSG_DECREASING_ACCURACY);
return true;
}
return false;
@ -411,7 +411,7 @@ void GcodeSuite::G34() {
if (success_break) {
SERIAL_ECHOLNPGM("Target accuracy achieved.");
LCD_MESSAGEPGM(MSG_ACCURACY_ACHIEVED);
LCD_MESSAGE(MSG_ACCURACY_ACHIEVED);
break;
}

View File

@ -351,7 +351,7 @@ void GcodeSuite::M192() {
}
const celsius_t target_temp = parser.value_celsius();
ui.set_status_P(thermalManager.isProbeBelowTemp(target_temp) ? GET_TEXT(MSG_PROBE_HEATING) : GET_TEXT(MSG_PROBE_COOLING));
ui.set_status(thermalManager.isProbeBelowTemp(target_temp) ? GET_TEXT_F(MSG_PROBE_HEATING) : GET_TEXT_F(MSG_PROBE_COOLING));
thermalManager.wait_for_probe(target_temp, no_wait_for_cooling);
}

View File

@ -79,7 +79,7 @@ void GcodeSuite::M48() {
};
if (!probe.can_reach(test_position)) {
ui.set_status_P(GET_TEXT(MSG_M48_OUT_OF_BOUNDS), 99);
ui.set_status(GET_TEXT_F(MSG_M48_OUT_OF_BOUNDS), 99);
SERIAL_ECHOLNPGM("? (X,Y) out of bounds.");
return;
}
@ -144,7 +144,7 @@ void GcodeSuite::M48() {
LOOP_L_N(n, n_samples) {
#if HAS_STATUS_MESSAGE
// Display M48 progress in the status bar
ui.status_printf_P(0, PSTR(S_FMT ": %d/%d"), GET_TEXT(MSG_M48_POINT), int(n + 1), int(n_samples));
ui.status_printf(0, F(S_FMT ": %d/%d"), GET_TEXT(MSG_M48_POINT), int(n + 1), int(n_samples));
#endif
// When there are "legs" of movement move around the point before probing
@ -260,7 +260,7 @@ void GcodeSuite::M48() {
#if HAS_STATUS_MESSAGE
// Display M48 results in the status bar
char sigma_str[8];
ui.status_printf_P(0, PSTR(S_FMT ": %s"), GET_TEXT(MSG_M48_DEVIATION), dtostrf(sigma, 2, 6, sigma_str));
ui.status_printf(0, F(S_FMT ": %s"), GET_TEXT(MSG_M48_DEVIATION), dtostrf(sigma, 2, 6, sigma_str));
#endif
}