♻️ String helper class (#24390)

This commit is contained in:
Scott Lahteine
2023-06-27 13:19:36 -05:00
committed by GitHub
parent 4a734e4de4
commit 574dd34c49
36 changed files with 955 additions and 598 deletions

View File

@@ -1623,22 +1623,21 @@ void prepare_line_to_destination() {
}
bool homing_needed_error(main_axes_bits_t axis_bits/*=main_axes_mask*/) {
if ((axis_bits &= axes_should_home(axis_bits))) {
char all_axes[] = STR_AXES_MAIN, need[NUM_AXES + 1];
uint8_t n = 0;
LOOP_NUM_AXES(i) if (TEST(axis_bits, i)) need[n++] = all_axes[i];
need[n] = '\0';
if (!(axis_bits &= axes_should_home(axis_bits))) return false;
char msg[30];
sprintf_P(msg, GET_EN_TEXT(MSG_HOME_FIRST), need);
SERIAL_ECHO_START();
SERIAL_ECHOLN(msg);
char all_axes[] = STR_AXES_MAIN, need[NUM_AXES + 1];
uint8_t n = 0;
LOOP_NUM_AXES(i) if (TEST(axis_bits, i)) need[n++] = all_axes[i];
need[n] = '\0';
sprintf_P(msg, GET_TEXT(MSG_HOME_FIRST), need);
ui.set_status(msg);
return true;
}
return false;
SString<30> msg;
msg.setf(GET_EN_TEXT_F(MSG_HOME_FIRST), need);
SERIAL_ECHO_START();
msg.echoln();
msg.setf(GET_TEXT_F(MSG_HOME_FIRST), need);
ui.set_status(msg);
return true;
}
/**