Scott Lahteine 9 years ago
parent
commit
7b2fadd598
2 changed files with 6 additions and 4 deletions
  1. 5
    3
      Marlin/Marlin_main.cpp
  2. 1
    1
      Marlin/temperature.cpp

+ 5
- 3
Marlin/Marlin_main.cpp View File

4286
 
4286
 
4287
     randomSeed(millis());
4287
     randomSeed(millis());
4288
 
4288
 
4289
-    double mean, sigma, sample_set[n_samples];
4289
+    double mean = 0, sigma = 0, sample_set[n_samples];
4290
     for (uint8_t n = 0; n < n_samples; n++) {
4290
     for (uint8_t n = 0; n < n_samples; n++) {
4291
       if (n_legs) {
4291
       if (n_legs) {
4292
         int dir = (random(0, 10) > 5.0) ? -1 : 1;  // clockwise or counter clockwise
4292
         int dir = (random(0, 10) > 5.0) ? -1 : 1;  // clockwise or counter clockwise
4410
 
4410
 
4411
       // Raise before the next loop for the legs,
4411
       // Raise before the next loop for the legs,
4412
       // or do the final raise after the last probe
4412
       // or do the final raise after the last probe
4413
-      if (n_legs || last_probe) {
4414
-        do_probe_raise(last_probe ? Z_RAISE_AFTER_PROBING : z_between);
4413
+      if (last_probe)
4414
+        do_probe_raise(Z_RAISE_AFTER_PROBING);
4415
+      else if (n_legs) {
4416
+        do_probe_raise(z_between);
4415
         if (!last_probe) delay(500);
4417
         if (!last_probe) delay(500);
4416
       }
4418
       }
4417
 
4419
 

+ 1
- 1
Marlin/temperature.cpp View File

462
       EXTRUDER_3_AUTO_FAN_PIN == EXTRUDER_2_AUTO_FAN_PIN ? 2 : 3
462
       EXTRUDER_3_AUTO_FAN_PIN == EXTRUDER_2_AUTO_FAN_PIN ? 2 : 3
463
     };
463
     };
464
     uint8_t fanState = 0;
464
     uint8_t fanState = 0;
465
-    for (int f = 0; f <= HOTENDS; f++) {
465
+    for (int f = 0; f < HOTENDS; f++) {
466
       if (current_temperature[f] > EXTRUDER_AUTO_FAN_TEMPERATURE)
466
       if (current_temperature[f] > EXTRUDER_AUTO_FAN_TEMPERATURE)
467
         SBI(fanState, fanBit[f]);
467
         SBI(fanState, fanBit[f]);
468
     }
468
     }

Loading…
Cancel
Save