Browse Source

Merge pull request #8324 from LVD-AC/2.0.x-manual-probe

[2.0.x] PROBE_SELECTED etc.
Scott Lahteine 7 years ago
parent
commit
c0fe6cc34d
No account linked to committer's email address

+ 2
- 2
Marlin/src/config/examples/delta/FLSUN/auto_calibrate/Configuration.h View File

487
   // Delta calibration menu
487
   // Delta calibration menu
488
   // uncomment to add three points calibration menu option.
488
   // uncomment to add three points calibration menu option.
489
   // See http://minow.blogspot.com/index.html#4918805519571907051
489
   // See http://minow.blogspot.com/index.html#4918805519571907051
490
-  #define DELTA_CALIBRATION_MENU
490
+  //#define DELTA_CALIBRATION_MENU
491
 
491
 
492
   // uncomment to add G33 Delta Auto-Calibration (Enable EEPROM_SETTINGS to store results)
492
   // uncomment to add G33 Delta Auto-Calibration (Enable EEPROM_SETTINGS to store results)
493
   #define DELTA_AUTO_CALIBRATION
493
   #define DELTA_AUTO_CALIBRATION
506
   #endif
506
   #endif
507
 
507
 
508
   #if ENABLED(DELTA_AUTO_CALIBRATION) || ENABLED(DELTA_CALIBRATION_MENU)
508
   #if ENABLED(DELTA_AUTO_CALIBRATION) || ENABLED(DELTA_CALIBRATION_MENU)
509
-    // Set the radius for the calibration probe points - max DELTA_PRINTABLE_RADIUS for non-eccentric probes
509
+    // Set the radius for the calibration probe points - max 0.9 * DELTA_PRINTABLE_RADIUS for non-eccentric probes
510
     #define DELTA_CALIBRATION_RADIUS 73.5 // mm
510
     #define DELTA_CALIBRATION_RADIUS 73.5 // mm
511
     // Set the steprate for papertest probing
511
     // Set the steprate for papertest probing
512
     #define PROBE_MANUALLY_STEP 0.025
512
     #define PROBE_MANUALLY_STEP 0.025

+ 1
- 1
Marlin/src/config/examples/delta/FLSUN/kossel_mini/Configuration.h View File

506
   #endif
506
   #endif
507
 
507
 
508
   #if ENABLED(DELTA_AUTO_CALIBRATION) || ENABLED(DELTA_CALIBRATION_MENU)
508
   #if ENABLED(DELTA_AUTO_CALIBRATION) || ENABLED(DELTA_CALIBRATION_MENU)
509
-    // Set the radius for the calibration probe points - max DELTA_PRINTABLE_RADIUS for non-eccentric probes
509
+    // Set the radius for the calibration probe points - max 0.9 * DELTA_PRINTABLE_RADIUS for non-eccentric probes
510
     #define DELTA_CALIBRATION_RADIUS 73.5 // mm
510
     #define DELTA_CALIBRATION_RADIUS 73.5 // mm
511
     // Set the steprate for papertest probing
511
     // Set the steprate for papertest probing
512
     #define PROBE_MANUALLY_STEP 0.025
512
     #define PROBE_MANUALLY_STEP 0.025

+ 1
- 1
Marlin/src/config/examples/delta/generic/Configuration.h View File

496
   #endif
496
   #endif
497
 
497
 
498
   #if ENABLED(DELTA_AUTO_CALIBRATION) || ENABLED(DELTA_CALIBRATION_MENU)
498
   #if ENABLED(DELTA_AUTO_CALIBRATION) || ENABLED(DELTA_CALIBRATION_MENU)
499
-    // Set the radius for the calibration probe points - max DELTA_PRINTABLE_RADIUS for non-eccentric probes
499
+    // Set the radius for the calibration probe points - max 0.9 * DELTA_PRINTABLE_RADIUS for non-eccentric probes
500
     #define DELTA_CALIBRATION_RADIUS 121.5 // mm
500
     #define DELTA_CALIBRATION_RADIUS 121.5 // mm
501
     // Set the steprate for papertest probing
501
     // Set the steprate for papertest probing
502
     #define PROBE_MANUALLY_STEP 0.025
502
     #define PROBE_MANUALLY_STEP 0.025

+ 1
- 1
Marlin/src/config/examples/delta/kossel_mini/Configuration.h View File

496
   #endif
496
   #endif
497
 
497
 
498
   #if ENABLED(DELTA_AUTO_CALIBRATION) || ENABLED(DELTA_CALIBRATION_MENU)
498
   #if ENABLED(DELTA_AUTO_CALIBRATION) || ENABLED(DELTA_CALIBRATION_MENU)
499
-    // Set the radius for the calibration probe points - max DELTA_PRINTABLE_RADIUS for non-eccentric probes
499
+    // Set the radius for the calibration probe points - max 0.9 * DELTA_PRINTABLE_RADIUS for non-eccentric probes
500
     #define DELTA_CALIBRATION_RADIUS 78.0 // mm
500
     #define DELTA_CALIBRATION_RADIUS 78.0 // mm
501
     // Set the steprate for papertest probing
501
     // Set the steprate for papertest probing
502
     #define PROBE_MANUALLY_STEP 0.025
502
     #define PROBE_MANUALLY_STEP 0.025

+ 1
- 1
Marlin/src/config/examples/delta/kossel_pro/Configuration.h View File

482
   #endif
