瀏覽代碼

(1.1.x) serious bug G33

LVD-AC 7 年之前
父節點
當前提交
77cf42588f
共有 1 個檔案被更改,包括 8 行新增8 行删除
  1. 8
    8
      Marlin/Marlin_main.cpp

+ 8
- 8
Marlin/Marlin_main.cpp 查看文件

5433
                     dy = (Y_PROBE_OFFSET_FROM_EXTRUDER);
5433
                     dy = (Y_PROBE_OFFSET_FROM_EXTRUDER);
5434
       #endif
5434
       #endif
5435
 
5435
 
5436
-      for (uint8_t i = 0; i < COUNT(z_at_pt); i++) z_at_pt[i] = 0.0;
5436
+      for (uint8_t i = 0; i <= 12; i++) z_at_pt[i] = 0.0;
5437
     
5437
     
5438
       if (!_0p_calibration) {
5438
       if (!_0p_calibration) {
5439
     
5439
     
5446
         }
5446
         }
5447
 
5447
 
5448
         if (_7p_calibration) { // probe extra center points
5448
         if (_7p_calibration) { // probe extra center points
5449
-          for (int8_t axis = _7p_multi_circle ? COUNT(z_at_pt) - 2 : COUNT(z_at_pt) - 4; axis > 0; axis -= _7p_multi_circle ? 2 : 4) {
5449
+          for (int8_t axis = _7p_multi_circle ? 11 : 9; axis > 0; axis -= _7p_multi_circle ? 2 : 4) {
5450
             const float a = RADIANS(180 + 30 * axis), r = delta_calibration_radius * 0.1;
5450
             const float a = RADIANS(180 + 30 * axis), r = delta_calibration_radius * 0.1;
5451
             #if ENABLED(PROBE_MANUALLY)
5451
             #if ENABLED(PROBE_MANUALLY)
5452
               z_at_pt[0] += lcd_probe_pt(cos(a) * r, sin(a) * r);
5452
               z_at_pt[0] += lcd_probe_pt(cos(a) * r, sin(a) * r);
5461
           bool zig_zag = true;
5461
           bool zig_zag = true;
5462
           const uint8_t start = _4p_opposite_points ? 3 : 1,
5462
           const uint8_t start = _4p_opposite_points ? 3 : 1,
5463
                         step = _4p_calibration ? 4 : _7p_half_circle ? 2 : 1;
5463
                         step = _4p_calibration ? 4 : _7p_half_circle ? 2 : 1;
5464
-          for (uint8_t axis = start; axis < COUNT(z_at_pt); axis += step) {
5464
+          for (uint8_t axis = start; axis <= 12; axis += step) {
5465
             const float zigadd = (zig_zag ? 0.5 : 0.0),
5465
             const float zigadd = (zig_zag ? 0.5 : 0.0),
5466
                         offset_circles = _7p_quadruple_circle ? zigadd + 1.0 :
5466
                         offset_circles = _7p_quadruple_circle ? zigadd + 1.0 :
5467
                                          _7p_triple_circle    ? zigadd + 0.5 :
5467
                                          _7p_triple_circle    ? zigadd + 0.5 :
5481
         }
5481
         }
5482
 
5482
 
5483
         if (_7p_intermed_points) // average intermediates to tower and opposites
5483
         if (_7p_intermed_points) // average intermediates to tower and opposites
5484
-          for (uint8_t axis = 1; axis < COUNT(z_at_pt); axis += 2)
5484
+          for (uint8_t axis = 1; axis <= 12; axis += 2)
5485
             z_at_pt[axis] = (z_at_pt[axis] + (z_at_pt[axis + 1] + z_at_pt[(axis + 10) % 12 + 1]) / 2.0) / 2.0;
5485
             z_at_pt[axis] = (z_at_pt[axis] + (z_at_pt[axis + 1] + z_at_pt[(axis + 10) % 12 + 1]) / 2.0) / 2.0;
5486
 
5486
 
5487
         float S1 = z_at_pt[0],
5487
         float S1 = z_at_pt[0],
5488
               S2 = sq(z_at_pt[0]);
5488
               S2 = sq(z_at_pt[0]);
5489
         int16_t N = 1;
5489
         int16_t N = 1;
5490
         if (!_1p_calibration) // std dev from zero plane
5490
         if (!_1p_calibration) // std dev from zero plane
5491
-          for (uint8_t axis = (_4p_opposite_points ? 3 : 1); axis < COUNT(z_at_pt); axis += (_4p_calibration ? 4 : 2)) {
5491
+          for (uint8_t axis = (_4p_opposite_points ? 3 : 1); axis <= 12; axis += (_4p_calibration ? 4 : 2)) {
5492
             S1 += z_at_pt[axis];
5492
             S1 += z_at_pt[axis];
5493
             S2 += sq(z_at_pt[axis]);
5493
             S2 += sq(z_at_pt[axis]);
5494
             N++;
5494
             N++;
5530
           SERIAL_EOL();
5530
           SERIAL_EOL();
5531
 
5531
 
5532
           probe_G33_points(z_at_pt, 3, true, false);
5532
           probe_G33_points(z_at_pt, 3, true, false);
5533
-          for (int8_t i = 0; i < COUNT(z_at_pt); i++) z_at_pt[i] -= z_at_pt_base[i];
5533
+          for (int8_t i = 0; i <= 12; i++) z_at_pt[i] -= z_at_pt_base[i];
5534
           print_G33_results(z_at_pt, true, true);
5534
           print_G33_results(z_at_pt, true, true);
5535
           delta_endstop_adj[axis] += 1.0;
5535
           delta_endstop_adj[axis] += 1.0;
5536
           switch (axis) {
5536
           switch (axis) {
5560
           SERIAL_PROTOCOL(zig_zag == -1 ? "-" : "+");
5560
           SERIAL_PROTOCOL(zig_zag == -1 ? "-" : "+");
5561
           SERIAL_EOL();
5561
           SERIAL_EOL();
5562
           probe_G33_points(z_at_pt, 3, true, false);
5562
           probe_G33_points(z_at_pt, 3, true, false);
5563
-          for (int8_t i = 0; i < COUNT(z_at_pt); i++) z_at_pt[i] -= z_at_pt_base[i];
5563
+          for (int8_t i = 0; i <= 12; i++) z_at_pt[i] -= z_at_pt_base[i];
5564
           print_G33_results(z_at_pt, true, true);
5564
           print_G33_results(z_at_pt, true, true);
5565
           delta_radius -= 1.0 * zig_zag;
5565
           delta_radius -= 1.0 * zig_zag;
5566
           recalc_delta_settings(delta_radius, delta_diagonal_rod, delta_tower_angle_trim);
5566
           recalc_delta_settings(delta_radius, delta_diagonal_rod, delta_tower_angle_trim);
5587
           SERIAL_EOL();
5587
           SERIAL_EOL();
5588
 
5588
 
5589
           probe_G33_points(z_at_pt, 3, true, false);
5589
           probe_G33_points(z_at_pt, 3, true, false);
5590
-          for (int8_t i = 0; i < COUNT(z_at_pt); i++) z_at_pt[i] -= z_at_pt_base[i];
5590
+          for (int8_t i = 0; i <= 12; i++) z_at_pt[i] -= z_at_pt_base[i];
5591
           print_G33_results(z_at_pt, true, true);
5591
           print_G33_results(z_at_pt, true, true);
5592
 
5592
 
5593
           delta_tower_angle_trim[axis] -= 1.0;
5593
           delta_tower_angle_trim[axis] -= 1.0;

Loading…
取消
儲存