Quellcode durchsuchen

Merge pull request #818 from 3d-gussner/MK3_fix7

Fix warning #7
mkbel vor 5 Jahren
Ursprung
Commit
02bd319a6c
1 geänderte Dateien mit 2 neuen und 2 gelöschten Zeilen
  1. 2 2
      Firmware/mesh_bed_calibration.cpp

+ 2 - 2
Firmware/mesh_bed_calibration.cpp

@@ -2845,11 +2845,11 @@ bool sample_mesh_and_store_reference()
     {
         // Verify the span of the Z values.
         float zmin = mbl.z_values[0][0];
-        float zmax = zmax;
+        float zmax = zmin;
         for (int8_t j = 0; j < 3; ++ j)
            for (int8_t i = 0; i < 3; ++ i) {
                 zmin = min(zmin, mbl.z_values[j][i]);
-                zmax = min(zmax, mbl.z_values[j][i]);
+                zmax = max(zmax, mbl.z_values[j][i]);
            }
         if (zmax - zmin > 3.f) {
             // The span of the Z offsets is extreme. Give up.