Parcourir la source

Merge pull request #8325 from LVD-AC/1.1.x-manual-probe

[1.1.x] PROBE_SELECTED etc.
Scott Lahteine il y a 7 ans
Parent
révision
2a54fd1444
Aucun compte lié à l'adresse e-mail de l'auteur

+ 2
- 2
Marlin/Marlin.h Voir le fichier

310
                delta_segments_per_second,
310
                delta_segments_per_second,
311
                delta_tower_angle_trim[ABC],
311
                delta_tower_angle_trim[ABC],
312
                delta_clip_start_height;
312
                delta_clip_start_height;
313
-  void recalc_delta_settings(float radius, float diagonal_rod, float tower_angle_trim[ABC]);
313
+  void recalc_delta_settings();
314
 #elif IS_SCARA
314
 #elif IS_SCARA
315
   void forward_kinematics_SCARA(const float &a, const float &b);
315
   void forward_kinematics_SCARA(const float &a, const float &b);
316
 #endif
316
 #endif
482
     // This won't work on SCARA since the probe offset rotates with the arm.
482
     // This won't work on SCARA since the probe offset rotates with the arm.
483
 
483
 
484
     return position_is_reachable(rx, ry)
484
     return position_is_reachable(rx, ry)
485
-        && position_is_reachable(rx - X_PROBE_OFFSET_FROM_EXTRUDER, ry - Y_PROBE_OFFSET_FROM_EXTRUDER);
485
+        && position_is_reachable(rx - (X_PROBE_OFFSET_FROM_EXTRUDER), ry - (Y_PROBE_OFFSET_FROM_EXTRUDER));
486
   }
486
   }
487
 
487
 
488
 #else // CARTESIAN
488
 #else // CARTESIAN

+ 31
- 47
Marlin/Marlin_main.cpp Voir le fichier

2333
    * @details Used by probe_pt to do a single Z probe.
2333
    * @details Used by probe_pt to do a single Z probe.
2334
    *          Leaves current_position[Z_AXIS] at the height where the probe triggered.
2334
    *          Leaves current_position[Z_AXIS] at the height where the probe triggered.
2335
    *
2335
    *
2336
-   * @param  short_move Flag for a shorter probe move towards the bed
2337
    * @return The raw Z position where the probe was triggered
2336
    * @return The raw Z position where the probe was triggered
2338
    */
2337
    */