482
   #endif
483
 
483
 
484
   #if ENABLED(DELTA_AUTO_CALIBRATION) || ENABLED(DELTA_CALIBRATION_MENU)
484
   #if ENABLED(DELTA_AUTO_CALIBRATION) || ENABLED(DELTA_CALIBRATION_MENU)
485
-    // Set the radius for the calibration probe points - max DELTA_PRINTABLE_RADIUS for non-eccentric probes
485
+    // Set the radius for the calibration probe points - max 0.9 * DELTA_PRINTABLE_RADIUS for non-eccentric probes
486
     #define DELTA_CALIBRATION_RADIUS 110.0 // mm
486
     #define DELTA_CALIBRATION_RADIUS 110.0 // mm
487
     // Set the steprate for papertest probing
487
     // Set the steprate for papertest probing
488
     #define PROBE_MANUALLY_STEP 0.025
488
     #define PROBE_MANUALLY_STEP 0.025

+ 1
- 1
Marlin/src/config/examples/delta/kossel_xl/Configuration.h View File

500
   #endif
500
   #endif
501
 
501
 
502
   #if ENABLED(DELTA_AUTO_CALIBRATION) || ENABLED(DELTA_CALIBRATION_MENU)
502
   #if ENABLED(DELTA_AUTO_CALIBRATION) || ENABLED(DELTA_CALIBRATION_MENU)
503
-    // Set the radius for the calibration probe points - max DELTA_PRINTABLE_RADIUS for non-eccentric probes
503
+    // Set the radius for the calibration probe points - max 0.9 * DELTA_PRINTABLE_RADIUS for non-eccentric probes
504
     #define DELTA_CALIBRATION_RADIUS 121.5 // mm
504
     #define DELTA_CALIBRATION_RADIUS 121.5 // mm
505
     // Set the steprate for papertest probing
505
     // Set the steprate for papertest probing
506
     #define PROBE_MANUALLY_STEP 0.025
506
     #define PROBE_MANUALLY_STEP 0.025

+ 9
- 8
Marlin/src/gcode/calibrate/G33.cpp View File

180
                     r = delta_calibration_radius * 0.1;
180
                     r = delta_calibration_radius * 0.1;
181
         z_at_pt[CEN] +=
181
         z_at_pt[CEN] +=
182
           #if HAS_BED_PROBE
182
           #if HAS_BED_PROBE
183
-            probe_pt(cos(a) * r + dx, sin(a) * r + dy, stow_after_each, 1)
183
+            probe_pt(cos(a) * r + dx, sin(a) * r + dy, stow_after_each, 1, false)
184
           #else
184
           #else
185
             lcd_probe_pt(cos(a) * r, sin(a) * r)
185
             lcd_probe_pt(cos(a) * r, sin(a) * r)
186
           #endif
186
           #endif
209
                       interpol = FMOD(axis, 1);
209
                       interpol = FMOD(axis, 1);
210
           const float z_temp =
210
           const float z_temp =
211
             #if HAS_BED_PROBE
211
             #if HAS_BED_PROBE
212
-              probe_pt(cos(a) * r + dx, sin(a) * r + dy, stow_after_each, 1)
212
+              probe_pt(cos(a) * r + dx, sin(a) * r + dy, stow_after_each, 1, false)
213
             #else
213
             #else
214
               lcd_probe_pt(cos(a) * r, sin(a) * r)
214
               lcd_probe_pt(cos(a) * r, sin(a) * r)
215
             #endif
215
             #endif
225
           z_at_pt[axis] /= _7P_STEP / steps;
225
           z_at_pt[axis] /= _7P_STEP / steps;
226
     }
226
     }
227
 
227
 
228
-
229
     float S1 = z_at_pt[CEN],
228
     float S1 = z_at_pt[CEN],
230
           S2 = sq(z_at_pt[CEN]);
229
           S2 = sq(z_at_pt[CEN]);
231
     int16_t N = 1;
230
     int16_t N = 1;
263
 
262
 
