Use a STR_ prefix for non-translated strings
This commit is contained in:
		@@ -41,7 +41,7 @@ void GcodeSuite::G42() {
 | 
			
		||||
    const int8_t iy = hasJ ? parser.value_int() : 0;
 | 
			
		||||
 | 
			
		||||
    if ((hasI && !WITHIN(ix, 0, GRID_MAX_POINTS_X - 1)) || (hasJ && !WITHIN(iy, 0, GRID_MAX_POINTS_Y - 1))) {
 | 
			
		||||
      SERIAL_ECHOLNPGM(MSG_ERR_MESH_XY);
 | 
			
		||||
      SERIAL_ECHOLNPGM(STR_ERR_MESH_XY);
 | 
			
		||||
      return;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -235,7 +235,7 @@ void GcodeSuite::M420() {
 | 
			
		||||
 | 
			
		||||
  // Error if leveling failed to enable or reenable
 | 
			
		||||
  if (to_enable && !planner.leveling_active)
 | 
			
		||||
    SERIAL_ERROR_MSG(MSG_ERR_M420_FAILED);
 | 
			
		||||
    SERIAL_ERROR_MSG(STR_ERR_M420_FAILED);
 | 
			
		||||
 | 
			
		||||
  SERIAL_ECHO_START();
 | 
			
		||||
  SERIAL_ECHOPGM("Bed Leveling ");
 | 
			
		||||
@@ -247,7 +247,7 @@ void GcodeSuite::M420() {
 | 
			
		||||
    if (planner.z_fade_height > 0.0)
 | 
			
		||||
      SERIAL_ECHOLN(planner.z_fade_height);
 | 
			
		||||
    else
 | 
			
		||||
      SERIAL_ECHOLNPGM(MSG_OFF);
 | 
			
		||||
      SERIAL_ECHOLNPGM(STR_OFF);
 | 
			
		||||
  #endif
 | 
			
		||||
 | 
			
		||||
  // Report change in position
 | 
			
		||||
 
 | 
			
		||||
@@ -50,9 +50,9 @@ void GcodeSuite::M421() {
 | 
			
		||||
             hasQ = !hasZ && parser.seen('Q');
 | 
			
		||||
 | 
			
		||||
  if (!hasI || !hasJ || !(hasZ || hasQ))
 | 
			
		||||
    SERIAL_ERROR_MSG(MSG_ERR_M421_PARAMETERS);
 | 
			
		||||
    SERIAL_ERROR_MSG(STR_ERR_M421_PARAMETERS);
 | 
			
		||||
  else if (!WITHIN(ix, 0, GRID_MAX_POINTS_X - 1) || !WITHIN(iy, 0, GRID_MAX_POINTS_Y - 1))
 | 
			
		||||
    SERIAL_ERROR_MSG(MSG_ERR_MESH_XY);
 | 
			
		||||
    SERIAL_ERROR_MSG(STR_ERR_MESH_XY);
 | 
			
		||||
  else {
 | 
			
		||||
    z_values[ix][iy] = parser.value_linear_units() + (hasQ ? z_values[ix][iy] : 0);
 | 
			
		||||
    #if ENABLED(ABL_BILINEAR_SUBDIVISION)
 | 
			
		||||
 
 | 
			
		||||
@@ -49,9 +49,9 @@ void GcodeSuite::M421() {
 | 
			
		||||
  const bool hasZ = parser.seen('Z'), hasQ = !hasZ && parser.seen('Q');
 | 
			
		||||
 | 
			
		||||
  if (int(hasI && hasJ) + int(hasX && hasY) != 1 || !(hasZ || hasQ))
 | 
			
		||||
    SERIAL_ERROR_MSG(MSG_ERR_M421_PARAMETERS);
 | 
			
		||||
    SERIAL_ERROR_MSG(STR_ERR_M421_PARAMETERS);
 | 
			
		||||
  else if (ix < 0 || iy < 0)
 | 
			
		||||
    SERIAL_ERROR_MSG(MSG_ERR_MESH_XY);
 | 
			
		||||
    SERIAL_ERROR_MSG(STR_ERR_MESH_XY);
 | 
			
		||||
  else
 | 
			
		||||
    mbl.set_z(ix, iy, parser.value_linear_units() + (hasQ ? mbl.z_values[ix][iy] : 0));
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
@@ -57,9 +57,9 @@ void GcodeSuite::M421() {
 | 
			
		||||
  if (hasC) ij = ubl.find_closest_mesh_point_of_type(REAL, current_position);
 | 
			
		||||
 | 
			
		||||
  if (int(hasC) + int(hasI && hasJ) != 1 || !(hasZ || hasQ || hasN))
 | 
			
		||||
    SERIAL_ERROR_MSG(MSG_ERR_M421_PARAMETERS);
 | 
			
		||||
    SERIAL_ERROR_MSG(STR_ERR_M421_PARAMETERS);
 | 
			
		||||
  else if (!WITHIN(ij.x, 0, GRID_MAX_POINTS_X - 1) || !WITHIN(ij.y, 0, GRID_MAX_POINTS_Y - 1))
 | 
			
		||||
    SERIAL_ERROR_MSG(MSG_ERR_MESH_XY);
 | 
			
		||||
    SERIAL_ERROR_MSG(STR_ERR_MESH_XY);
 | 
			
		||||
  else {
 | 
			
		||||
    float &zval = ubl.z_values[ij.x][ij.y];
 | 
			
		||||
    zval = hasN ? NAN : parser.value_linear_units() + (hasQ ? zval : 0);
 | 
			
		||||
 
 | 
			
		||||
@@ -118,7 +118,7 @@
 | 
			
		||||
    // Disallow Z homing if X or Y are unknown
 | 
			
		||||
    if (!TEST(axis_known_position, X_AXIS) || !TEST(axis_known_position, Y_AXIS)) {
 | 
			
		||||
      LCD_MESSAGEPGM(MSG_ERR_Z_HOMING);
 | 
			
		||||
      SERIAL_ECHO_MSG(MSG_ERR_Z_HOMING_SER);
 | 
			
		||||
      SERIAL_ECHO_MSG(STR_ERR_Z_HOMING_SER);
 | 
			
		||||
      return;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
@@ -154,7 +154,7 @@
 | 
			
		||||
    }
 | 
			
		||||
    else {
 | 
			
		||||
      LCD_MESSAGEPGM(MSG_ZPROBE_OUT);
 | 
			
		||||
      SERIAL_ECHO_MSG(MSG_ZPROBE_OUT_SER);
 | 
			
		||||
      SERIAL_ECHO_MSG(STR_ZPROBE_OUT_SER);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPGM("<<< home_z_safely");
 | 
			
		||||
@@ -529,7 +529,7 @@ void GcodeSuite::G28(const bool always_home_all) {
 | 
			
		||||
      #define _HOME_SYNC doZ        // Only for Z-axis
 | 
			
		||||
    #endif
 | 
			
		||||
    if (_HOME_SYNC)
 | 
			
		||||
      SERIAL_ECHOLNPGM(MSG_Z_MOVE_COMP);
 | 
			
		||||
      SERIAL_ECHOLNPGM(STR_Z_MOVE_COMP);
 | 
			
		||||
  #endif
 | 
			
		||||
 | 
			
		||||
  if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPGM("<<< G28");
 | 
			
		||||
 
 | 
			
		||||
@@ -82,7 +82,7 @@ void GcodeSuite::M852() {
 | 
			
		||||
  #endif
 | 
			
		||||
 | 
			
		||||
  if (badval)
 | 
			
		||||
    SERIAL_ECHOLNPGM(MSG_SKEW_MIN " " STRINGIFY(SKEW_FACTOR_MIN) " " MSG_SKEW_MAX " " STRINGIFY(SKEW_FACTOR_MAX));
 | 
			
		||||
    SERIAL_ECHOLNPGM(STR_SKEW_MIN " " STRINGIFY(SKEW_FACTOR_MIN) " " STR_SKEW_MAX " " STRINGIFY(SKEW_FACTOR_MAX));
 | 
			
		||||
 | 
			
		||||
  // When skew is changed the current position changes
 | 
			
		||||
  if (setval) {
 | 
			
		||||
 
 | 
			
		||||
@@ -50,7 +50,7 @@ void GcodeSuite::M218() {
 | 
			
		||||
 | 
			
		||||
  if (!parser.seen("XYZ")) {
 | 
			
		||||
    SERIAL_ECHO_START();
 | 
			
		||||
    SERIAL_ECHOPGM(MSG_HOTEND_OFFSET);
 | 
			
		||||
    SERIAL_ECHOPGM(STR_HOTEND_OFFSET);
 | 
			
		||||
    HOTEND_LOOP() {
 | 
			
		||||
      SERIAL_CHAR(' ');
 | 
			
		||||
      SERIAL_ECHO(hotend_offset[e].x);
 | 
			
		||||
 
 | 
			
		||||
@@ -82,7 +82,7 @@ void GcodeSuite::M301() {
 | 
			
		||||
    SERIAL_EOL();
 | 
			
		||||
  }
 | 
			
		||||
  else
 | 
			
		||||
    SERIAL_ERROR_MSG(MSG_INVALID_EXTRUDER);
 | 
			
		||||
    SERIAL_ERROR_MSG(STR_INVALID_EXTRUDER);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
#endif // PIDTEMP
 | 
			
		||||
 
 | 
			
		||||
@@ -28,13 +28,13 @@
 | 
			
		||||
void GcodeSuite::M111() {
 | 
			
		||||
  if (parser.seen('S')) marlin_debug_flags = parser.byteval('S');
 | 
			
		||||
 | 
			
		||||
  static const char str_debug_1[] PROGMEM = MSG_DEBUG_ECHO,
 | 
			
		||||
                    str_debug_2[] PROGMEM = MSG_DEBUG_INFO,
 | 
			
		||||
                    str_debug_4[] PROGMEM = MSG_DEBUG_ERRORS,
 | 
			
		||||
                    str_debug_8[] PROGMEM = MSG_DEBUG_DRYRUN,
 | 
			
		||||
                    str_debug_16[] PROGMEM = MSG_DEBUG_COMMUNICATION
 | 
			
		||||
  static const char str_debug_1[] PROGMEM = STR_DEBUG_ECHO,
 | 
			
		||||
                    str_debug_2[] PROGMEM = STR_DEBUG_INFO,
 | 
			
		||||
                    str_debug_4[] PROGMEM = STR_DEBUG_ERRORS,
 | 
			
		||||
                    str_debug_8[] PROGMEM = STR_DEBUG_DRYRUN,
 | 
			
		||||
                    str_debug_16[] PROGMEM = STR_DEBUG_COMMUNICATION
 | 
			
		||||
                    #if ENABLED(DEBUG_LEVELING_FEATURE)
 | 
			
		||||
                      , str_debug_lvl[] PROGMEM = MSG_DEBUG_LEVELING
 | 
			
		||||
                      , str_debug_lvl[] PROGMEM = STR_DEBUG_LEVELING
 | 
			
		||||
                    #endif
 | 
			
		||||
                    ;
 | 
			
		||||
 | 
			
		||||
@@ -46,7 +46,7 @@ void GcodeSuite::M111() {
 | 
			
		||||
  };
 | 
			
		||||
 | 
			
		||||
  SERIAL_ECHO_START();
 | 
			
		||||
  SERIAL_ECHOPGM(MSG_DEBUG_PREFIX);
 | 
			
		||||
  SERIAL_ECHOPGM(STR_DEBUG_PREFIX);
 | 
			
		||||
  if (marlin_debug_flags) {
 | 
			
		||||
    uint8_t comma = 0;
 | 
			
		||||
    for (uint8_t i = 0; i < COUNT(debug_strings); i++) {
 | 
			
		||||
@@ -57,7 +57,7 @@ void GcodeSuite::M111() {
 | 
			
		||||
    }
 | 
			
		||||
  }
 | 
			
		||||
  else {
 | 
			
		||||
    SERIAL_ECHOPGM(MSG_DEBUG_OFF);
 | 
			
		||||
    SERIAL_ECHOPGM(STR_DEBUG_OFF);
 | 
			
		||||
    #if !defined(__AVR__) || !defined(USBCON)
 | 
			
		||||
      #if ENABLED(SERIAL_STATS_RX_BUFFER_OVERRUNS)
 | 
			
		||||
        SERIAL_ECHOPAIR("\nBuffer Overruns: ", MYSERIAL0.buffer_overruns());
 | 
			
		||||
 
 | 
			
		||||
@@ -36,11 +36,11 @@ void GcodeSuite::M211() {
 | 
			
		||||
  const xyz_pos_t l_soft_min = soft_endstop.min.asLogical(),
 | 
			
		||||
                  l_soft_max = soft_endstop.max.asLogical();
 | 
			
		||||
  SERIAL_ECHO_START();
 | 
			
		||||
  SERIAL_ECHOPGM(MSG_SOFT_ENDSTOPS);
 | 
			
		||||
  SERIAL_ECHOPGM(STR_SOFT_ENDSTOPS);
 | 
			
		||||
  if (parser.seen('S')) soft_endstops_enabled = parser.value_bool();
 | 
			
		||||
  serialprint_onoff(soft_endstops_enabled);
 | 
			
		||||
  print_xyz(l_soft_min, PSTR(MSG_SOFT_MIN), PSTR(" "));
 | 
			
		||||
  print_xyz(l_soft_max, PSTR(MSG_SOFT_MAX));
 | 
			
		||||
  print_xyz(l_soft_min, PSTR(STR_SOFT_MIN), PSTR(" "));
 | 
			
		||||
  print_xyz(l_soft_max, PSTR(STR_SOFT_MAX));
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
#endif
 | 
			
		||||
 
 | 
			
		||||
@@ -167,7 +167,7 @@
 | 
			
		||||
      extruder_duplication_enabled = ena && (duplication_e_mask >= 3);
 | 
			
		||||
    }
 | 
			
		||||
    SERIAL_ECHO_START();
 | 
			
		||||
    SERIAL_ECHOPGM(MSG_DUPLICATION_MODE);
 | 
			
		||||
    SERIAL_ECHOPGM(STR_DUPLICATION_MODE);
 | 
			
		||||
    serialprint_onoff(extruder_duplication_enabled);
 | 
			
		||||
    if (ena) {
 | 
			
		||||
      SERIAL_ECHOPGM(" ( ");
 | 
			
		||||
 
 | 
			
		||||
@@ -110,6 +110,6 @@ void GcodeSuite::M81() {
 | 
			
		||||
  #endif
 | 
			
		||||
 | 
			
		||||
  #if HAS_LCD_MENU
 | 
			
		||||
    LCD_MESSAGEPGM_P(PSTR(MACHINE_NAME " " MSG_OFF "."));
 | 
			
		||||
    LCD_MESSAGEPGM_P(PSTR(MACHINE_NAME " " STR_OFF "."));
 | 
			
		||||
  #endif
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
@@ -40,7 +40,7 @@ void GcodeSuite::G60() {
 | 
			
		||||
  const uint8_t slot = parser.byteval('S');
 | 
			
		||||
 | 
			
		||||
  if (slot >= SAVED_POSITIONS) {
 | 
			
		||||
    SERIAL_ERROR_MSG(MSG_INVALID_POS_SLOT STRINGIFY(SAVED_POSITIONS));
 | 
			
		||||
    SERIAL_ERROR_MSG(STR_INVALID_POS_SLOT STRINGIFY(SAVED_POSITIONS));
 | 
			
		||||
    return;
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
@@ -49,7 +49,7 @@ void GcodeSuite::G60() {
 | 
			
		||||
 | 
			
		||||
  #if ENABLED(SAVED_POSITIONS_DEBUG)
 | 
			
		||||
    const xyze_pos_t &pos = stored_position[slot];
 | 
			
		||||
    DEBUG_ECHOPAIR_F(MSG_SAVED_POS " S", slot);
 | 
			
		||||
    DEBUG_ECHOPAIR_F(STR_SAVED_POS " S", slot);
 | 
			
		||||
    DEBUG_ECHOPAIR_F(" : X", pos.x);
 | 
			
		||||
    DEBUG_ECHOPAIR_F_P(SP_Y_STR, pos.y);
 | 
			
		||||
    DEBUG_ECHOLNPAIR_F_P(SP_Z_STR, pos.z);
 | 
			
		||||
 
 | 
			
		||||
@@ -42,7 +42,7 @@ void GcodeSuite::G61(void) {
 | 
			
		||||
 | 
			
		||||
  #if SAVED_POSITIONS < 256
 | 
			
		||||
    if (slot >= SAVED_POSITIONS) {
 | 
			
		||||
      SERIAL_ERROR_MSG(MSG_INVALID_POS_SLOT STRINGIFY(SAVED_POSITIONS));
 | 
			
		||||
      SERIAL_ERROR_MSG(STR_INVALID_POS_SLOT STRINGIFY(SAVED_POSITIONS));
 | 
			
		||||
      return;
 | 
			
		||||
    }
 | 
			
		||||
  #endif
 | 
			
		||||
@@ -54,7 +54,7 @@ void GcodeSuite::G61(void) {
 | 
			
		||||
  const float fr = parser.linearval('F');
 | 
			
		||||
  if (fr > 0.0) feedrate_mm_s = MMM_TO_MMS(fr);
 | 
			
		||||
 | 
			
		||||
  SERIAL_ECHOPAIR(MSG_RESTORING_POS " S", int(slot));
 | 
			
		||||
  SERIAL_ECHOPAIR(STR_RESTORING_POS " S", int(slot));
 | 
			
		||||
  LOOP_XYZ(i) {
 | 
			
		||||
    destination[i] = parser.seen(axis_codes[i])
 | 
			
		||||
      ? stored_position[slot][i] + parser.value_axis_units((AxisEnum)i)
 | 
			
		||||
 
 | 
			
		||||
@@ -94,7 +94,7 @@ int8_t GcodeSuite::get_target_extruder_from_command() {
 | 
			
		||||
    if (e < EXTRUDERS) return e;
 | 
			
		||||
    SERIAL_ECHO_START();
 | 
			
		||||
    SERIAL_CHAR('M'); SERIAL_ECHO(parser.codenum);
 | 
			
		||||
    SERIAL_ECHOLNPAIR(" " MSG_INVALID_EXTRUDER " ", int(e));
 | 
			
		||||
    SERIAL_ECHOLNPAIR(" " STR_INVALID_EXTRUDER " ", int(e));
 | 
			
		||||
    return -1;
 | 
			
		||||
  }
 | 
			
		||||
  return active_extruder;
 | 
			
		||||
@@ -111,9 +111,9 @@ int8_t GcodeSuite::get_target_e_stepper_from_command() {
 | 
			
		||||
  SERIAL_ECHO_START();
 | 
			
		||||
  SERIAL_CHAR('M'); SERIAL_ECHO(parser.codenum);
 | 
			
		||||
  if (e == -1)
 | 
			
		||||
    SERIAL_ECHOLNPGM(" " MSG_E_STEPPER_NOT_SPECIFIED);
 | 
			
		||||
    SERIAL_ECHOLNPGM(" " STR_E_STEPPER_NOT_SPECIFIED);
 | 
			
		||||
  else
 | 
			
		||||
    SERIAL_ECHOLNPAIR(" " MSG_INVALID_E_STEPPER " ", int(e));
 | 
			
		||||
    SERIAL_ECHOLNPAIR(" " STR_INVALID_E_STEPPER " ", int(e));
 | 
			
		||||
  return -1;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
@@ -951,13 +951,13 @@ void GcodeSuite::process_subcommands_now(char * gcode) {
 | 
			
		||||
      switch (busy_state) {
 | 
			
		||||
        case IN_HANDLER:
 | 
			
		||||
        case IN_PROCESS:
 | 
			
		||||
          SERIAL_ECHO_MSG(MSG_BUSY_PROCESSING);
 | 
			
		||||
          SERIAL_ECHO_MSG(STR_BUSY_PROCESSING);
 | 
			
		||||
          break;
 | 
			
		||||
        case PAUSED_FOR_USER:
 | 
			
		||||
          SERIAL_ECHO_MSG(MSG_BUSY_PAUSED_FOR_USER);
 | 
			
		||||
          SERIAL_ECHO_MSG(STR_BUSY_PAUSED_FOR_USER);
 | 
			
		||||
          break;
 | 
			
		||||
        case PAUSED_FOR_INPUT:
 | 
			
		||||
          SERIAL_ECHO_MSG(MSG_BUSY_PAUSED_FOR_INPUT);
 | 
			
		||||
          SERIAL_ECHO_MSG(STR_BUSY_PAUSED_FOR_INPUT);
 | 
			
		||||
          break;
 | 
			
		||||
        default:
 | 
			
		||||
          break;
 | 
			
		||||
 
 | 
			
		||||
@@ -69,7 +69,7 @@ void GcodeSuite::M428() {
 | 
			
		||||
    if (!WITHIN(diff[i], -20, 20) && home_dir((AxisEnum)i) > 0)
 | 
			
		||||
      diff[i] = -current_position[i];
 | 
			
		||||
    if (!WITHIN(diff[i], -20, 20)) {
 | 
			
		||||
      SERIAL_ERROR_MSG(MSG_ERR_M428_TOO_FAR);
 | 
			
		||||
      SERIAL_ERROR_MSG(STR_ERR_M428_TOO_FAR);
 | 
			
		||||
      LCD_ALERTMESSAGEPGM_P(PSTR("Err: Too far!"));
 | 
			
		||||
      BUZZ(200, 40);
 | 
			
		||||
      return;
 | 
			
		||||
 
 | 
			
		||||
@@ -39,7 +39,7 @@
 | 
			
		||||
 */
 | 
			
		||||
void GcodeSuite::M115() {
 | 
			
		||||
 | 
			
		||||
  SERIAL_ECHOLNPGM(MSG_M115_REPORT);
 | 
			
		||||
  SERIAL_ECHOLNPGM(STR_M115_REPORT);
 | 
			
		||||
 | 
			
		||||
  #if ENABLED(EXTENDED_CAPABILITIES_REPORT)
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -38,7 +38,7 @@
 | 
			
		||||
void GcodeSuite::M145() {
 | 
			
		||||
  const uint8_t material = (uint8_t)parser.intval('S');
 | 
			
		||||
  if (material >= COUNT(ui.preheat_hotend_temp))
 | 
			
		||||
    SERIAL_ERROR_MSG(MSG_ERR_MATERIAL_INDEX);
 | 
			
		||||
    SERIAL_ERROR_MSG(STR_ERR_MATERIAL_INDEX);
 | 
			
		||||
  else {
 | 
			
		||||
    int v;
 | 
			
		||||
    if (parser.seenval('H')) {
 | 
			
		||||
 
 | 
			
		||||
@@ -118,7 +118,7 @@ void GcodeSuite::G0_G1(
 | 
			
		||||
      #endif
 | 
			
		||||
      if (_MOVE_SYNC) {
 | 
			
		||||
        planner.synchronize();
 | 
			
		||||
        SERIAL_ECHOLNPGM(MSG_Z_MOVE_COMP);
 | 
			
		||||
        SERIAL_ECHOLNPGM(STR_Z_MOVE_COMP);
 | 
			
		||||
      }
 | 
			
		||||
    #endif
 | 
			
		||||
  }
 | 
			
		||||
 
 | 
			
		||||
@@ -327,7 +327,7 @@ void GcodeSuite::G2_G3(const bool clockwise) {
 | 
			
		||||
        // P indicates number of circles to do
 | 
			
		||||
        int8_t circles_to_do = parser.byteval('P');
 | 
			
		||||
        if (!WITHIN(circles_to_do, 0, 100))
 | 
			
		||||
          SERIAL_ERROR_MSG(MSG_ERR_ARC_ARGS);
 | 
			
		||||
          SERIAL_ERROR_MSG(STR_ERR_ARC_ARGS);
 | 
			
		||||
 | 
			
		||||
        while (circles_to_do--)
 | 
			
		||||
          plan_arc(current_position, arc_offset, clockwise);
 | 
			
		||||
@@ -338,7 +338,7 @@ void GcodeSuite::G2_G3(const bool clockwise) {
 | 
			
		||||
      reset_stepper_timeout();
 | 
			
		||||
    }
 | 
			
		||||
    else
 | 
			
		||||
      SERIAL_ERROR_MSG(MSG_ERR_ARC_ARGS);
 | 
			
		||||
      SERIAL_ERROR_MSG(STR_ERR_ARC_ARGS);
 | 
			
		||||
  }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -35,7 +35,7 @@ void GcodeSuite::G4() {
 | 
			
		||||
 | 
			
		||||
  planner.synchronize();
 | 
			
		||||
  #if ENABLED(NANODLP_Z_SYNC)
 | 
			
		||||
    SERIAL_ECHOLNPGM(MSG_Z_MOVE_COMP);
 | 
			
		||||
    SERIAL_ECHOLNPGM(STR_Z_MOVE_COMP);
 | 
			
		||||
  #endif
 | 
			
		||||
 | 
			
		||||
  if (!ui.has_status()) LCD_MESSAGEPGM(MSG_DWELL);
 | 
			
		||||
 
 | 
			
		||||
@@ -45,7 +45,7 @@ void GcodeSuite::G5() {
 | 
			
		||||
 | 
			
		||||
    #if ENABLED(CNC_WORKSPACE_PLANES)
 | 
			
		||||
      if (workspace_plane != PLANE_XY) {
 | 
			
		||||
        SERIAL_ERROR_MSG(MSG_ERR_BAD_PLANE_MODE);
 | 
			
		||||
        SERIAL_ERROR_MSG(STR_ERR_BAD_PLANE_MODE);
 | 
			
		||||
        return;
 | 
			
		||||
      }
 | 
			
		||||
    #endif
 | 
			
		||||
 
 | 
			
		||||
@@ -48,13 +48,13 @@
 | 
			
		||||
    ) {
 | 
			
		||||
      probe.offset.z += offs;
 | 
			
		||||
      SERIAL_ECHO_START();
 | 
			
		||||
      SERIAL_ECHOLNPAIR(MSG_PROBE_OFFSET MSG_Z ": ", probe.offset.z);
 | 
			
		||||
      SERIAL_ECHOLNPAIR(STR_PROBE_OFFSET STR_Z ": ", probe.offset.z);
 | 
			
		||||
    }
 | 
			
		||||
    else {
 | 
			
		||||
      #if ENABLED(BABYSTEP_HOTEND_Z_OFFSET)
 | 
			
		||||
        hotend_offset[active_extruder].z -= offs;
 | 
			
		||||
        SERIAL_ECHO_START();
 | 
			
		||||
        SERIAL_ECHOLNPAIR(MSG_PROBE_OFFSET MSG_Z ": ", hotend_offset[active_extruder].z);
 | 
			
		||||
        SERIAL_ECHOLNPAIR(STR_PROBE_OFFSET STR_Z ": ", hotend_offset[active_extruder].z);
 | 
			
		||||
      #endif
 | 
			
		||||
    }
 | 
			
		||||
  }
 | 
			
		||||
@@ -98,7 +98,7 @@ void GcodeSuite::M290() {
 | 
			
		||||
    SERIAL_ECHO_START();
 | 
			
		||||
 | 
			
		||||
    #if ENABLED(BABYSTEP_ZPROBE_OFFSET)
 | 
			
		||||
      SERIAL_ECHOLNPAIR(MSG_PROBE_OFFSET " " MSG_Z, probe.offset.z);
 | 
			
		||||
      SERIAL_ECHOLNPAIR(STR_PROBE_OFFSET " " STR_Z, probe.offset.z);
 | 
			
		||||
    #endif
 | 
			
		||||
 | 
			
		||||
    #if ENABLED(BABYSTEP_HOTEND_Z_OFFSET)
 | 
			
		||||
 
 | 
			
		||||
@@ -365,7 +365,7 @@ void GCodeParser::parse(char *p) {
 | 
			
		||||
#endif // CNC_COORDINATE_SYSTEMS
 | 
			
		||||
 | 
			
		||||
void GCodeParser::unknown_command_warning() {
 | 
			
		||||
  SERIAL_ECHO_MSG(MSG_UNKNOWN_COMMAND, command_ptr, "\"");
 | 
			
		||||
  SERIAL_ECHO_MSG(STR_UNKNOWN_COMMAND, command_ptr, "\"");
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
#if ENABLED(DEBUG_GCODE_PARSER)
 | 
			
		||||
 
 | 
			
		||||
@@ -39,9 +39,9 @@ void GcodeSuite::M851() {
 | 
			
		||||
  if (!parser.seen("XYZ")) {
 | 
			
		||||
    SERIAL_ECHOLNPAIR_P(
 | 
			
		||||
      #if HAS_PROBE_XY_OFFSET
 | 
			
		||||
        PSTR(MSG_PROBE_OFFSET " X"), probe.offset_xy.x, SP_Y_STR, probe.offset_xy.y, SP_Z_STR
 | 
			
		||||
        PSTR(STR_PROBE_OFFSET " X"), probe.offset_xy.x, SP_Y_STR, probe.offset_xy.y, SP_Z_STR
 | 
			
		||||
      #else
 | 
			
		||||
        PSTR(MSG_PROBE_OFFSET " X0 Y0 Z")
 | 
			
		||||
        PSTR(STR_PROBE_OFFSET " X0 Y0 Z")
 | 
			
		||||
      #endif
 | 
			
		||||
      , probe.offset.z
 | 
			
		||||
    );
 | 
			
		||||
 
 | 
			
		||||
@@ -163,7 +163,7 @@ bool GCodeQueue::enqueue_one(const char* cmd) {
 | 
			
		||||
  if (*cmd == 0 || *cmd == '\n' || *cmd == '\r') return true;
 | 
			
		||||
 | 
			
		||||
  if (_enqueue(cmd)) {
 | 
			
		||||
    SERIAL_ECHO_MSG(MSG_ENQUEUEING, cmd, "\"");
 | 
			
		||||
    SERIAL_ECHO_MSG(STR_ENQUEUEING, cmd, "\"");
 | 
			
		||||
    return true;
 | 
			
		||||
  }
 | 
			
		||||
  return false;
 | 
			
		||||
@@ -244,7 +244,7 @@ void GCodeQueue::ok_to_send() {
 | 
			
		||||
    PORT_REDIRECT(pn);                    // Reply to the serial port that sent the command
 | 
			
		||||
  #endif
 | 
			
		||||
  if (!send_ok[index_r]) return;
 | 
			
		||||
  SERIAL_ECHOPGM(MSG_OK);
 | 
			
		||||
  SERIAL_ECHOPGM(STR_OK);
 | 
			
		||||
  #if ENABLED(ADVANCED_OK)
 | 
			
		||||
    char* p = command_buffer[index_r];
 | 
			
		||||
    if (*p == 'N') {
 | 
			
		||||
@@ -270,7 +270,7 @@ void GCodeQueue::flush_and_request_resend() {
 | 
			
		||||
    PORT_REDIRECT(pn);                    // Reply to the serial port that sent the command
 | 
			
		||||
  #endif
 | 
			
		||||
  SERIAL_FLUSH();
 | 
			
		||||
  SERIAL_ECHOPGM(MSG_RESEND);
 | 
			
		||||
  SERIAL_ECHOPGM(STR_RESEND);
 | 
			
		||||
  SERIAL_ECHOLN(last_N + 1);
 | 
			
		||||
  ok_to_send();
 | 
			
		||||
}
 | 
			
		||||
@@ -397,7 +397,7 @@ void GCodeQueue::get_serial_commands() {
 | 
			
		||||
    static millis_t last_command_time = 0;
 | 
			
		||||
    const millis_t ms = millis();
 | 
			
		||||
    if (length == 0 && !serial_data_available() && ELAPSED(ms, last_command_time + NO_TIMEOUTS)) {
 | 
			
		||||
      SERIAL_ECHOLNPGM(MSG_WAIT);
 | 
			
		||||
      SERIAL_ECHOLNPGM(STR_WAIT);
 | 
			
		||||
      last_command_time = ms;
 | 
			
		||||
    }
 | 
			
		||||
  #endif
 | 
			
		||||
@@ -436,24 +436,24 @@ void GCodeQueue::get_serial_commands() {
 | 
			
		||||
          gcode_N = strtol(npos + 1, nullptr, 10);
 | 
			
		||||
 | 
			
		||||
          if (gcode_N != last_N + 1 && !M110)
 | 
			
		||||
            return gcode_line_error(PSTR(MSG_ERR_LINE_NO), i);
 | 
			
		||||
            return gcode_line_error(PSTR(STR_ERR_LINE_NO), i);
 | 
			
		||||
 | 
			
		||||
          char *apos = strrchr(command, '*');
 | 
			
		||||
          if (apos) {
 | 
			
		||||
            uint8_t checksum = 0, count = uint8_t(apos - command);
 | 
			
		||||
            while (count) checksum ^= command[--count];
 | 
			
		||||
            if (strtol(apos + 1, nullptr, 10) != checksum)
 | 
			
		||||
              return gcode_line_error(PSTR(MSG_ERR_CHECKSUM_MISMATCH), i);
 | 
			
		||||
              return gcode_line_error(PSTR(STR_ERR_CHECKSUM_MISMATCH), i);
 | 
			
		||||
          }
 | 
			
		||||
          else
 | 
			
		||||
            return gcode_line_error(PSTR(MSG_ERR_NO_CHECKSUM), i);
 | 
			
		||||
            return gcode_line_error(PSTR(STR_ERR_NO_CHECKSUM), i);
 | 
			
		||||
 | 
			
		||||
          last_N = gcode_N;
 | 
			
		||||
        }
 | 
			
		||||
        #if ENABLED(SDSUPPORT)
 | 
			
		||||
          // Pronterface "M29" and "M29 " has no line number
 | 
			
		||||
          else if (card.flag.saving && !is_M29(command))
 | 
			
		||||
            return gcode_line_error(PSTR(MSG_ERR_NO_CHECKSUM), i);
 | 
			
		||||
            return gcode_line_error(PSTR(STR_ERR_NO_CHECKSUM), i);
 | 
			
		||||
        #endif
 | 
			
		||||
 | 
			
		||||
        //
 | 
			
		||||
@@ -472,7 +472,7 @@ void GCodeQueue::get_serial_commands() {
 | 
			
		||||
                case 5:
 | 
			
		||||
              #endif
 | 
			
		||||
                PORT_REDIRECT(i);                      // Reply to the serial port that sent the command
 | 
			
		||||
                SERIAL_ECHOLNPGM(MSG_ERR_STOPPED);
 | 
			
		||||
                SERIAL_ECHOLNPGM(STR_ERR_STOPPED);
 | 
			
		||||
                LCD_MESSAGEPGM(MSG_STOPPED);
 | 
			
		||||
                break;
 | 
			
		||||
            }
 | 
			
		||||
@@ -527,7 +527,7 @@ void GCodeQueue::get_serial_commands() {
 | 
			
		||||
    while (length < BUFSIZE && !card_eof) {
 | 
			
		||||
      const int16_t n = card.get();
 | 
			
		||||
      card_eof = card.eof();
 | 
			
		||||
      if (n < 0 && !card_eof) { SERIAL_ERROR_MSG(MSG_SD_ERR_READ); continue; }
 | 
			
		||||
      if (n < 0 && !card_eof) { SERIAL_ERROR_MSG(STR_SD_ERR_READ); continue; }
 | 
			
		||||
 | 
			
		||||
      const char sd_char = (char)n;
 | 
			
		||||
      const bool is_eol = sd_char == '\n' || sd_char == '\r';
 | 
			
		||||
@@ -585,7 +585,7 @@ void GCodeQueue::advance() {
 | 
			
		||||
      if (is_M29(command)) {
 | 
			
		||||
        // M29 closes the file
 | 
			
		||||
        card.closefile();
 | 
			
		||||
        SERIAL_ECHOLNPGM(MSG_FILE_SAVED);
 | 
			
		||||
        SERIAL_ECHOLNPGM(STR_FILE_SAVED);
 | 
			
		||||
 | 
			
		||||
        #if !defined(__AVR__) || !defined(USBCON)
 | 
			
		||||
          #if ENABLED(SERIAL_STATS_DROPPED_RX)
 | 
			
		||||
 
 | 
			
		||||
@@ -31,9 +31,9 @@
 | 
			
		||||
 * M20: List SD card to serial output
 | 
			
		||||
 */
 | 
			
		||||
void GcodeSuite::M20() {
 | 
			
		||||
  SERIAL_ECHOLNPGM(MSG_BEGIN_FILE_LIST);
 | 
			
		||||
  SERIAL_ECHOLNPGM(STR_BEGIN_FILE_LIST);
 | 
			
		||||
  card.ls();
 | 
			
		||||
  SERIAL_ECHOLNPGM(MSG_END_FILE_LIST);
 | 
			
		||||
  SERIAL_ECHOLNPGM(STR_END_FILE_LIST);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
#endif // SDSUPPORT
 | 
			
		||||
 
 | 
			
		||||
@@ -31,7 +31,7 @@ void GcodeSuite::M105() {
 | 
			
		||||
  const int8_t target_extruder = get_target_extruder_from_command();
 | 
			
		||||
  if (target_extruder < 0) return;
 | 
			
		||||
 | 
			
		||||
  SERIAL_ECHOPGM(MSG_OK);
 | 
			
		||||
  SERIAL_ECHOPGM(STR_OK);
 | 
			
		||||
 | 
			
		||||
  #if HAS_TEMP_SENSOR
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -52,7 +52,7 @@ void GcodeSuite::M303() {
 | 
			
		||||
  #endif
 | 
			
		||||
  const heater_ind_t e = (heater_ind_t)parser.intval('E');
 | 
			
		||||
  if (!WITHIN(e, SI, EI)) {
 | 
			
		||||
    SERIAL_ECHOLNPGM(MSG_PID_BAD_EXTRUDER_NUM);
 | 
			
		||||
    SERIAL_ECHOLNPGM(STR_PID_BAD_EXTRUDER_NUM);
 | 
			
		||||
    #if ENABLED(EXTENSIBLE_UI)
 | 
			
		||||
      ExtUI::OnPidTuning(ExtUI::result_t::PID_BAD_EXTRUDER_NUM);
 | 
			
		||||
    #endif
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user