|
@@ -4286,7 +4286,7 @@ inline void gcode_M42() {
|
4286
|
4286
|
|
4287
|
4287
|
randomSeed(millis());
|
4288
|
4288
|
|
4289
|
|
- double mean, sigma, sample_set[n_samples];
|
|
4289
|
+ double mean = 0, sigma = 0, sample_set[n_samples];
|
4290
|
4290
|
for (uint8_t n = 0; n < n_samples; n++) {
|
4291
|
4291
|
if (n_legs) {
|
4292
|
4292
|
int dir = (random(0, 10) > 5.0) ? -1 : 1; // clockwise or counter clockwise
|
|
@@ -4410,8 +4410,10 @@ inline void gcode_M42() {
|
4410
|
4410
|
|
4411
|
4411
|
// Raise before the next loop for the legs,
|
4412
|
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
|
4417
|
if (!last_probe) delay(500);
|
4416
|
4418
|
}
|
4417
|
4419
|
|