Browse Source

Initial patches to G33

Scott Lahteine 8 years ago
parent
commit
29fa241617
2 changed files with 94 additions and 69 deletions
  1. 93
    68
      Marlin/Marlin_main.cpp
  2. 1
    1
      Marlin/ultralcd.cpp

+ 93
- 68
Marlin/Marlin_main.cpp View File

1838
 
1838
 
1839
 #endif //HAS_BED_PROBE
1839
 #endif //HAS_BED_PROBE
1840
 
1840
 
1841
-#if ENABLED(Z_PROBE_ALLEN_KEY) || ENABLED(Z_PROBE_SLED) || HAS_PROBING_PROCEDURE || HOTENDS > 1 || ENABLED(NOZZLE_CLEAN_FEATURE) || ENABLED(NOZZLE_PARK_FEATURE)
1841
+#if HAS_PROBING_PROCEDURE || HOTENDS > 1 || ENABLED(Z_PROBE_ALLEN_KEY) || ENABLED(Z_PROBE_SLED) || ENABLED(NOZZLE_CLEAN_FEATURE) || ENABLED(NOZZLE_PARK_FEATURE) || ENABLED(DELTA_AUTO_CALIBRATION)
1842
+
1842
   bool axis_unhomed_error(const bool x, const bool y, const bool z) {
1843
   bool axis_unhomed_error(const bool x, const bool y, const bool z) {
1843
     const bool xx = x && !axis_homed[X_AXIS],
1844
     const bool xx = x && !axis_homed[X_AXIS],
1844
                yy = y && !axis_homed[Y_AXIS],
1845
                yy = y && !axis_homed[Y_AXIS],
1858
     }
1859
     }
1859
     return false;
1860
     return false;
1860
   }
1861
   }
1862
+
1861
 #endif
1863
 #endif
1862
 
1864
 
1863
 #if ENABLED(Z_PROBE_SLED)
1865
 #if ENABLED(Z_PROBE_SLED)
4941
 
4943
 
4942
   /**
4944
   /**
4943
    * G30: Do a single Z probe at the current XY
4945
    * G30: Do a single Z probe at the current XY
4944
-   * Usage:
4945
-   *   G30 <X#> <Y#> <S#>
4946
-   *     X = Probe X position (default=current probe position)
4947
-   *     Y = Probe Y position (default=current probe position)
4948
-   *     S = Stows the probe if 1 (default=1)
4946
+   *
4947
+   * Parameters:
4948
+   *
4949
+   *   X   Probe X position (default current X)
4950
+   *   Y   Probe Y position (default current Y)
4951
+   *   S0  Leave the probe deployed
4949
    */
4952
    */