264
     LOOP_XYZ(axis) {
263
     LOOP_XYZ(axis) {
265
       delta_endstop_adj[axis] -= 1.0;
264
       delta_endstop_adj[axis] -= 1.0;
265
+      recalc_delta_settings();
266
 
266
 
267
       endstops.enable(true);
267
       endstops.enable(true);
268
       if (!home_delta()) return;
268
       if (!home_delta()) return;
276
       LOOP_CAL_ALL(axis) z_at_pt[axis] -= z_at_pt_base[axis];
276
       LOOP_CAL_ALL(axis) z_at_pt[axis] -= z_at_pt_base[axis];
277
       print_G33_results(z_at_pt, true, true);
277
       print_G33_results(z_at_pt, true, true);
278
       delta_endstop_adj[axis] += 1.0;
278
       delta_endstop_adj[axis] += 1.0;
279
+      recalc_delta_settings();
279
       switch (axis) {
280
       switch (axis) {
280
         case A_AXIS :
281
         case A_AXIS :
281
           h_fac += 4.0 / (Z03(CEN) +Z01(__A)                               +Z32(_CA) +Z32(_AB)); // Offset by X-tower end-stop
282
           h_fac += 4.0 / (Z03(CEN) +Z01(__A)                               +Z32(_CA) +Z32(_AB)); // Offset by X-tower end-stop
293
 
294
 
294
     for (int8_t zig_zag = -1; zig_zag < 2; zig_zag += 2) {
295
     for (int8_t zig_zag = -1; zig_zag < 2; zig_zag += 2) {
295
       delta_radius += 1.0 * zig_zag;
296
       delta_radius += 1.0 * zig_zag;
296
-      recalc_delta_settings(delta_radius, delta_diagonal_rod, delta_tower_angle_trim);
297
+      recalc_delta_settings();
297
 
298
 
298
       endstops.enable(true);
299
       endstops.enable(true);
299
       if (!home_delta()) return;
300
       if (!home_delta()) return;
306
       LOOP_CAL_ALL(axis) z_at_pt[axis] -= z_at_pt_base[axis];
307
       LOOP_CAL_ALL(axis) z_at_pt[axis] -= z_at_pt_base[axis];
307
       print_G33_results(z_at_pt, true, true);
308
       print_G33_results(z_at_pt, true, true);
308
       delta_radius -= 1.0 * zig_zag;
309
       delta_radius -= 1.0 * zig_zag;
309
-      recalc_delta_settings(delta_radius, delta_diagonal_rod, delta_tower_angle_trim);
310
+      recalc_delta_settings();
310
       r_fac -= zig_zag * 6.0 / (Z03(__A) +Z03(__B) +Z03(__C) +Z03(_BC) +Z03(_CA) +Z03(_AB)); // Offset by delta radius
311
       r_fac -= zig_zag * 6.0 / (Z03(__A) +Z03(__B) +Z03(__C) +Z03(_BC) +Z03(_CA) +Z03(_AB)); // Offset by delta radius
311
     }
312
     }
312
     r_fac /= 2.0;
313
     r_fac /= 2.0;
319
       z_temp = MAX3(delta_endstop_adj[A_AXIS], delta_endstop_adj[B_AXIS], delta_endstop_adj[C_AXIS]);
320
       z_temp = MAX3(delta_endstop_adj[A_AXIS], delta_endstop_adj[B_AXIS], delta_endstop_adj[C_AXIS]);
320
       delta_height -= z_temp;
321
       delta_height -= z_temp;
321
       LOOP_XYZ(axis) delta_endstop_adj[axis] -= z_temp;
322
       LOOP_XYZ(axis) delta_endstop_adj[axis] -= z_temp;
322
-      recalc_delta_settings(delta_radius, delta_diagonal_rod, delta_tower_angle_trim);
323
+      recalc_delta_settings();
323
 
324
 
324
       endstops.enable(true);
325
       endstops.enable(true);
325
       if (!home_delta()) return;
326
       if (!home_delta()) return;
339
       z_temp = MAX3(delta_endstop_adj[A_AXIS], delta_endstop_adj[B_AXIS], delta_endstop_adj[C_AXIS]);
340
       z_temp = MAX3(delta_endstop_adj[A_AXIS], delta_endstop_adj[B_AXIS], delta_endstop_adj[C_AXIS]);
340
       delta_height -= z_temp;
341
       delta_height -= z_temp;
341
       LOOP_XYZ(axis) delta_endstop_adj[axis] -= z_temp;
342
       LOOP_XYZ(axis) delta_endstop_adj[axis] -= z_temp;
342
-      recalc_delta_settings(delta_radius, delta_diagonal_rod, delta_tower_angle_trim);
343
+      recalc_delta_settings();
343
       switch (axis) {
344
       switch (axis) {
344
         case A_AXIS :
345
         case A_AXIS :
345
           a_fac += 4.0 / (          Z06(__B) -Z06(__C)           +Z06(_CA) -Z06(_AB)); // Offset by alpha tower angle
346
           a_fac += 4.0 / (          Z06(__B) -Z06(__C)           +Z06(_CA) -Z06(_AB)); // Offset by alpha tower angle
626
       delta_height -= z_temp;
627
       delta_height -= z_temp;
627
       LOOP_XYZ(axis) delta_endstop_adj[axis] -= z_temp;
628
       LOOP_XYZ(axis) delta_endstop_adj[axis] -= z_temp;
628
     }
629
     }
629
-    recalc_delta_settings(delta_radius, delta_diagonal_rod, delta_tower_angle_trim);
630
+    recalc_delta_settings();
630
     NOMORE(zero_std_dev_min, zero_std_dev);
631
     NOMORE(zero_std_dev_min, zero_std_dev);
631
 
632
 
632
     // print report
633
     // print report

+ 1
- 1
Marlin/src/gcode/calibrate/M665.cpp View File

55
     if (parser.seen('X')) delta_tower_angle_trim[A_AXIS] = parser.value_float();
55
     if (parser.seen('X')) delta_tower_angle_trim[A_AXIS] = parser.value_float();
56
     if (parser.seen('Y')) delta_tower_angle_trim[B_AXIS] = parser.value_float();
56
     if (parser.seen('Y')) delta_tower_angle_trim[B_AXIS] = parser.value_float();
57
     if (parser.seen('Z')) delta_tower_angle_trim[C_AXIS] = parser.value_float();
57
     if (parser.seen('Z')) delta_tower_angle_trim[C_AXIS] = parser.value_float();
58
-    recalc_delta_settings(delta_radius, delta_diagonal_rod, delta_tower_angle_trim);
58
+    recalc_delta_settings();
59
   }
59
   }
60
 
60
 
61
 #elif IS_SCARA
61
 #elif IS_SCARA

+ 0
- 2
Marlin/src/gcode/config/M304.cpp View File

32
   if (parser.seen('I')) thermalManager.bedKi = scalePID_i(parser.value_float());
32
   if (parser.seen('I')) thermalManager.bedKi = scalePID_i(parser.value_float());
33
   if (parser.seen('D')) thermalManager.bedKd = scalePID_d(parser.value_float());
33
   if (parser.seen('D')) thermalManager.bedKd = scalePID_d(parser.value_float());
34
 
34
 
35
-  thermalManager.updatePID();
36
-
37
   SERIAL_ECHO_START();
35
   SERIAL_ECHO_START();
38
   SERIAL_ECHOPAIR(" p:", thermalManager.bedKp);
36
   SERIAL_ECHOPAIR(" p:", thermalManager.bedKp);
39
   SERIAL_ECHOPAIR(" i:", unscalePID_i(thermalManager.bedKi));
37
   SERIAL_ECHOPAIR(" i:", unscalePID_i(thermalManager.bedKi));

+ 2
- 2
Marlin/src/lcd/language/language_en.h View File

752
 #ifndef MSG_DELTA_HEIGHT_CALIBRATE
752
 #ifndef MSG_DELTA_HEIGHT_CALIBRATE
753
   #define MSG_DELTA_HEIGHT_CALIBRATE          _UxGT("Set Delta Height")
753
   #define MSG_DELTA_HEIGHT_CALIBRATE          _UxGT("Set Delta Height")
754
 #endif
754
 #endif
755
-#ifndef MSG_DELTA_DIAG_ROG
756
-  #define MSG_DELTA_DIAG_ROG                  _UxGT("Diag Rod")
755
+#ifndef MSG_DELTA_DIAG_ROD
756
+  #define MSG_DELTA_DIAG_ROD                  _UxGT("Diag Rod")
757
 #endif
757
 #endif
758
 #ifndef MSG_DELTA_HEIGHT
758
 #ifndef MSG_DELTA_HEIGHT
759
   #define MSG_DELTA_HEIGHT                    _UxGT("Height")
759
   #define MSG_DELTA_HEIGHT                    _UxGT("Height")

+ 26
- 24
Marlin/src/lcd/ultralcd.cpp View File

205
     void lcd_control_retract_menu();
205
     void lcd_control_retract_menu();
206
   #endif
206
   #endif
207
 
207
 
208
-  #if ENABLED(DELTA_CALIBRATION_MENU)
208
+  #if ENABLED(DELTA_CALIBRATION_MENU) || ENABLED(DELTA_AUTO_CALIBRATION)
209
     void lcd_delta_calibrate_menu();
209
     void lcd_delta_calibrate_menu();
210
   #endif
210
   #endif
211
 
211
 
2559
     // Move Axis
2559
     // Move Axis
2560
     //
2560
     //
2561
     #if ENABLED(DELTA)
2561
     #if ENABLED(DELTA)
2562
-      if (axis_homed[Z_AXIS])
2562
+      if (axis_homed[X_AXIS] && axis_homed[Y_AXIS] && axis_homed[Z_AXIS])
2563
     #endif
2563
     #endif
2564
         MENU_ITEM(submenu, MSG_MOVE_AXIS, lcd_move_menu);
2564
         MENU_ITEM(submenu, MSG_MOVE_AXIS, lcd_move_menu);
2565
 
2565
 
2674
     //
2674
     //
2675
     // Delta Calibration
2675
     // Delta Calibration
2676
     //
2676
     //
2677
-    #if ENABLED(DELTA_CALIBRATION_MENU)
2677
+    #if ENABLED(DELTA_CALIBRATION_MENU) || ENABLED(DELTA_AUTO_CALIBRATION)
2678
       MENU_ITEM(submenu, MSG_DELTA_CALIBRATE, lcd_delta_calibrate_menu);
2678
       MENU_ITEM(submenu, MSG_DELTA_CALIBRATE, lcd_delta_calibrate_menu);
2679
     #endif
2679
     #endif
2680
 
2680
 
2743
     void _goto_tower_z() { _man_probe_pt(cos(RADIANS( 90)) * delta_calibration_radius, sin(RADIANS( 90)) * delta_calibration_radius); }
2743
     void _goto_tower_z() { _man_probe_pt(cos(RADIANS( 90)) * delta_calibration_radius, sin(RADIANS( 90)) * delta_calibration_radius); }
2744
     void _goto_center()  { _man_probe_pt(0,0); }
2744
     void _goto_center()  { _man_probe_pt(0,0); }
2745
 
2745
 
2746
-    void _lcd_set_delta_height() {
2747
-      update_software_endstops(Z_AXIS);
2748
-    }
2746
+  #endif // DELTA_CALIBRATION_MENU
2747
+
2748
+  #if ENABLED(DELTA_CALIBRATION_MENU) || ENABLED(DELTA_AUTO_CALIBRATION)
2749
 
2749
 
2750
     void lcd_delta_settings() {
2750
     void lcd_delta_settings() {
2751
       START_MENU();
2751
       START_MENU();
2752
       MENU_BACK(MSG_DELTA_CALIBRATE);
2752
       MENU_BACK(MSG_DELTA_CALIBRATE);
2753
-      MENU_ITEM_EDIT(float52, MSG_DELTA_DIAG_ROG, &delta_diagonal_rod, DELTA_DIAGONAL_ROD - 5.0, DELTA_DIAGONAL_ROD + 5.0);
2754
-      MENU_MULTIPLIER_ITEM_EDIT_CALLBACK(float52, MSG_DELTA_HEIGHT, &delta_height, delta_height - 10.0, delta_height + 10.0, _lcd_set_delta_height);
2755
-      MENU_ITEM_EDIT(float43, "Ex", &delta_endstop_adj[A_AXIS], -5.0, 5.0);
2756
-      MENU_ITEM_EDIT(float43, "Ey", &delta_endstop_adj[B_AXIS], -5.0, 5.0);
2757
-      MENU_ITEM_EDIT(float43, "Ez", &delta_endstop_adj[C_AXIS], -5.0, 5.0);
2758
-      MENU_ITEM_EDIT(float52, MSG_DELTA_RADIUS, &delta_radius, DELTA_RADIUS - 5.0, DELTA_RADIUS + 5.0);
2759
-      MENU_ITEM_EDIT(float43, "Tx", &delta_tower_angle_trim[A_AXIS], -5.0, 5.0);
2760
-      MENU_ITEM_EDIT(float43, "Ty", &delta_tower_angle_trim[B_AXIS], -5.0, 5.0);
2761
-      MENU_ITEM_EDIT(float43, "Tz", &delta_tower_angle_trim[C_AXIS], -5.0, 5.0);
2753
+      MENU_ITEM_EDIT_CALLBACK(float52, MSG_DELTA_DIAG_ROD, &delta_diagonal_rod, delta_diagonal_rod - 5.0, delta_diagonal_rod + 5.0, recalc_delta_settings);
2754
+      MENU_ITEM_EDIT_CALLBACK(float52, MSG_DELTA_HEIGHT, &delta_height, delta_height - 10.0, delta_height + 10.0, recalc_delta_settings);
2755
+      MENU_ITEM_EDIT_CALLBACK(float43, "Ex", &delta_endstop_adj[A_AXIS], -5.0, 5.0, recalc_delta_settings);
2756
+      MENU_ITEM_EDIT_CALLBACK(float43, "Ey", &delta_endstop_adj[B_AXIS], -5.0, 5.0, recalc_delta_settings);
2757
+      MENU_ITEM_EDIT_CALLBACK(float43, "Ez", &delta_endstop_adj[C_AXIS], -5.0, 5.0, recalc_delta_settings);
2758
+      MENU_ITEM_EDIT_CALLBACK(float52, MSG_DELTA_RADIUS, &delta_radius, delta_radius - 5.0, delta_radius + 5.0, recalc_delta_settings);
2759
+      MENU_ITEM_EDIT_CALLBACK(float43, "Tx", &delta_tower_angle_trim[A_AXIS], -5.0, 5.0, recalc_delta_settings);
2760
+      MENU_ITEM_EDIT_CALLBACK(float43, "Ty", &delta_tower_angle_trim[B_AXIS], -5.0, 5.0, recalc_delta_settings);
2761
+      MENU_ITEM_EDIT_CALLBACK(float43, "Tz", &delta_tower_angle_trim[C_AXIS], -5.0, 5.0, recalc_delta_settings);
2762
       END_MENU();
2762
       END_MENU();
2763
     }
2763
     }
2764
 
2764
 
2766
       START_MENU();
2766
       START_MENU();
2767
       MENU_BACK(MSG_MAIN);
2767
       MENU_BACK(MSG_MAIN);
2768
       #if ENABLED(DELTA_AUTO_CALIBRATION)
2768
       #if ENABLED(DELTA_AUTO_CALIBRATION)
2769
-        MENU_ITEM(submenu, MSG_DELTA_SETTINGS, lcd_delta_settings);
2770
         MENU_ITEM(gcode, MSG_DELTA_AUTO_CALIBRATE, PSTR("G33"));
2769
         MENU_ITEM(gcode, MSG_DELTA_AUTO_CALIBRATE, PSTR("G33"));
2771
         MENU_ITEM(gcode, MSG_DELTA_HEIGHT_CALIBRATE, PSTR("G33 P1"));
2770
         MENU_ITEM(gcode, MSG_DELTA_HEIGHT_CALIBRATE, PSTR("G33 P1"));
2772
         #if ENABLED(EEPROM_SETTINGS)
2771
         #if ENABLED(EEPROM_SETTINGS)
2774
           MENU_ITEM(function, MSG_LOAD_EEPROM, lcd_load_settings);
2773
           MENU_ITEM(function, MSG_LOAD_EEPROM, lcd_load_settings);
2775
         #endif
2774
         #endif
2776
       #endif
2775
       #endif
2777
-      MENU_ITEM(submenu, MSG_AUTO_HOME, _lcd_delta_calibrate_home);
2778
-      if (axis_homed[Z_AXIS]) {
2779
-        MENU_ITEM(submenu, MSG_DELTA_CALIBRATE_X, _goto_tower_x);
2780
-        MENU_ITEM(submenu, MSG_DELTA_CALIBRATE_Y, _goto_tower_y);
2781
-        MENU_ITEM(submenu, MSG_DELTA_CALIBRATE_Z, _goto_tower_z);
2782
-        MENU_ITEM(submenu, MSG_DELTA_CALIBRATE_CENTER, _goto_center);
2783
-      }
2776
+      MENU_ITEM(submenu, MSG_DELTA_SETTINGS, lcd_delta_settings);
2777
+      #if ENABLED(DELTA_CALIBRATION_MENU)
2778
+        MENU_ITEM(submenu, MSG_AUTO_HOME, _lcd_delta_calibrate_home);
2779
+        if (axis_homed[X_AXIS] && axis_homed[Y_AXIS] && axis_homed[Z_AXIS]) {
2780
+          MENU_ITEM(submenu, MSG_DELTA_CALIBRATE_X, _goto_tower_x);
2781
+          MENU_ITEM(submenu, MSG_DELTA_CALIBRATE_Y, _goto_tower_y);
2782
+          MENU_ITEM(submenu, MSG_DELTA_CALIBRATE_Z, _goto_tower_z);
2783
+          MENU_ITEM(submenu, MSG_DELTA_CALIBRATE_CENTER, _goto_center);
2784
+        }
2785
+      #endif
2784
       END_MENU();
2786
       END_MENU();
2785
     }
2787
     }
