🚸 Report M48 Max Delta (#26286)

This commit is contained in:
Vovodroid 2025-04-06 21:42:14 +03:00 committed by GitHub
parent 489727330b
commit 493c5eec21
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 15 additions and 1 deletions

View file

@ -261,7 +261,19 @@ void GcodeSuite::M48() {
#if HAS_STATUS_MESSAGE
// Display M48 results in the status bar
ui.set_status_and_level(MString<30>(GET_TEXT_F(MSG_M48_DEVIATION), F(": "), w_float_t(sigma, 2, 6)));
if (MAX_MESSAGE_SIZE <= 20) {
// 12345678901234567890
// Deviation: 0.123456
ui.set_status_and_level(TS(GET_TEXT_F(MSG_M48_DEVIATION), F(": "), w_float_t(sigma, 2, 6)));
} else if (MAX_MESSAGE_SIZE <= 30) {
// 123456789012345678901234567890
// Dev:0.12345, Max delta:0.12345
ui.set_status_and_level(TS(GET_TEXT_F(MSG_M48_DEV), ':', w_float_t(sigma, 2, 5), F(", "), GET_TEXT(MSG_M48_MAX_DELTA), ':', w_float_t(_MAX(mean - min, max - mean), 2, 5)));
} else {
// 1234567890123456789012345678901234567890
// Deviation: 1.23456, Max delta: 1.23456
ui.set_status_and_level(TS(GET_TEXT_F(MSG_M48_DEVIATION), F(": "), w_float_t(sigma, 2, 6), F(", "), GET_TEXT(MSG_M48_MAX_DELTA), F(": "), w_float_t(_MAX(mean - min, max - mean), 2, 6)));
}
#endif
}

View file

@ -222,7 +222,9 @@ namespace LanguageNarrow_en {
LSTR MSG_M48_TEST = _UxGT("M48 Probe Test");
LSTR MSG_M48_POINT = _UxGT("M48 Point");
LSTR MSG_M48_OUT_OF_BOUNDS = _UxGT("Probe out of bounds");
LSTR MSG_M48_DEV = _UxGT("Dev");
LSTR MSG_M48_DEVIATION = _UxGT("Deviation");
LSTR MSG_M48_MAX_DELTA = _UxGT("Max delta");
LSTR MSG_IDEX_MENU = _UxGT("IDEX Mode");
LSTR MSG_OFFSETS_MENU = _UxGT("Tool Offsets");
LSTR MSG_IDEX_MODE_AUTOPARK = _UxGT("Auto-Park");