|
@@ -663,14 +663,16 @@ static float run_z_probe() {
|
663
|
663
|
#if EXTRA_PROBING
|
664
|
664
|
// Insert Z measurement into probes[]. Keep it sorted ascending.
|
665
|
665
|
for (uint8_t i = 0; i <= p; i++) { // Iterate the saved Zs to insert the new Z
|
666
|
|
- if (i == p || probes[i] > z) { // Last index or new Z is smaller than this Z
|
|
666
|
+ if (i == p || probes[i] > z) { // Last index or new Z is smaller than this Z
|
667
|
667
|
for (int8_t m = p; --m >= i;) probes[m + 1] = probes[m]; // Shift items down after the insertion point
|
668
|
|
- probes[i] = z; // Insert the new Z measurement
|
|
668
|
+ probes[i] = z; // Insert the new Z measurement
|
669
|
669
|
break; // Only one to insert. Done!
|
670
|
670
|
}
|
671
|
671
|
}
|
672
|
672
|
#elif TOTAL_PROBING > 2
|
673
|
673
|
probes_total += z;
|
|
674
|
+ #else
|
|
675
|
+ UNUSED(z);
|
674
|
676
|
#endif
|
675
|
677
|
|
676
|
678
|
#if TOTAL_PROBING > 2
|