2786
 
2788
 
2787
-  #endif // DELTA_CALIBRATION_MENU
2789
+  #endif // DELTA_CALIBRATION_MENU || DELTA_AUTO_CALIBRATION
2788
 
2790
 
2789
   /**
2791
   /**
2790
    * If the most recent manual move hasn't been fed to the planner yet,
2792
    * If the most recent manual move hasn't been fed to the planner yet,

+ 1
- 1
Marlin/src/module/configuration_store.cpp View File

225
   // Make sure delta kinematics are updated before refreshing the
225
   // Make sure delta kinematics are updated before refreshing the
226
   // planner position so the stepper counts will be set correctly.
226
   // planner position so the stepper counts will be set correctly.
227
   #if ENABLED(DELTA)
227
   #if ENABLED(DELTA)
228
-    recalc_delta_settings(delta_radius, delta_diagonal_rod, delta_tower_angle_trim);
228
+    recalc_delta_settings();
229
   #endif
229
   #endif
230
 
230
 
231
   // Refresh steps_to_mm with the reciprocal of axis_steps_per_mm
231
   // Refresh steps_to_mm with the reciprocal of axis_steps_per_mm

+ 12
- 10
Marlin/src/module/delta.cpp View File

56
  * Recalculate factors used for delta kinematics whenever
56
  * Recalculate factors used for delta kinematics whenever
57
  * settings have been changed (e.g., by M665).
57
  * settings have been changed (e.g., by M665).
58
  */
