浏览代码

Fix G35 PROGMEM strings (#19926)

Speaka 4 年前
父节点
当前提交
2cae26ee35
没有帐户链接到提交者的电子邮件
共有 1 个文件被更改,包括 10 次插入6 次删除
  1. 10
    6
      Marlin/src/gcode/bedlevel/G35.cpp

+ 10
- 6
Marlin/src/gcode/bedlevel/G35.cpp 查看文件

129
     const float z_probed_height = probe.probe_at_point(screws_tilt_adjust_pos[i], PROBE_PT_RAISE, 0, true);
129
     const float z_probed_height = probe.probe_at_point(screws_tilt_adjust_pos[i], PROBE_PT_RAISE, 0, true);
130
 
130
 
131
     if (isnan(z_probed_height)) {
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
       SERIAL_ECHOLNPAIR_P(SP_X_STR, screws_tilt_adjust_pos[i].x, SP_Y_STR, screws_tilt_adjust_pos[i].y);
135
       SERIAL_ECHOLNPAIR_P(SP_X_STR, screws_tilt_adjust_pos[i].x, SP_Y_STR, screws_tilt_adjust_pos[i].y);
134
       err_break = true;
136
       err_break = true;
135
       break;
137
       break;
136
     }
138
     }
137
 
139
 
138
     if (DEBUGGING(LEVELING)) {
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
     z_measured[i] = z_probed_height;
147
     z_measured[i] = z_probed_height;
155
       const float decimal_part = adjust - float(full_turns);
159
       const float decimal_part = adjust - float(full_turns);
156
       const int minutes = trunc(decimal_part * 60.0f);
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
       if (minutes) SERIAL_ECHOPAIR(" and ", abs(minutes), " minutes");
165
       if (minutes) SERIAL_ECHOPAIR(" and ", abs(minutes), " minutes");
162
       if (ENABLED(REPORT_TRAMMING_MM)) SERIAL_ECHOPAIR(" (", -diff, "mm)");
166
       if (ENABLED(REPORT_TRAMMING_MM)) SERIAL_ECHOPAIR(" (", -diff, "mm)");
163
       SERIAL_EOL();
167
       SERIAL_EOL();

正在加载...
取消
保存