4950
   inline void gcode_G30() {
4953
   inline void gcode_G30() {
4951
     const float xpos = code_seen('X') ? code_value_linear_units() : current_position[X_AXIS] + X_PROBE_OFFSET_FROM_EXTRUDER,
4954
     const float xpos = code_seen('X') ? code_value_linear_units() : current_position[X_AXIS] + X_PROBE_OFFSET_FROM_EXTRUDER,
4996
      *   C0     Calibrate height
4999
      *   C0     Calibrate height
4997
      *   C1     Probe the center to set the Z height
5000
      *   C1     Probe the center to set the Z height
4998
      *   C-1    same but 1 iteration only
5001
      *   C-1    same but 1 iteration only
4999
-     *   C2     probes center and towers / sets height, endstops and delta radius
5002
+     *   C2     probe center and towers, set height, endstops, and delta radius
5000
      *   C-2    same but opposite towers
5003
      *   C-2    same but opposite towers
5001
-     *   C3     probes all points: center, towers and opposite towers / sets all
5004
+     *
5005
+     *   C3     probe all points: center, towers and opposite towers / sets all
5006
+     *
5007
+     *   C4-C7  probe all points multiple times and average
5002
      *   C0-C3  same but tower angle calibration disabled
5008
      *   C0-C3  same but tower angle calibration disabled
5003
-     *   C4-C7  probes all points multiple times and averages
5004
      *
5009
      *
5005
-     *   V Verbose level (0-2, default 1)
5006
-     *     V0 dry-run mode. no calibration
5007
-     *     V1 settings
5008
-     *     V2 setting and probe results
5010
+     *   V0     Dry-run mode
5011
+     *   V1     Output settings
5012
+     *   V2     Output setting and probe results
5009
      */
5013
      */
5010
     inline void gcode_G33() {
5014
     inline void gcode_G33() {
5011
 
5015
 
5016
+      if (axis_unhomed_error(true, true, true)) return;
5017
+
5018
+      const int8_t c_value = code_seen('C') ? code_value_int() : DELTA_CALIBRATION_DEFAULT_POINTS;
5019
+      if (!WITHIN(c_value, -7, 7)) {
5020
+        SERIAL_PROTOCOLLNPGM("?C parameter is implausible (-7 to 7).");
5021
+        return;
5022
+      }
5023
+
5024
+      const int8_t verbose_level = code_seen('V') ? code_value_byte() : 1;
5025
+      if (!WITHIN(verbose_level, 0, 2)) {
5026
+        SERIAL_PROTOCOLLNPGM("?(V)erbose Level is implausible (0-2).");
5027
+        return;
5028
+      }
5029
+
5012
       stepper.synchronize();
5030
       stepper.synchronize();
5013
 
5031
 
5014
       #if PLANNER_LEVELING
5032
       #if PLANNER_LEVELING
5015
         set_bed_leveling_enabled(false);
5033
         set_bed_leveling_enabled(false);
5016
       #endif
5034
       #endif
5017
 
5035
 
5018
-      const int8_t pp = code_seen('C') ? code_value_int() : DELTA_CALIBRATION_DEFAULT_POINTS,
5019
-                   probe_points = (WITHIN(pp, -7, -1) || WITHIN(pp, 1, 7)) ? pp : DELTA_CALIBRATION_DEFAULT_POINTS;
5020
-
5021
-      int8_t verbose_level = code_seen('V') ? code_value_byte() : 1;
5036
+      const static char save_message[] PROGMEM = "Save with M500 and/or copy to Configuration.h";
5022
 
5037
 
5023
-      if (!WITHIN(verbose_level, 0, 2)) verbose_level = 1;
5038
+      const uint8_t probe_points = abs(c_value);
5024
 
5039
 
5025
-      float zero_std_dev = verbose_level ? 999.0 : 0.0;                                          // 0.0 in dry-run mode : forced end
5026
-
5027
-      gcode_G28();
5040
+      const bool neg = c_value < 0,
5041
+                 equals4 = probe_points == 4,
5042
+                 over4 = probe_points > 4,
5043
+                 over5 = probe_points > 5;
5028
 
5044
 
5029
       float e_old[XYZ],
5045
       float e_old[XYZ],
5030
             dr_old = delta_radius,
5046
             dr_old = delta_radius,
5031
             zh_old = home_offset[Z_AXIS],
5047
             zh_old = home_offset[Z_AXIS],
5032
             alpha_old = delta_tower_angle_trim[A_AXIS],
5048
             alpha_old = delta_tower_angle_trim[A_AXIS],
5033
             beta_old = delta_tower_angle_trim[B_AXIS];
5049
             beta_old = delta_tower_angle_trim[B_AXIS];
5034
-      COPY(e_old,endstop_adj);
5050
+
5051
+      COPY(e_old, endstop_adj);
5035
 
5052
 
5036
       // print settings
5053
       // print settings
5037
 
5054
 
5042
       LCD_MESSAGEPGM("Checking... AC");
5059
       LCD_MESSAGEPGM("Checking... AC");
5043
 
5060
 
5044
       SERIAL_PROTOCOLPAIR(".Height:", DELTA_HEIGHT + home_offset[Z_AXIS]);
5061
       SERIAL_PROTOCOLPAIR(".Height:", DELTA_HEIGHT + home_offset[Z_AXIS]);
5045
-      if (abs(probe_points) > 1) {
5062
+      if (probe_points > 1) {
5046
         SERIAL_PROTOCOLPGM("    Ex:");
5063
         SERIAL_PROTOCOLPGM("    Ex:");
5047
         if (endstop_adj[A_AXIS] >= 0) SERIAL_CHAR('+');
5064
         if (endstop_adj[A_AXIS] >= 0) SERIAL_CHAR('+');
5048
         SERIAL_PROTOCOL_F(endstop_adj[A_AXIS], 2);
5065
         SERIAL_PROTOCOL_F(endstop_adj[A_AXIS], 2);
5055
         SERIAL_PROTOCOLPAIR("    Radius:", delta_radius);
5072
         SERIAL_PROTOCOLPAIR("    Radius:", delta_radius);
5056
       }
5073
       }
5057
       SERIAL_EOL;
5074
       SERIAL_EOL;
5058
-      if (probe_points > 2) {
5075
+      if (c_value > 2) {
5059
         SERIAL_PROTOCOLPGM(".Tower angle :    Tx:");
5076
         SERIAL_PROTOCOLPGM(".Tower angle :    Tx:");
5060
         if (delta_tower_angle_trim[A_AXIS] >= 0) SERIAL_CHAR('+');
5077
         if (delta_tower_angle_trim[A_AXIS] >= 0) SERIAL_CHAR('+');
5061
         SERIAL_PROTOCOL_F(delta_tower_angle_trim[A_AXIS], 2);
5078
         SERIAL_PROTOCOL_F(delta_tower_angle_trim[A_AXIS], 2);
5070
         DEPLOY_PROBE();
5087
         DEPLOY_PROBE();
5071
       #endif
5088
       #endif
5072
 
5089
 
5073
-      float test_precision;
5090
+      float zero_std_dev = verbose_level ? 999.0 : 0.0, // 0.0 in dry-run mode : forced end
5091
+            test_precision;
5074
       int8_t iterations = 0;
5092
       int8_t iterations = 0;
5075
-
5076
-      do { // start iterations
5093
+      do {
5077
 
5094
 
5078
         setup_for_endstop_or_probe_move();
5095
         setup_for_endstop_or_probe_move();
5079
 
5096
 
5085
 
5102
 
5086
         int16_t center_points = 0;
5103
         int16_t center_points = 0;
5087
 
5104
 
5088
-        if (abs(probe_points) != 3 &&  abs(probe_points != 6)) {                                 // probe centre
5105
+        if (probe_points != 3 && probe_points != 6) {                                       // probe center
5089
           z_at_pt[0] += probe_pt(0.0, 0.0 , true, 1);
5106
           z_at_pt[0] += probe_pt(0.0, 0.0 , true, 1);
5090
           center_points = 1;
5107
           center_points = 1;
5091
         }
5108
         }
5092
 
5109
 
5093
-        int16_t step_axis = (abs(probe_points) > 4) ? 2 : 4;                                              
5094
-        if (abs(probe_points) >= 3) {                                                            // probe extra 3 or 6 centre points
5095
-          for (int8_t axis = (abs(probe_points) > 4) ? 11 : 9; axis > 0; axis -= step_axis) {              
5110
+        int16_t step_axis = over4 ? 2 : 4;
5111
+        if (probe_points >= 3) {                                                            // probe extra 3 or 6 center points
5112
+          for (int8_t axis = over4 ? 11 : 9; axis > 0; axis -= step_axis) {
5096
             z_at_pt[0] += probe_pt(
5113
             z_at_pt[0] += probe_pt(
5097
               cos(RADIANS(180 + 30 * axis)) * (0.1 * delta_calibration_radius),
5114
               cos(RADIANS(180 + 30 * axis)) * (0.1 * delta_calibration_radius),
5098
               sin(RADIANS(180 + 30 * axis)) * (0.1 * delta_calibration_radius), true, 1);
5115
               sin(RADIANS(180 + 30 * axis)) * (0.1 * delta_calibration_radius), true, 1);
5099
           }
5116
           }
5100
-          center_points += (abs(probe_points) > 4) ? 6 : 3;                                       // average centre points
5117
+          center_points += over4 ? 6 : 3;                                       // average center points
5101
           z_at_pt[0] /= center_points;
5118
           z_at_pt[0] /= center_points;
5102
         }
5119
         }
5103
 
5120
 
5104
         float S1 = z_at_pt[0], S2 = sq(S1);
5121
         float S1 = z_at_pt[0], S2 = sq(S1);
5105
 
5122
 
5106
-        int16_t N = 1, start = (probe_points == -2) ? 3 : 1;
5107
-        step_axis = (abs(probe_points) == 2) ? 4 : (abs(probe_points) == 4 || abs(probe_points) > 5) ? 1 : 2;
5108
-        float start_circles = (abs(probe_points) > 6) ? -1.5 : (abs(probe_points) > 4) ? -1 : 0, // one or multi radius points
5109
-              end_circles = (abs(probe_points) > 6) ? 1.5 : (abs(probe_points) > 4) ? 1 : 0;     // one or multi radius points
5110
-        int8_t zig_zag = 1;
5123
+        int16_t N = 1, start = (c_value == -2) ? 3 : 1;
5124
+        step_axis = (probe_points == 2) ? 4 : (equals4 || over5) ? 1 : 2;
5111
 
5125
 
5112
-        if (abs(probe_points) > 1) {
5126
+        if (probe_points > 1) {
5127
+          float start_circles = (probe_points > 6) ? -1.5 : over4 ? -1 : 0, // one or multi radius points
5128
+                  end_circles = -start_circles;
5129
+          bool zig_zag = true;
5113
           for (uint8_t axis = start; axis < 13; axis += step_axis) {                             // probes 3, 6 or 12 points on the calibration radius
5130
           for (uint8_t axis = start; axis < 13; axis += step_axis) {                             // probes 3, 6 or 12 points on the calibration radius
5114
             for (float circles = start_circles ; circles <= end_circles; circles++)              // one or multi radius points
5131
             for (float circles = start_circles ; circles <= end_circles; circles++)              // one or multi radius points
5115
               z_at_pt[axis] += probe_pt(
5132
               z_at_pt[axis] += probe_pt(
5116
-                cos(RADIANS(180 + 30 * axis)) * ((1 + circles * 0.1 * zig_zag) * delta_calibration_radius), 
5117
-                sin(RADIANS(180 + 30 * axis)) * ((1 + circles * 0.1 * zig_zag) * delta_calibration_radius), true, 1);
5133
+                cos(RADIANS(180 + 30 * axis)) * ((1 + circles * 0.1 * (zig_zag ? 1 : -1)) * delta_calibration_radius),
5134
+                sin(RADIANS(180 + 30 * axis)) * ((1 + circles * 0.1 * (zig_zag ? 1 : -1)) * delta_calibration_radius), true, 1);
5118
 
5135
 
5119
-            if (abs(probe_points) > 5) start_circles += (zig_zag == 1) ? +0.5 : -0.5;            // opposites: one radius point less
5120
-            if (abs(probe_points) > 5) end_circles += (zig_zag == 1) ? -0.5 : +0.5;
5121
-            zig_zag = -zig_zag;
5122
-            if (abs(probe_points) > 4) z_at_pt[axis] /= (zig_zag == 1) ? 3.0 : 2.0;              // average between radius points
5136
+            if (over5) start_circles += zig_zag ? +0.5 : -0.5;            // opposites: one radius point less
5137
+            if (over5) end_circles += zig_zag ? -0.5 : +0.5;
5138
+            zig_zag = !zig_zag;
5139
+            if (over4) z_at_pt[axis] /= (zig_zag ? 3.0 : 2.0);              // average between radius points
5123
           }
5140
           }
5124
         }
5141
         }
5125
-        if (abs(probe_points) == 4 || abs(probe_points) > 5) step_axis = 2;
5126
 
5142
 
5143
+        if (equals4 || over5) step_axis = 2;
5127
         for (uint8_t axis = start; axis < 13; axis += step_axis) {                               // average half intermediates to towers and opposites
5144
         for (uint8_t axis = start; axis < 13; axis += step_axis) {                               // average half intermediates to towers and opposites
5128
-          if (abs(probe_points) == 4 || abs(probe_points) > 5)
5145
+          if (equals4 || over5)
5129
             z_at_pt[axis] = (z_at_pt[axis] + (z_at_pt[axis + 1] + z_at_pt[(axis + 10) % 12 + 1]) / 2.0) / 2.0;
5146
             z_at_pt[axis] = (z_at_pt[axis] + (z_at_pt[axis + 1] + z_at_pt[(axis + 10) % 12 + 1]) / 2.0) / 2.0;
5130
 
5147
 
5131
           S1 += z_at_pt[axis];
5148
           S1 += z_at_pt[axis];
5132
           S2 += sq(z_at_pt[axis]);
5149
           S2 += sq(z_at_pt[axis]);
5133
           N++;
5150
           N++;
5134
         }
5151
         }
5135
-        zero_std_dev = round(sqrt(S2 / N) * 1000.0) / 1000.0 + 0.00001;                          // deviation from zero plane
5136
 
5152
 
5137
         // Solve matrices
5153
         // Solve matrices
5138
 
5154
 
5155
+        zero_std_dev = round(sqrt(S2 / N) * 1000.0) / 1000.0 + 0.00001;                          // deviation from zero plane
5156
+
5139
         if (zero_std_dev < test_precision) {
5157
         if (zero_std_dev < test_precision) {
5140
           COPY(e_old, endstop_adj);
5158
           COPY(e_old, endstop_adj);
5141
           dr_old = delta_radius;
5159
           dr_old = delta_radius;
5145
 
5163
 
5146
           float e_delta[XYZ] = { 0.0 }, r_delta = 0.0,
5164
           float e_delta[XYZ] = { 0.0 }, r_delta = 0.0,
5147
                 t_alpha = 0.0, t_beta = 0.0;
5165
                 t_alpha = 0.0, t_beta = 0.0;
5166
+
5148
           const float r_diff = delta_radius - delta_calibration_radius,
5167
           const float r_diff = delta_radius - delta_calibration_radius,
5149
                       h_factor = 1.00 + r_diff * 0.001,                                          //1.02 for r_diff = 20mm
5168
                       h_factor = 1.00 + r_diff * 0.001,                                          //1.02 for r_diff = 20mm
5150
                       r_factor = -(1.75 + 0.005 * r_diff + 0.001 * sq(r_diff)),                  //2.25 for r_diff = 20mm
5169
                       r_factor = -(1.75 + 0.005 * r_diff + 0.001 * sq(r_diff)),                  //2.25 for r_diff = 20mm
5162
           #define Z0444(I) ZP(a_factor * 4.0 / 9.0, I)
5181
           #define Z0444(I) ZP(a_factor * 4.0 / 9.0, I)
5163
           #define Z0888(I) ZP(a_factor * 8.0 / 9.0, I)
5182
           #define Z0888(I) ZP(a_factor * 8.0 / 9.0, I)
5164
 
5183
 
5165
-          switch (probe_points) {
5184
+          switch (c_value) {
5166
             case -1:
5185
             case -1:
5167
               test_precision = 0.00;
5186
               test_precision = 0.00;
5168
             case 1:
5187
             case 1:
5177
               break;
5196
               break;
5178
 
5197
 
5179
             case -2:
5198
             case -2:
5180
-              e_delta[X_AXIS] = Z1050(0)                                  - Z0700(7) + Z0350(11) + Z0350(3);
5181
-              e_delta[Y_AXIS] = Z1050(0)                                  + Z0350(7) - Z0700(11) + Z0350(3);
5182
-              e_delta[Z_AXIS] = Z1050(0)                                  + Z0350(7) + Z0350(11) - Z0700(3);
5183
-              r_delta         = Z2250(0)                                  - Z0750(7) - Z0750(11) - Z0750(3);
5199
+              e_delta[X_AXIS] = Z1050(0) - Z0700(7) + Z0350(11) + Z0350(3);
5200
+              e_delta[Y_AXIS] = Z1050(0) + Z0350(7) - Z0700(11) + Z0350(3);
5201
+              e_delta[Z_AXIS] = Z1050(0) + Z0350(7) + Z0350(11) - Z0700(3);
5202
+              r_delta         = Z2250(0) - Z0750(7) - Z0750(11) - Z0750(3);
5184
               break;
5203
               break;
5185
 
5204
 
5186
             default:
5205
             default:
5188
               e_delta[Y_AXIS] = Z1050(0) - Z0175(1) + Z0350(5) - Z0175(9) + Z0175(7) - Z0350(11) + Z0175(3);
5207
               e_delta[Y_AXIS] = Z1050(0) - Z0175(1) + Z0350(5) - Z0175(9) + Z0175(7) - Z0350(11) + Z0175(3);
5189
               e_delta[Z_AXIS] = Z1050(0) - Z0175(1) - Z0175(5) + Z0350(9) + Z0175(7) + Z0175(11) - Z0350(3);
5208
               e_delta[Z_AXIS] = Z1050(0) - Z0175(1) - Z0175(5) + Z0350(9) + Z0175(7) + Z0175(11) - Z0350(3);
5190
               r_delta         = Z2250(0) - Z0375(1) - Z0375(5) - Z0375(9) - Z0375(7) - Z0375(11) - Z0375(3);
5209
               r_delta         = Z2250(0) - Z0375(1) - Z0375(5) - Z0375(9) - Z0375(7) - Z0375(11) - Z0375(3);
5191
-              
5192
-              if (probe_points > 0) {                                                            //probe points negative disables tower angles
5193
-                t_alpha         =          + Z0444(1) - Z0888(5) + Z0444(9) + Z0444(7) - Z0888(11) + Z0444(3);
5194
-                t_beta          =          - Z0888(1) + Z0444(5) + Z0444(9) - Z0888(7) + Z0444(11) + Z0444(3);
5210
+
5211
+              if (c_value > 0) {                                                            //probe points negative disables tower angles
5212
+                t_alpha = + Z0444(1) - Z0888(5) + Z0444(9) + Z0444(7) - Z0888(11) + Z0444(3);
5213
+                t_beta  = - Z0888(1) + Z0444(5) + Z0444(9) - Z0888(7) + Z0444(11) + Z0444(3);
5195
               }
5214
               }
5196
               break;
5215
               break;
5197
           }
5216
           }
5216
           home_offset[Z_AXIS] = zh_old;
5235
           home_offset[Z_AXIS] = zh_old;
5217
           delta_tower_angle_trim[A_AXIS] = alpha_old;
5236
           delta_tower_angle_trim[A_AXIS] = alpha_old;
5218
           delta_tower_angle_trim[B_AXIS] = beta_old;
5237
           delta_tower_angle_trim[B_AXIS] = beta_old;
5219
-
5220
           recalc_delta_settings(delta_radius, delta_diagonal_rod);
5238
           recalc_delta_settings(delta_radius, delta_diagonal_rod);
5221
         }
5239
         }
5222
 
5240
 
5226
           SERIAL_PROTOCOLPGM(".     c:");
5244
           SERIAL_PROTOCOLPGM(".     c:");
5227
           if (z_at_pt[0] > 0) SERIAL_CHAR('+');
5245
           if (z_at_pt[0] > 0) SERIAL_CHAR('+');
5228
           SERIAL_PROTOCOL_F(z_at_pt[0], 2);
5246
           SERIAL_PROTOCOL_F(z_at_pt[0], 2);
5229
-          if (abs(probe_points) > 2 || probe_points == 2) {
5247
+          if (probe_points > 2 || c_value == 2) {
5230
             SERIAL_PROTOCOLPGM("     x:");
5248
             SERIAL_PROTOCOLPGM("     x:");
5231
             if (z_at_pt[1] >= 0) SERIAL_CHAR('+');
5249
             if (z_at_pt[1] >= 0) SERIAL_CHAR('+');
5232
             SERIAL_PROTOCOL_F(z_at_pt[1], 2);
5250
             SERIAL_PROTOCOL_F(z_at_pt[1], 2);
5237
             if (z_at_pt[9] >= 0) SERIAL_CHAR('+');
5255
             if (z_at_pt[9] >= 0) SERIAL_CHAR('+');
5238
             SERIAL_PROTOCOL_F(z_at_pt[9], 2);
5256
             SERIAL_PROTOCOL_F(z_at_pt[9], 2);
5239
           }
5257
           }
5240
-          if (probe_points != -2) SERIAL_EOL;
5241
-          if (abs(probe_points) > 2 || probe_points == -2) {
5242
-            if (abs(probe_points) > 2) SERIAL_PROTOCOLPGM(".            ");
5258
+          if (c_value != -2) SERIAL_EOL;
5259
+          if (probe_points > 2 || c_value == -2) {
5260
+            if (probe_points > 2) {
5261
+              SERIAL_CHAR('.');
5262
+              SERIAL_PROTOCOL_SP(12);
5263
+            }
5243
             SERIAL_PROTOCOLPGM("    yz:");
5264
             SERIAL_PROTOCOLPGM("    yz:");
5244
             if (z_at_pt[7] >= 0) SERIAL_CHAR('+');
5265
             if (z_at_pt[7] >= 0) SERIAL_CHAR('+');
5245
             SERIAL_PROTOCOL_F(z_at_pt[7], 2);
5266
             SERIAL_PROTOCOL_F(z_at_pt[7], 2);
5255
         if (test_precision != 0.0) {                                                             // !forced end
5276
         if (test_precision != 0.0) {                                                             // !forced end
5256
           if (zero_std_dev >= test_precision) {                                                  // end iterations
5277
           if (zero_std_dev >= test_precision) {                                                  // end iterations
5257
             SERIAL_PROTOCOLPGM("Calibration OK");
5278
             SERIAL_PROTOCOLPGM("Calibration OK");
5258
-            SERIAL_PROTOCOLPGM("                                    rolling back.");
5279
+            SERIAL_PROTOCOL_SP(36);
5280
+            SERIAL_PROTOCOLPGM("rolling back.");
5259
             SERIAL_EOL;
5281
             SERIAL_EOL;
5260
             LCD_MESSAGEPGM("Calibration OK");
5282
             LCD_MESSAGEPGM("Calibration OK");
5261
           }
5283
           }
5264
             if (iterations < 31)
5286
             if (iterations < 31)
5265
               sprintf_P(mess, PSTR("Iteration : %02i"), (int)iterations);
5287
               sprintf_P(mess, PSTR("Iteration : %02i"), (int)iterations);
5266
             SERIAL_PROTOCOL(mess);
5288
             SERIAL_PROTOCOL(mess);
5267
-            SERIAL_PROTOCOLPGM("                                    std dev:");
5289
+            SERIAL_PROTOCOL_SP(36);
5290
+            SERIAL_PROTOCOLPGM("std dev:");
5268
             SERIAL_PROTOCOL_F(zero_std_dev, 3);
5291
             SERIAL_PROTOCOL_F(zero_std_dev, 3);
5269
             SERIAL_EOL;
5292
             SERIAL_EOL;
5270
             lcd_setstatus(mess);
5293
             lcd_setstatus(mess);
5271
           }
5294
           }
5272
           SERIAL_PROTOCOLPAIR(".Height:", DELTA_HEIGHT + home_offset[Z_AXIS]);
5295
           SERIAL_PROTOCOLPAIR(".Height:", DELTA_HEIGHT + home_offset[Z_AXIS]);
5273
-          if (abs(probe_points) > 1) {
5296
+          if (probe_points > 1) {
5274
             SERIAL_PROTOCOLPGM("    Ex:");
5297
             SERIAL_PROTOCOLPGM("    Ex:");
5275
             if (endstop_adj[A_AXIS] >= 0) SERIAL_CHAR('+');
5298
             if (endstop_adj[A_AXIS] >= 0) SERIAL_CHAR('+');
5276
             SERIAL_PROTOCOL_F(endstop_adj[A_AXIS], 2);
5299
             SERIAL_PROTOCOL_F(endstop_adj[A_AXIS], 2);
5283
             SERIAL_PROTOCOLPAIR("    Radius:", delta_radius);
5306
             SERIAL_PROTOCOLPAIR("    Radius:", delta_radius);
5284
           }
5307
           }
5285
           SERIAL_EOL;
5308
           SERIAL_EOL;
5286
-          if (probe_points > 2) {
5309
+          if (c_value > 2) {
5287
             SERIAL_PROTOCOLPGM(".Tower angle :    Tx:");
5310
             SERIAL_PROTOCOLPGM(".Tower angle :    Tx:");
5288
             if (delta_tower_angle_trim[A_AXIS] >= 0) SERIAL_CHAR('+');
5311
             if (delta_tower_angle_trim[A_AXIS] >= 0) SERIAL_CHAR('+');
5289
             SERIAL_PROTOCOL_F(delta_tower_angle_trim[A_AXIS], 2);
5312
             SERIAL_PROTOCOL_F(delta_tower_angle_trim[A_AXIS], 2);
5294
             SERIAL_EOL;
5317
             SERIAL_EOL;
5295
           }
5318
           }
5296
           if (zero_std_dev >= test_precision)
5319
           if (zero_std_dev >= test_precision)
5297
-            SERIAL_PROTOCOLLNPGM("save with M500 and/or copy to configuration.h");
5320
+            serialprintPGM(save_message);
5298
         }
5321
         }
5299
         else {                                                                                   // forced end
5322
         else {                                                                                   // forced end
5300
           if (verbose_level == 0) {
5323
           if (verbose_level == 0) {
5301
-            SERIAL_PROTOCOLPGM("End DRY-RUN                                       std dev:");
5324
+            SERIAL_PROTOCOLPGM("End DRY-RUN");
5325
+            SERIAL_PROTOCOL_SP(39);
5326
+            SERIAL_PROTOCOLPGM("std dev:");
5302
             SERIAL_PROTOCOL_F(zero_std_dev, 3);
5327
             SERIAL_PROTOCOL_F(zero_std_dev, 3);
5303
             SERIAL_EOL;
5328
             SERIAL_EOL;
5304
           }
5329
           }
5307
             LCD_MESSAGEPGM("Calibration OK");
5332
             LCD_MESSAGEPGM("Calibration OK");
5308
             SERIAL_PROTOCOLPAIR(".Height:", DELTA_HEIGHT + home_offset[Z_AXIS]);
5333
             SERIAL_PROTOCOLPAIR(".Height:", DELTA_HEIGHT + home_offset[Z_AXIS]);
5309
             SERIAL_EOL;
5334
             SERIAL_EOL;
5310
-            SERIAL_PROTOCOLLNPGM("save with M500 and/or copy to configuration.h");
5335
+            serialprintPGM(save_message);
5311
           }
5336
           }
5312
         }
5337
         }
5313
 
5338
 

+ 1
- 1
Marlin/ultralcd.cpp View File

1833
       START_MENU();
1833
       START_MENU();
1834
       MENU_BACK(MSG_MAIN);
1834
       MENU_BACK(MSG_MAIN);
1835
       #if ENABLED(DELTA_AUTO_CALIBRATION)
1835
       #if ENABLED(DELTA_AUTO_CALIBRATION)
1836
-        MENU_ITEM(gcode, MSG_DELTA_AUTO_CALIBRATE, PSTR("G33 C"));
1836
+        MENU_ITEM(gcode, MSG_DELTA_AUTO_CALIBRATE, PSTR("G33"));
1837
         MENU_ITEM(gcode, MSG_DELTA_HEIGHT_CALIBRATE, PSTR("G33 C-1"));
1837
         MENU_ITEM(gcode, MSG_DELTA_HEIGHT_CALIBRATE, PSTR("G33 C-1"));
1838
       #endif
1838
       #endif
1839
       MENU_ITEM(submenu, MSG_AUTO_HOME, _lcd_delta_calibrate_home);
1839
       MENU_ITEM(submenu, MSG_AUTO_HOME, _lcd_delta_calibrate_home);

Loading…
Cancel
Save