58
  */
59
-void recalc_delta_settings(const float radius, const float diagonal_rod, const float tower_angle_trim[ABC]) {
59
+void recalc_delta_settings() {
60
   const float trt[ABC] = DELTA_RADIUS_TRIM_TOWER,
60
   const float trt[ABC] = DELTA_RADIUS_TRIM_TOWER,
61
               drt[ABC] = DELTA_DIAGONAL_ROD_TRIM_TOWER;
61
               drt[ABC] = DELTA_DIAGONAL_ROD_TRIM_TOWER;
62
-  delta_tower[A_AXIS][X_AXIS] = cos(RADIANS(210 + tower_angle_trim[A_AXIS])) * (radius + trt[A_AXIS]); // front left tower
63
-  delta_tower[A_AXIS][Y_AXIS] = sin(RADIANS(210 + tower_angle_trim[A_AXIS])) * (radius + trt[A_AXIS]);
64
-  delta_tower[B_AXIS][X_AXIS] = cos(RADIANS(330 + tower_angle_trim[B_AXIS])) * (radius + trt[B_AXIS]); // front right tower
65
-  delta_tower[B_AXIS][Y_AXIS] = sin(RADIANS(330 + tower_angle_trim[B_AXIS])) * (radius + trt[B_AXIS]);
66
-  delta_tower[C_AXIS][X_AXIS] = cos(RADIANS( 90 + tower_angle_trim[C_AXIS])) * (radius + trt[C_AXIS]); // back middle tower
67
-  delta_tower[C_AXIS][Y_AXIS] = sin(RADIANS( 90 + tower_angle_trim[C_AXIS])) * (radius + trt[C_AXIS]);
68
-  delta_diagonal_rod_2_tower[A_AXIS] = sq(diagonal_rod + drt[A_AXIS]);
69
-  delta_diagonal_rod_2_tower[B_AXIS] = sq(diagonal_rod + drt[B_AXIS]);
70
-  delta_diagonal_rod_2_tower[C_AXIS] = sq(diagonal_rod + drt[C_AXIS]);
62
+  delta_tower[A_AXIS][X_AXIS] = cos(RADIANS(210 + delta_tower_angle_trim[A_AXIS])) * (delta_radius + trt[A_AXIS]); // front left tower
63
+  delta_tower[A_AXIS][Y_AXIS] = sin(RADIANS(210 + delta_tower_angle_trim[A_AXIS])) * (delta_radius + trt[A_AXIS]);
64
+  delta_tower[B_AXIS][X_AXIS] = cos(RADIANS(330 + delta_tower_angle_trim[B_AXIS])) * (delta_radius + trt[B_AXIS]); // front right tower
65
+  delta_tower[B_AXIS][Y_AXIS] = sin(RADIANS(330 + delta_tower_angle_trim[B_AXIS])) * (delta_radius + trt[B_AXIS]);
66
+  delta_tower[C_AXIS][X_AXIS] = cos(RADIANS( 90 + delta_tower_angle_trim[C_AXIS])) * (delta_radius + trt[C_AXIS]); // back middle tower
67
+  delta_tower[C_AXIS][Y_AXIS] = sin(RADIANS( 90 + delta_tower_angle_trim[C_AXIS])) * (delta_radius + trt[C_AXIS]);
68
+  delta_diagonal_rod_2_tower[A_AXIS] = sq(delta_diagonal_rod + drt[A_AXIS]);
69
+  delta_diagonal_rod_2_tower[B_AXIS] = sq(delta_diagonal_rod + drt[B_AXIS]);
70
+  delta_diagonal_rod_2_tower[C_AXIS] = sq(delta_diagonal_rod + drt[C_AXIS]);
71
+  update_software_endstops(Z_AXIS);
72
+  axis_homed[X_AXIS] = axis_homed[Y_AXIS] = axis_homed[Z_AXIS] = false;
71
 }
73
 }
