Browse Source

Explicit upward angle solution

pull/1/head
Scott Lahteine 8 years ago
parent
commit
de5e485ed7
  1. 6
      Marlin/ubl_G29.cpp

6
Marlin/ubl_G29.cpp

@ -1522,10 +1522,8 @@
if (isnan(ubl.z_values[x][y]) && !isnan(ubl.z_values[x1][y1]) && !isnan(ubl.z_values[x2][y2])) {
if (ubl.z_values[x1][y1] < ubl.z_values[x2][y2]) // Angled downward?
ubl.z_values[x][y] = ubl.z_values[x1][y1]; // Use nearest (maybe a little too high.)
else {
const float diff = ubl.z_values[x1][y1] - ubl.z_values[x2][y2]; // Angled upward
ubl.z_values[x][y] = ubl.z_values[x1][y1] + diff; // Use closest plus difference
}
else
ubl.z_values[x][y] = 2.0 * ubl.z_values[x1][y1] - ubl.z_values[x2][y2]; // Angled upward...
return true;
}
return false;

Loading…
Cancel
Save