2339
-  static float run_z_probe(const bool short_move=true) {
2338
+  static float run_z_probe() {
2340
 
2339
 
2341
     #if ENABLED(DEBUG_LEVELING_FEATURE)
2340
     #if ENABLED(DEBUG_LEVELING_FEATURE)
2342
       if (DEBUGGING(LEVELING)) DEBUG_POS(">>> run_z_probe", current_position);
2341
       if (DEBUGGING(LEVELING)) DEBUG_POS(">>> run_z_probe", current_position);
2374
     #endif
2373
     #endif
2375
 
2374
 
2376
     // move down slowly to find bed
2375
     // move down slowly to find bed
2377
-    if (do_probe_move(-10 + (short_move ? 0 : -(Z_MAX_LENGTH)), Z_PROBE_SPEED_SLOW)) return NAN;
2376
+    if (do_probe_move(-10, Z_PROBE_SPEED_SLOW)) return NAN;
2378
 
2377
 
2379
     #if ENABLED(DEBUG_LEVELING_FEATURE)
2378
     #if ENABLED(DEBUG_LEVELING_FEATURE)
2380
       if (DEBUGGING(LEVELING)) DEBUG_POS("<<< run_z_probe", current_position);
2379
       if (DEBUGGING(LEVELING)) DEBUG_POS("<<< run_z_probe", current_position);
2413
 
2412
 
2414
     const float nx = rx - (X_PROBE_OFFSET_FROM_EXTRUDER), ny = ry - (Y_PROBE_OFFSET_FROM_EXTRUDER);
2413
     const float nx = rx - (X_PROBE_OFFSET_FROM_EXTRUDER), ny = ry - (Y_PROBE_OFFSET_FROM_EXTRUDER);
2415
 
2414
 
2416
-    if (printable
2415
+    if (!printable
2417
       ? !position_is_reachable(nx, ny)
2416
       ? !position_is_reachable(nx, ny)
2418
       : !position_is_reachable_by_probe(rx, ry)
2417
       : !position_is_reachable_by_probe(rx, ry)
2419
     ) return NAN;
2418
     ) return NAN;
2420
 
2419
 
2421
-
2422
     const float old_feedrate_mm_s = feedrate_mm_s;
2420
     const float old_feedrate_mm_s = feedrate_mm_s;
2423
 
2421
 
2424
     #if ENABLED(DELTA)
2422
     #if ENABLED(DELTA)
2426
         do_blocking_move_to_z(delta_clip_start_height);
2424
         do_blocking_move_to_z(delta_clip_start_height);
2427
     #endif
2425
     #endif
2428
 
2426
 
2429
-    #if HAS_SOFTWARE_ENDSTOPS
2430
-      // Store the status of the soft endstops and disable if we're probing a non-printable location
2431
-      static bool enable_soft_endstops = soft_endstops_enabled;
2432
-      if (!printable) soft_endstops_enabled = false;
2433
-    #endif
2434
-
2435
     feedrate_mm_s = XY_PROBE_FEEDRATE_MM_S;
2427
     feedrate_mm_s = XY_PROBE_FEEDRATE_MM_S;
2436
 
2428
 
2437
     // Move the probe to the given XY
2429
     // Move the probe to the given XY
2439
 
2431
 
2440
     float measured_z = NAN;
2432
     float measured_z = NAN;
2441
     if (!DEPLOY_PROBE()) {
2433
     if (!DEPLOY_PROBE()) {
2442
-      measured_z = run_z_probe(printable);
2434
+      measured_z = run_z_probe();
2443
 
2435
 
2444
       if (!stow)
2436
       if (!stow)
2445
         do_blocking_move_to_z(current_position[Z_AXIS] + Z_CLEARANCE_BETWEEN_PROBES, MMM_TO_MMS(Z_PROBE_SPEED_FAST));
2437
         do_blocking_move_to_z(current_position[Z_AXIS] + Z_CLEARANCE_BETWEEN_PROBES, MMM_TO_MMS(Z_PROBE_SPEED_FAST));
2447
         if (STOW_PROBE()) measured_z = NAN;
2439
         if (STOW_PROBE()) measured_z = NAN;
2448
     }
2440
     }
2449
 
2441
 
2450
-    #if HAS_SOFTWARE_ENDSTOPS
2451
-      // Restore the soft endstop status
2452
-      soft_endstops_enabled = enable_soft_endstops;
2453
-    #endif
2454
-
2455
     if (verbose_level > 2) {
2442
     if (verbose_level > 2) {
2456
       SERIAL_PROTOCOLPGM("Bed X: ");
2443
       SERIAL_PROTOCOLPGM("Bed X: ");
2457
       SERIAL_PROTOCOL_F(LOGICAL_X_POSITION(rx), 3);
2444
       SERIAL_PROTOCOL_F(LOGICAL_X_POSITION(rx), 3);
5592
                       r = delta_calibration_radius * 0.1;
5579
                       r = delta_calibration_radius * 0.1;
5593
           z_at_pt[CEN] +=
5580
           z_at_pt[CEN] +=
5594
             #if HAS_BED_PROBE
5581
             #if HAS_BED_PROBE
5595
-              probe_pt(cos(a) * r + dx, sin(a) * r + dy, stow_after_each, 1)
5582
+              probe_pt(cos(a) * r + dx, sin(a) * r + dy, stow_after_each, 1, false)
5596
             #else
5583
             #else
5597
               lcd_probe_pt(cos(a) * r, sin(a) * r)
5584
               lcd_probe_pt(cos(a) * r, sin(a) * r)
5598
             #endif
5585
             #endif
5621
                         interpol = fmod(axis, 1);
5608
                         interpol = fmod(axis, 1);
5622
             const float z_temp =
5609
             const float z_temp =
5623
               #if HAS_BED_PROBE
5610
               #if HAS_BED_PROBE
5624
-                probe_pt(cos(a) * r + dx, sin(a) * r + dy, stow_after_each, 1)
5611
+                probe_pt(cos(a) * r + dx, sin(a) * r + dy, stow_after_each, 1, false)
5625
               #else
5612
               #else
5626
                 lcd_probe_pt(cos(a) * r, sin(a) * r)
5613
                 lcd_probe_pt(cos(a) * r, sin(a) * r)
5627
               #endif
5614
               #endif
5637
             z_at_pt[axis] /= _7P_STEP  / steps;
5624
             z_at_pt[axis] /= _7P_STEP  / steps;
5638
       }
5625
       }
5639
 
5626
 
5640
-
5641
       float S1 = z_at_pt[CEN],
5627
       float S1 = z_at_pt[CEN],
5642
             S2 = sq(z_at_pt[CEN]);
5628
             S2 = sq(z_at_pt[CEN]);
5643
       int16_t N = 1;
5629
       int16_t N = 1;
5675
 
5661
 
5676
       LOOP_XYZ(axis) {
5662
       LOOP_XYZ(axis) {
5677
         delta_endstop_adj[axis] -= 1.0;
5663
         delta_endstop_adj[axis] -= 1.0;
5664
+        recalc_delta_settings();
5678
 
5665
 
5679
         endstops.enable(true);
5666
         endstops.enable(true);
5680
         if (!home_delta()) return;
5667
         if (!home_delta()) return;
5688
         LOOP_CAL_ALL(axis) z_at_pt[axis] -= z_at_pt_base[axis];
5675
         LOOP_CAL_ALL(axis) z_at_pt[axis] -= z_at_pt_base[axis];
5689
         print_G33_results(z_at_pt, true, true);
5676
         print_G33_results(z_at_pt, true, true);
5690
         delta_endstop_adj[axis] += 1.0;
5677
         delta_endstop_adj[axis] += 1.0;
5678
+        recalc_delta_settings();
5691
         switch (axis) {
5679
         switch (axis) {
5692
           case A_AXIS :
5680
           case A_AXIS :
5693
             h_fac += 4.0 / (Z03(CEN) +Z01(__A)                               +Z32(_CA) +Z32(_AB)); // Offset by X-tower end-stop
5681
             h_fac += 4.0 / (Z03(CEN) +Z01(__A)                               +Z32(_CA) +Z32(_AB)); // Offset by X-tower end-stop
5705
 
5693
 
5706
       for (int8_t zig_zag = -1; zig_zag < 2; zig_zag += 2) {
5694
       for (int8_t zig_zag = -1; zig_zag < 2; zig_zag += 2) {
5707
         delta_radius += 1.0 * zig_zag;
5695
         delta_radius += 1.0 * zig_zag;
5708
-        recalc_delta_settings(delta_radius, delta_diagonal_rod, delta_tower_angle_trim);
5696
+        recalc_delta_settings();
5709
 
5697
 
5710
         endstops.enable(true);
5698
         endstops.enable(true);
5711
         if (!home_delta()) return;
5699
         if (!home_delta()) return;
5718
         LOOP_CAL_ALL(axis) z_at_pt[axis] -= z_at_pt_base[axis];
5706
         LOOP_CAL_ALL(axis) z_at_pt[axis] -= z_at_pt_base[axis];
5719
         print_G33_results(z_at_pt, true, true);
5707
         print_G33_results(z_at_pt, true, true);
5720
         delta_radius -= 1.0 * zig_zag;
5708
         delta_radius -= 1.0 * zig_zag;
5721
-        recalc_delta_settings(delta_radius, delta_diagonal_rod, delta_tower_angle_trim);
5709
+        recalc_delta_settings();
5722
         r_fac -= zig_zag * 6.0 / (Z03(__A) +Z03(__B) +Z03(__C) +Z03(_BC) +Z03(_CA) +Z03(_AB)); // Offset by delta radius
5710
         r_fac -= zig_zag * 6.0 / (Z03(__A) +Z03(__B) +Z03(__C) +Z03(_BC) +Z03(_CA) +Z03(_AB)); // Offset by delta radius
5723
       }
5711
       }
5724
       r_fac /= 2.0;
5712
       r_fac /= 2.0;
5731
         z_temp = MAX3(delta_endstop_adj[A_AXIS], delta_endstop_adj[B_AXIS], delta_endstop_adj[C_AXIS]);
5719
         z_temp = MAX3(delta_endstop_adj[A_AXIS], delta_endstop_adj[B_AXIS], delta_endstop_adj[C_AXIS]);
5732
         delta_height -= z_temp;
5720
         delta_height -= z_temp;
5733
         LOOP_XYZ(axis) delta_endstop_adj[axis] -= z_temp;
5721
         LOOP_XYZ(axis) delta_endstop_adj[axis] -= z_temp;
5734
-        recalc_delta_settings(delta_radius, delta_diagonal_rod, delta_tower_angle_trim);
5722
+        recalc_delta_settings();
5735
 
5723
 
5736
         endstops.enable(true);
5724
         endstops.enable(true);
5737
         if (!home_delta()) return;
5725
         if (!home_delta()) return;
5751
         z_temp = MAX3(delta_endstop_adj[A_AXIS], delta_endstop_adj[B_AXIS], delta_endstop_adj[C_AXIS]);
5739
         z_temp = MAX3(delta_endstop_adj[A_AXIS], delta_endstop_adj[B_AXIS], delta_endstop_adj[C_AXIS]);
5752
         delta_height -= z_temp;
5740
         delta_height -= z_temp;
5753
         LOOP_XYZ(axis) delta_endstop_adj[axis] -= z_temp;
5741
         LOOP_XYZ(axis) delta_endstop_adj[axis] -= z_temp;
5754
-        recalc_delta_settings(delta_radius, delta_diagonal_rod, delta_tower_angle_trim);
5742
+        recalc_delta_settings();
5755
         switch (axis) {
5743
         switch (axis) {
5756
           case A_AXIS :
5744
           case A_AXIS :
5757
           a_fac += 4.0 / (          Z06(__B) -Z06(__C)           +Z06(_CA) -Z06(_AB)); // Offset by alpha tower angle
5745
           a_fac += 4.0 / (          Z06(__B) -Z06(__C)           +Z06(_CA) -Z06(_AB)); // Offset by alpha tower angle
6038
         delta_height -= z_temp;
6026
         delta_height -= z_temp;
6039
         LOOP_XYZ(axis) delta_endstop_adj[axis] -= z_temp;
6027
         LOOP_XYZ(axis) delta_endstop_adj[axis] -= z_temp;
6040
       }
6028
       }
6041
-      recalc_delta_settings(delta_radius, delta_diagonal_rod, delta_tower_angle_trim);
6029
+      recalc_delta_settings();
6042
       NOMORE(zero_std_dev_min, zero_std_dev);
6030
       NOMORE(zero_std_dev_min, zero_std_dev);
6043
 
6031
 
6044
       // print report
6032
       // print report
8997
     if (parser.seen('X')) delta_tower_angle_trim[A_AXIS] = parser.value_float();
8985
     if (parser.seen('X')) delta_tower_angle_trim[A_AXIS] = parser.value_float();
8998
     if (parser.seen('Y')) delta_tower_angle_trim[B_AXIS] = parser.value_float();
8986
     if (parser.seen('Y')) delta_tower_angle_trim[B_AXIS] = parser.value_float();
8999
     if (parser.seen('Z')) delta_tower_angle_trim[C_AXIS] = parser.value_float();
8987
     if (parser.seen('Z')) delta_tower_angle_trim[C_AXIS] = parser.value_float();
9000
-    recalc_delta_settings(delta_radius, delta_diagonal_rod, delta_tower_angle_trim);
8988
+    recalc_delta_settings();
9001
   }
8989
   }
9002
   /**
8990
   /**
9003
    * M666: Set delta endstop adjustment
8991
    * M666: Set delta endstop adjustment
9440
     if (parser.seen('I')) thermalManager.bedKi = scalePID_i(parser.value_float());
9428
     if (parser.seen('I')) thermalManager.bedKi = scalePID_i(parser.value_float());
9441
     if (parser.seen('D')) thermalManager.bedKd = scalePID_d(parser.value_float());
9429
     if (parser.seen('D')) thermalManager.bedKd = scalePID_d(parser.value_float());
9442
 
9430
 
9443
-    thermalManager.updatePID();
9444
-
9445
     SERIAL_ECHO_START();
9431
     SERIAL_ECHO_START();
9446
     SERIAL_ECHOPAIR(" p:", thermalManager.bedKp);
9432
     SERIAL_ECHOPAIR(" p:", thermalManager.bedKp);
9447
     SERIAL_ECHOPAIR(" i:", unscalePID_i(thermalManager.bedKi));
9433
     SERIAL_ECHOPAIR(" i:", unscalePID_i(thermalManager.bedKi));
11409
 
11395
 
11410
       #endif // HAS_BED_PROBE
11396
       #endif // HAS_BED_PROBE
11411
 
11397
 
11412
-      #if PROBE_SELECTED
11413
-
11414
-        #if ENABLED(DELTA_AUTO_CALIBRATION)
11398
+      #if ENABLED(DELTA_AUTO_CALIBRATION)
11415
 
11399
 
11416
-          case 33: // G33: Delta Auto-Calibration
11417
-            gcode_G33();
11418
-            break;
11419
-
11420
-        #endif // DELTA_AUTO_CALIBRATION
11400
+        case 33: // G33: Delta Auto-Calibration
11401
+          gcode_G33();
11402
+          break;
11421
 
11403
 
11422
-      #endif // PROBE_SELECTED
11404
+      #endif // DELTA_AUTO_CALIBRATION
11423
 
11405
 
11424
       #if ENABLED(G38_PROBE_TARGET)
11406
       #if ENABLED(G38_PROBE_TARGET)
11425
         case 38: // G38.2 & G38.3
11407
         case 38: // G38.2 & G38.3
12355
    * Recalculate factors used for delta kinematics whenever
12337
    * Recalculate factors used for delta kinematics whenever
12356
    * settings have been changed (e.g., by M665).
12338
    * settings have been changed (e.g., by M665).
12357
    */
12339
    */
12358
-  void recalc_delta_settings(float radius, float diagonal_rod, float tower_angle_trim[ABC]) {
12340
+  void recalc_delta_settings() {
12359
     const float trt[ABC] = DELTA_RADIUS_TRIM_TOWER,
12341
     const float trt[ABC] = DELTA_RADIUS_TRIM_TOWER,
12360
                 drt[ABC] = DELTA_DIAGONAL_ROD_TRIM_TOWER;
12342
                 drt[ABC] = DELTA_DIAGONAL_ROD_TRIM_TOWER;
12361
-    delta_tower[A_AXIS][X_AXIS] = cos(RADIANS(210 + tower_angle_trim[A_AXIS])) * (radius + trt[A_AXIS]); // front left tower
12362
-    delta_tower[A_AXIS][Y_AXIS] = sin(RADIANS(210 + tower_angle_trim[A_AXIS])) * (radius + trt[A_AXIS]);
12363
-    delta_tower[B_AXIS][X_AXIS] = cos(RADIANS(330 + tower_angle_trim[B_AXIS])) * (radius + trt[B_AXIS]); // front right tower
12364
-    delta_tower[B_AXIS][Y_AXIS] = sin(RADIANS(330 + tower_angle_trim[B_AXIS])) * (radius + trt[B_AXIS]);
12365
-    delta_tower[C_AXIS][X_AXIS] = cos(RADIANS( 90 + tower_angle_trim[C_AXIS])) * (radius + trt[C_AXIS]); // back middle tower
12366
-    delta_tower[C_AXIS][Y_AXIS] = sin(RADIANS( 90 + tower_angle_trim[C_AXIS])) * (radius + trt[C_AXIS]);
12367
-    delta_diagonal_rod_2_tower[A_AXIS] = sq(diagonal_rod + drt[A_AXIS]);
12368
-    delta_diagonal_rod_2_tower[B_AXIS] = sq(diagonal_rod + drt[B_AXIS]);
12369
-    delta_diagonal_rod_2_tower[C_AXIS] = sq(diagonal_rod + drt[C_AXIS]);
12343
+    delta_tower[A_AXIS][X_AXIS] = cos(RADIANS(210 + delta_tower_angle_trim[A_AXIS])) * (delta_radius + trt[A_AXIS]); // front left tower
12344
+    delta_tower[A_AXIS][Y_AXIS] = sin(RADIANS(210 + delta_tower_angle_trim[A_AXIS])) * (delta_radius + trt[A_AXIS]);
12345
+    delta_tower[B_AXIS][X_AXIS] = cos(RADIANS(330 + delta_tower_angle_trim[B_AXIS])) * (delta_radius + trt[B_AXIS]); // front right tower
12346
+    delta_tower[B_AXIS][Y_AXIS] = sin(RADIANS(330 + delta_tower_angle_trim[B_AXIS])) * (delta_radius + trt[B_AXIS]);
12347
+    delta_tower[C_AXIS][X_AXIS] = cos(RADIANS( 90 + delta_tower_angle_trim[C_AXIS])) * (delta_radius + trt[C_AXIS]); // back middle tower
12348
+    delta_tower[C_AXIS][Y_AXIS] = sin(RADIANS( 90 + delta_tower_angle_trim[C_AXIS])) * (delta_radius + trt[C_AXIS]);
12349
+    delta_diagonal_rod_2_tower[A_AXIS] = sq(delta_diagonal_rod + drt[A_AXIS]);
12350
+    delta_diagonal_rod_2_tower[B_AXIS] = sq(delta_diagonal_rod + drt[B_AXIS]);
12351
+    delta_diagonal_rod_2_tower[C_AXIS] = sq(delta_diagonal_rod + drt[C_AXIS]);
12352
+    update_software_endstops(Z_AXIS);
12353
+    axis_homed[X_AXIS] = axis_homed[Y_AXIS] = axis_homed[Z_AXIS] = false;
12370
   }
12354
   }
12371
 
12355
 
12372
   #if ENABLED(DELTA_FAST_SQRT)
12356
   #if ENABLED(DELTA_FAST_SQRT)

+ 1
- 1
Marlin/configuration_store.cpp Voir le fichier

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

+ 2
- 2
Marlin/example_configurations/delta/FLSUN/auto_calibrate/Configuration.h Voir le fichier

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/example_configurations/delta/FLSUN/kossel_mini/Configuration.h Voir le fichier

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/example_configurations/delta/generic/Configuration.h Voir le fichier

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/example_configurations/delta/kossel_mini/Configuration.h Voir le fichier

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/example_configurations/delta/kossel_pro/Configuration.h Voir le fichier

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/example_configurations/delta/kossel_xl/Configuration.h Voir le fichier

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

+ 7
- 9
Marlin/temperature.cpp Voir le fichier

215
 
215
 
216
 #if HAS_PID_HEATING
216
 #if HAS_PID_HEATING
217
 
217
 
218
+  /**
219
+   * PID Autotuning (M303)
220
+   *
221
+   * Alternately heat and cool the nozzle, observing its behavior to
222
+   * determine the best PID values to achieve a stable temperature.
223
+   */
218
   void Temperature::PID_autotune(const float temp, const int8_t hotend, const int8_t ncycles, const bool set_result/*=false*/) {
224
   void Temperature::PID_autotune(const float temp, const int8_t hotend, const int8_t ncycles, const bool set_result/*=false*/) {
219
     float input = 0.0;
225
     float input = 0.0;
220
     int cycles = 0;
226
     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/temperature.h Voir le fichier

438
      */
438
      */
439
     #if HAS_PID_HEATING
439
     #if HAS_PID_HEATING
440
       static void PID_autotune(const float temp, const int8_t hotend, const int8_t ncycles, const bool set_result=false);
440
       static void PID_autotune(const float temp, const int8_t hotend, const int8_t ncycles, const bool set_result=false);
441
-    #endif
442
 
441
 
443
-    /**
444
-     * Update the temp manager when PID values change
445
-     */
446
-    static void updatePID();
442
+      /**
443
+       * Update the temp manager when PID values change
444
+       */
445
+      #if ENABLED(PIDTEMP)
446
+        FORCE_INLINE static void updatePID() {
447
+          #if ENABLED(PID_EXTRUSION_SCALING)
448
+            last_e_position = 0;
449
+          #endif
450
+        }
451
+      #endif
452
+
453
+    #endif
447
 
454
 
448
     #if ENABLED(BABYSTEPPING)
455
     #if ENABLED(BABYSTEPPING)
449
 
456
 

+ 26
- 24
Marlin/ultralcd.cpp Voir le fichier

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

Chargement…
Annuler
Enregistrer