Group UBL parameters, add comments
This commit is contained in:
committed by
Scott Lahteine
parent
8fca37f373
commit
da4b6896f7
@ -156,16 +156,16 @@ void GcodeSuite::M420() {
|
||||
GRID_LOOP(x, y) mesh_sum += Z_VALUES(x, y);
|
||||
const float zmean = mesh_sum / float(GRID_MAX_POINTS);
|
||||
|
||||
#else
|
||||
#else // midrange
|
||||
|
||||
// Find the low and high mesh values
|
||||
// Find the low and high mesh values.
|
||||
float lo_val = 100, hi_val = -100;
|
||||
GRID_LOOP(x, y) {
|
||||
const float z = Z_VALUES(x, y);
|
||||
NOMORE(lo_val, z);
|
||||
NOLESS(hi_val, z);
|
||||
}
|
||||
// Take the mean of the lowest and highest
|
||||
// Get the midrange plus C value. (The median may be better.)
|
||||
const float zmean = (lo_val + hi_val) / 2.0 + cval;
|
||||
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user