Scott Lahteine 4 лет назад
Родитель
Сommit
e5d39063a2
2 измененных файлов: 15 добавлений и 15 удалений
  1. 8
    8
      Marlin/src/feature/probe_temp_compensation.h
  2. 7
    7
      Marlin/src/gcode/calibrate/G76_M871.cpp

+ 8
- 8
Marlin/src/feature/probe_temp_compensation.h Просмотреть файл

@@ -57,16 +57,16 @@ class ProbeTempComp {
57 57
     static const temp_calib_t cali_info[TSI_COUNT];
58 58
 
59 59
     // Where to park nozzle to wait for probe cooldown
60
-    static constexpr xyz_pos_t park_point = xyz_pos_t({ PTC_PARK_POS_X, PTC_PARK_POS_Y, PTC_PARK_POS_Z });
60
+    static constexpr float park_point_x = PTC_PARK_POS_X,
61
+                           park_point_y = PTC_PARK_POS_Y,
62
+                           park_point_z = PTC_PARK_POS_Z,
63
+                           // XY coordinates of nozzle for probing the bed
64
+                           measure_point_x     = PTC_PROBE_POS_X,   // Coordinates to probe
65
+                           measure_point_y     = PTC_PROBE_POS_Y;
66
+                           //measure_point_x     = 12.0f,           // Coordinates to probe on MK52 magnetic heatbed
67
+                           //measure_point_y     =  7.3f;
61 68
 
62 69
     static constexpr int  max_bed_temp         = PTC_MAX_BED_TEMP,  // Max temperature to avoid heating errors
63
-
64
-                          // XY coordinates of nozzle for probing the bed
65
-                          measure_point_x      = PTC_PROBE_POS_X,   // X-coordinate to probe
66
-                          measure_point_y      = PTC_PROBE_POS_Y,   // Y-coordinate to probe
67
-                          //measure_point_x    = 12.0f,             // X-coordinate to probe on MK52 magnetic heatbed
68
-                          //measure_point_y    =  7.3f,             // Y-coordinate to probe on MK52 magnetic heatbed
69
-
70 70
                           probe_calib_bed_temp = max_bed_temp,      // Bed temperature while calibrating probe
71 71
                           bed_calib_probe_temp = 30;                // Probe temperature while calibrating bed
72 72
 

+ 7
- 7
Marlin/src/gcode/calibrate/G76_M871.cpp Просмотреть файл

@@ -105,8 +105,8 @@ void GcodeSuite::G76() {
105 105
 
106 106
   if (do_bed_cal || do_probe_cal) {
107 107
     // Ensure park position is reachable
108
-    if (!position_is_reachable(ProbeTempComp::park_point.x, ProbeTempComp::park_point.y)
109
-      || !(WITHIN(ProbeTempComp::park_point.z, Z_MIN_POS - 0.001f, Z_MAX_POS + 0.001f))
108
+    if (!position_is_reachable(temp_comp.park_point_x, temp_comp.park_point_y)
109
+      || !(WITHIN(temp_comp.park_point_z, Z_MIN_POS - 0.001f, Z_MAX_POS + 0.001f))
110 110
     ) {
111 111
       SERIAL_ECHOLNPGM("!Park position unreachable - aborting.");
112 112
       return;
@@ -161,7 +161,7 @@ void GcodeSuite::G76() {
161 161
       SERIAL_ECHOLNPAIR("Target Bed: ", target_bed, "; Probe: ", target_probe);
162 162
 
163 163
       // Park nozzle
164
-      do_blocking_move_to(ProbeTempComp::park_point.x, ProbeTempComp::park_point.y, ProbeTempComp::park_point.z);
164
+      do_blocking_move_to(temp_comp.park_point_x, temp_comp.park_point_y, temp_comp.park_point_z);
165 165
 
166 166
       // Wait for heatbed to reach target temp and probe to cool below target temp
167 167
       SERIAL_ECHOLNPGM("Waiting for bed and probe to reach target temp.");
@@ -186,9 +186,9 @@ void GcodeSuite::G76() {
186 186
 
187 187
       if (timeout) break;
188 188
 
189
-      // Move probe to probing point and wait for probe to reach target temp
189
+      // Move the nozzle to the probing point and wait for the probe to reach target temp
190 190
       destination.set(temp_comp.measure_point_x, temp_comp.measure_point_y, 0.5);
191
-      do_blocking_move_to(destination.x, destination.y, destination.z);
191
+      do_blocking_move_to(destination);
192 192
       SERIAL_ECHOLNPGM("Waiting for probe heating.");
193 193
       while (thermalManager.degProbe() < target_probe) {
194 194
         idle(
@@ -207,7 +207,7 @@ void GcodeSuite::G76() {
207 207
       destination.z = 5.0;
208 208
       do_blocking_move_to_z(destination.z);
209 209
 
210
-      // Do a single probe
210
+      // Do a single probe at the current position
211 211
       remember_feedrate_scaling_off();
212 212
       const float measured_z = probe.probe_at_point(
213 213
         destination.x + probe.offset_xy.x,
@@ -252,7 +252,7 @@ void GcodeSuite::G76() {
252 252
   if (do_probe_cal) {
253 253
 
254 254
     // Park nozzle
255
-    do_blocking_move_to(ProbeTempComp::park_point.x, ProbeTempComp::park_point.y, ProbeTempComp::park_point.z);
255
+    do_blocking_move_to(temp_comp.park_point_x, temp_comp.park_point_y, temp_comp.park_point_z);
256 256
 
257 257
     // Initialize temperatures
258 258
     uint16_t target_bed = temp_comp.probe_calib_bed_temp,

Загрузка…
Отмена
Сохранить