72
 
74
 
73
 /**
75
 /**

+ 1
- 1
Marlin/src/module/delta.h View File

43
  * Recalculate factors used for delta kinematics whenever
43
  * Recalculate factors used for delta kinematics whenever
44
  * settings have been changed (e.g., by M665).
44
  * settings have been changed (e.g., by M665).
45
  */
45
  */
46
-void recalc_delta_settings(const float radius, const float diagonal_rod, const float tower_angle_trim[ABC]);
46
+void recalc_delta_settings();
47
 
47
 
48
 /**
48
 /**
49
  * Delta Inverse Kinematics
49
  * Delta Inverse Kinematics

+ 1
- 1
Marlin/src/module/motion.h View File

260
     // This won't work on SCARA since the probe offset rotates with the arm.
260
     // This won't work on SCARA since the probe offset rotates with the arm.
261
 
261
 
262
     return position_is_reachable(rx, ry)
262
     return position_is_reachable(rx, ry)
263
-        && position_is_reachable(rx - X_PROBE_OFFSET_FROM_EXTRUDER, ry - Y_PROBE_OFFSET_FROM_EXTRUDER);
263
+        && position_is_reachable(rx - (X_PROBE_OFFSET_FROM_EXTRUDER), ry - (Y_PROBE_OFFSET_FROM_EXTRUDER));
264
   }
264
   }
265
 
265
 
266
 #else // CARTESIAN
266
 #else // CARTESIAN

+ 5
- 18
Marlin/src/module/probe.cpp View File

509
  * @details Used by probe_pt to do a single Z probe.
509
  * @details Used by probe_pt to do a single Z probe.
510
  *          Leaves current_position[Z_AXIS] at the height where the probe triggered.
510
  *          Leaves current_position[Z_AXIS] at the height where the probe triggered.
511
  *
511
  *
512
- * @param  short_move Flag for a shorter probe move towards the bed
513
  * @return The raw Z position where the probe was triggered
512
  * @return The raw Z position where the probe was triggered
514
  */
