Browse Source

Cleanups for PTC

Scott Lahteine 4 years ago
parent
commit
e5d39063a2

+ 8
- 8
Marlin/src/feature/probe_temp_compensation.h View File

57
     static const temp_calib_t cali_info[TSI_COUNT];
57
     static const temp_calib_t cali_info[TSI_COUNT];
58
 
58
 
59
     // Where to park nozzle to wait for probe cooldown
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
     static constexpr int  max_bed_temp         = PTC_MAX_BED_TEMP,  // Max temperature to avoid heating errors
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
                           probe_calib_bed_temp = max_bed_temp,      // Bed temperature while calibrating probe
70
                           probe_calib_bed_temp = max_bed_temp,      // Bed temperature while calibrating probe
71
                           bed_calib_probe_temp = 30;                // Probe temperature while calibrating bed
71
                           bed_calib_probe_temp = 30;                // Probe temperature while calibrating bed
72
 
72
 

+ 7
- 7
Marlin/src/gcode/calibrate/G76_M871.cpp View File

105
 
105
 
106
   if (do_bed_cal || do_probe_cal) {
106
   if (do_bed_cal || do_probe_cal) {
107
     // Ensure park position is reachable
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
       SERIAL_ECHOLNPGM("!Park position unreachable - aborting.");
111
       SERIAL_ECHOLNPGM("!Park position unreachable - aborting.");
112
       return;
112
       return;
161
       SERIAL_ECHOLNPAIR("Target Bed: ", target_bed, "; Probe: ", target_probe);
161
       SERIAL_ECHOLNPAIR("Target Bed: ", target_bed, "; Probe: ", target_probe);
162
 
162
 
163
       // Park nozzle
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
       // Wait for heatbed to reach target temp and probe to cool below target temp
166
       // Wait for heatbed to reach target temp and probe to cool below target temp
167
       SERIAL_ECHOLNPGM("Waiting for bed and probe to reach target temp.");
167
       SERIAL_ECHOLNPGM("Waiting for bed and probe to reach target temp.");
186
 
186
 
187
       if (timeout) break;
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
       destination.set(temp_comp.measure_point_x, temp_comp.measure_point_y, 0.5);
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
       SERIAL_ECHOLNPGM("Waiting for probe heating.");
192
       SERIAL_ECHOLNPGM("Waiting for probe heating.");
193
       while (thermalManager.degProbe() < target_probe) {
193
       while (thermalManager.degProbe() < target_probe) {
194
         idle(
194
         idle(
207
       destination.z = 5.0;
207
       destination.z = 5.0;
208
       do_blocking_move_to_z(destination.z);
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
       remember_feedrate_scaling_off();
211
       remember_feedrate_scaling_off();
212
       const float measured_z = probe.probe_at_point(
212
       const float measured_z = probe.probe_at_point(
213
         destination.x + probe.offset_xy.x,
213
         destination.x + probe.offset_xy.x,
252
   if (do_probe_cal) {
252
   if (do_probe_cal) {
253
 
253
 
254
     // Park nozzle
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
     // Initialize temperatures
257
     // Initialize temperatures
258
     uint16_t target_bed = temp_comp.probe_calib_bed_temp,
258
     uint16_t target_bed = temp_comp.probe_calib_bed_temp,

Loading…
Cancel
Save