Skip to content

Commit

Permalink
Provide MSG_ITERATION
Browse files Browse the repository at this point in the history
  • Loading branch information
thinkyhead committed Aug 13, 2020
1 parent d66f848 commit a64d38b
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 8 deletions.
17 changes: 9 additions & 8 deletions Marlin/src/gcode/calibrate/G34_M422.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ void GcodeSuite::G34() {

#if HAS_DISPLAY
PGM_P const msg_iteration = GET_TEXT(MSG_ITERATION);
const iter_str_len = strlen_P(iter_str_len);
const uint8_t iter_str_len = strlen_P(iter_str_len);
#endif

// Final z and iteration values will be used after breaking the loop
Expand All @@ -172,7 +172,7 @@ void GcodeSuite::G34() {
if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPGM("> probing all positions.");

const int iter = iteration + 1;
SERIAL_ECHOLNPAIR("\nIteration: ", iter);
SERIAL_ECHOLNPAIR("\nG34 Iteration: ", iter);
#if HAS_DISPLAY
char str[iter_str_len + 2 + 1];
sprintf_P(str, msg_iteration, iter);
Expand Down Expand Up @@ -260,16 +260,17 @@ void GcodeSuite::G34() {
#endif
);
#if HAS_DISPLAY
char msg[30], fstr[16];
char msg[30], fstr1[16], fstr2[16], fstr3[16];
sprintf_P(
PSTR("DIFFERENCE Z1-Z2=%s"
PSTR("Diffs Z1-Z2=%s"
#if NUM_Z_STEPPER_DRIVERS == 3
" Z2-Z3=%s Z3-Z1=%s"
" Z2-Z3=%s"
" Z3-Z1=%s"
#endif
), dtostrf(ABS(z_measured[0] - z_measured[1]), 1, 3, fstr)
), dtostrf(ABS(z_measured[0] - z_measured[1]), 1, 3, fstr1)
#if NUM_Z_STEPPER_DRIVERS == 3
, dtostrf(ABS(z_measured[1] - z_measured[2]), 1, 3, fstr)
, dtostrf(ABS(z_measured[2] - z_measured[0]), 1, 3, fstr)
, dtostrf(ABS(z_measured[1] - z_measured[2]), 1, 3, fstr2)
, dtostrf(ABS(z_measured[2] - z_measured[0]), 1, 3, fstr3)
#endif
);
ui.set_status(msg);
Expand Down
1 change: 1 addition & 0 deletions Marlin/src/lcd/language/language_en.h
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ namespace Language_en {
PROGMEM Language_Str MSG_AUTO_HOME_Z = _UxGT("Home Z");
PROGMEM Language_Str MSG_AUTO_Z_ALIGN = _UxGT("Auto Z-Align");
PROGMEM Language_Str MSG_ASSISTED_TRAMMING = _UxGT("Assisted Tramming");
PROGMEM Language_Str MSG_ITERATION = _UxGT("G34 Iteration: %i");
PROGMEM Language_Str MSG_DECREASING_ACCURACY = _UxGT("Accuracy Decreasing!");
PROGMEM Language_Str MSG_ACCURACY_ACHIEVED = _UxGT("Accuracy Achieved");
PROGMEM Language_Str MSG_LEVEL_BED_HOMING = _UxGT("Homing XYZ");
Expand Down

0 comments on commit a64d38b

Please sign in to comment.