513
  */
515
-static float run_z_probe(const bool short_move=true) {
514
+static float run_z_probe() {
516
 
515
 
517
   #if ENABLED(DEBUG_LEVELING_FEATURE)
516
   #if ENABLED(DEBUG_LEVELING_FEATURE)
518
     if (DEBUGGING(LEVELING)) DEBUG_POS(">>> run_z_probe", current_position);
517
     if (DEBUGGING(LEVELING)) DEBUG_POS(">>> run_z_probe", current_position);
549
     }
548
     }
550
   #endif
549
   #endif
551
 
550
 
552
-  // move down slowly to find bed
553
-  if (do_probe_move(-10 + (short_move ? 0 : -(Z_MAX_LENGTH)), Z_PROBE_SPEED_SLOW)) return NAN;
551
+  // Move down slowly to find bed, not too far
552
+  if (do_probe_move(-10, Z_PROBE_SPEED_SLOW)) return NAN;
554
 
553
 
555
   #if ENABLED(DEBUG_LEVELING_FEATURE)
554
   #if ENABLED(DEBUG_LEVELING_FEATURE)
556
     if (DEBUGGING(LEVELING)) DEBUG_POS("<<< run_z_probe", current_position);
555
     if (DEBUGGING(LEVELING)) DEBUG_POS("<<< run_z_probe", current_position);
589
 
588
 
590
   const float nx = rx - (X_PROBE_OFFSET_FROM_EXTRUDER), ny = ry - (Y_PROBE_OFFSET_FROM_EXTRUDER);
589
   const float nx = rx - (X_PROBE_OFFSET_FROM_EXTRUDER), ny = ry - (Y_PROBE_OFFSET_FROM_EXTRUDER);
591
 
590
 
592
-  if (printable
591
+  if (!printable
593
     ? !position_is_reachable(nx, ny)
592
     ? !position_is_reachable(nx, ny)
594
     : !position_is_reachable_by_probe(rx, ry)
593
     : !position_is_reachable_by_probe(rx, ry)
595
   ) return NAN;
594
   ) return NAN;
596
 
595
 
597
-
598
   const float old_feedrate_mm_s = feedrate_mm_s;
596
   const float old_feedrate_mm_s = feedrate_mm_s;
599
 
597
 
600
   #if ENABLED(DELTA)
598
   #if ENABLED(DELTA)
602
       do_blocking_move_to_z(delta_clip_start_height);
600
       do_blocking_move_to_z(delta_clip_start_height);
603
   #endif
601
   #endif
604
 
602
 
