Kaynağa Gözat

Fix G35 PROGMEM strings (#19926)

Speaka 4 yıl önce
ebeveyn
işleme
2cae26ee35
No account linked to committer's email address
1 değiştirilmiş dosya ile 10 ekleme ve 6 silme
  1. 10
    6
      Marlin/src/gcode/bedlevel/G35.cpp

+ 10
- 6
Marlin/src/gcode/bedlevel/G35.cpp Dosyayı Görüntüle

@@ -129,15 +129,19 @@ void GcodeSuite::G35() {
129 129
     const float z_probed_height = probe.probe_at_point(screws_tilt_adjust_pos[i], PROBE_PT_RAISE, 0, true);
130 130
 
131 131
     if (isnan(z_probed_height)) {
132
-      SERIAL_ECHOPAIR("G35 failed at point ", int(i), " (", tramming_point_name[i], ")");
132
+      SERIAL_ECHOPAIR("G35 failed at point ", int(i), " (");
133
+      SERIAL_ECHOPGM_P((char *)pgm_read_ptr(&tramming_point_name[i]));
134
+      SERIAL_CHAR(')');
133 135
       SERIAL_ECHOLNPAIR_P(SP_X_STR, screws_tilt_adjust_pos[i].x, SP_Y_STR, screws_tilt_adjust_pos[i].y);
134 136
       err_break = true;
135 137
       break;
136 138
     }
137 139
 
138 140
     if (DEBUGGING(LEVELING)) {
139
-      DEBUG_ECHOPAIR("Probing point ", int(i), " (", tramming_point_name[i], ")");
140
-      SERIAL_ECHOLNPAIR_P(SP_X_STR, screws_tilt_adjust_pos[i].x, SP_Y_STR, screws_tilt_adjust_pos[i].y, SP_Z_STR, z_probed_height);
141
+      DEBUG_ECHOPAIR("Probing point ", int(i), " (");
142
+      DEBUG_PRINT_P((char *)pgm_read_ptr(&tramming_point_name[i]));
143
+      DEBUG_CHAR(')');
144
+      DEBUG_ECHOLNPAIR_P(SP_X_STR, screws_tilt_adjust_pos[i].x, SP_Y_STR, screws_tilt_adjust_pos[i].y, SP_Z_STR, z_probed_height);
141 145
     }
142 146
 
143 147
     z_measured[i] = z_probed_height;
@@ -155,9 +159,9 @@ void GcodeSuite::G35() {
155 159
       const float decimal_part = adjust - float(full_turns);
156 160
       const int minutes = trunc(decimal_part * 60.0f);
157 161
 
158
-      SERIAL_ECHOPAIR("Turn ", tramming_point_name[i],
159
-             " ", (screw_thread & 1) == (adjust > 0) ? "CCW" : "CW",
160
-             " by ", abs(full_turns), " turns");
162
+      SERIAL_ECHOPGM("Turn ");
163
+      SERIAL_ECHOPGM_P((char *)pgm_read_ptr(&tramming_point_name[i]));
164
+      SERIAL_ECHOPAIR(" ", (screw_thread & 1) == (adjust > 0) ? "CCW" : "CW", " by ", abs(full_turns), " turns");
161 165
       if (minutes) SERIAL_ECHOPAIR(" and ", abs(minutes), " minutes");
162 166
       if (ENABLED(REPORT_TRAMMING_MM)) SERIAL_ECHOPAIR(" (", -diff, "mm)");
163 167
       SERIAL_EOL();

Loading…
İptal
Kaydet