605
-  #if HAS_SOFTWARE_ENDSTOPS
606
-    // Store the status of the soft endstops and disable if we're probing a non-printable location
607
-    static bool enable_soft_endstops = soft_endstops_enabled;
608
-    if (!printable) soft_endstops_enabled = false;
609
-  #endif
610
-
611
   feedrate_mm_s = XY_PROBE_FEEDRATE_MM_S;
603
   feedrate_mm_s = XY_PROBE_FEEDRATE_MM_S;
612
 
604
 
613
   // Move the probe to the given XY
605
   // Move the probe to the given XY
615
 
607
 
616
   float measured_z = NAN;
608
   float measured_z = NAN;
617
   if (!DEPLOY_PROBE()) {
609
   if (!DEPLOY_PROBE()) {
618
-    measured_z = run_z_probe(printable);
610
+    measured_z = run_z_probe();
619
 
611
 
620
     if (!stow)
612
     if (!stow)
621
       do_blocking_move_to_z(current_position[Z_AXIS] + Z_CLEARANCE_BETWEEN_PROBES, MMM_TO_MMS(Z_PROBE_SPEED_FAST));
613
       do_blocking_move_to_z(current_position[Z_AXIS] + Z_CLEARANCE_BETWEEN_PROBES, MMM_TO_MMS(Z_PROBE_SPEED_FAST));
623
       if (STOW_PROBE()) measured_z = NAN;
615
       if (STOW_PROBE()) measured_z = NAN;
624
   }
616
   }
625
 
617
 
626
-  #if HAS_SOFTWARE_ENDSTOPS
627
-    // Restore the soft endstop status
628
-    soft_endstops_enabled = enable_soft_endstops;
629
-  #endif
630
-
631
   if (verbose_level > 2) {
618
   if (verbose_level > 2) {
632
     SERIAL_PROTOCOLPGM("Bed X: ");
619
     SERIAL_PROTOCOLPGM("Bed X: ");
633
     SERIAL_PROTOCOL_F(LOGICAL_X_POSITION(rx), 3);
620
     SERIAL_PROTOCOL_F(LOGICAL_X_POSITION(rx), 3);

+ 7
- 9
Marlin/src/module/temperature.cpp View File

217
 
217
 
218
 #if HAS_PID_HEATING
218
 #if HAS_PID_HEATING
219
 
219
 
220
+  /**
221
+   * PID Autotuning (M303)
222
+   *
223
+   * Alternately heat and cool the nozzle, observing its behavior to
224
+   * determine the best PID values to achieve a stable temperature.
225
+   */
220
   void Temperature::PID_autotune(const float temp, const int8_t hotend, const int8_t ncycles, const bool set_result/*=false*/) {
226
   void Temperature::PID_autotune(const float temp, const int8_t hotend, const int8_t ncycles, const bool set_result/*=false*/) {
221
     float input = 0.0;
227
     float input = 0.0;
222
     int cycles = 0;
228
     int cycles = 0;
466
           bedKp = workKp; \
472
           bedKp = workKp; \
467
           bedKi = scalePID_i(workKi); \
473
           bedKi = scalePID_i(workKi); \
468
           bedKd = scalePID_d(workKd); \
474
           bedKd = scalePID_d(workKd); \
469
-          updatePID(); }while(0)
475
+        }while(0)
470
 
476
 
471
         #define _SET_EXTRUDER_PID() do { \
477
         #define _SET_EXTRUDER_PID() do { \
472
           PID_PARAM(Kp, hotend) = workKp; \
478
           PID_PARAM(Kp, hotend) = workKp; \
502
 
508
 
503
 Temperature::Temperature() { }
509
 Temperature::Temperature() { }
504
 
510
 
505
-void Temperature::updatePID() {
506
-  #if ENABLED(PIDTEMP)
507
-    #if ENABLED(PID_EXTRUSION_SCALING)
508
-      last_e_position = 0;
509
-    #endif
510
-  #endif
511
-}
512
-
513
 int Temperature::getHeaterPower(int heater) {
511
 int Temperature::getHeaterPower(int heater) {
514
   return heater < 0 ? soft_pwm_amount_bed : soft_pwm_amount[heater];
512
   return heater < 0 ? soft_pwm_amount_bed : soft_pwm_amount[heater];
515
 }
513
 }

+ 12
- 5
Marlin/src/module/temperature.h View File

430
      */
430
      */
431
     #if HAS_PID_HEATING
431
     #if HAS_PID_HEATING
432
       static void PID_autotune(const float temp, const int8_t hotend, const int8_t ncycles, const bool set_result=false);
432
       static void PID_autotune(const float temp, const int8_t hotend, const int8_t ncycles, const bool set_result=false);
433
-    #endif
434
 
433
 
435
-    /**
436
-     * Update the temp manager when PID values change
437
-     */
438
-    static void updatePID();
434
+      #if ENABLED(PIDTEMP)
435
+        /**
436
+         * Update the temp manager when PID values change
437
+         */
438
+        FORCE_INLINE static void updatePID() {
439
+          #if ENABLED(PID_EXTRUSION_SCALING)
440
+            last_e_position = 0;
441
+          #endif
442
+        }
443
+      #endif
444
+
445
+    #endif
439
 
446
 
440
     #if ENABLED(BABYSTEPPING)
447
     #if ENABLED(BABYSTEPPING)
441
 
448
 

Loading…
Cancel
Save