Get rid of malloc() and free() (PR#2549)
Just the minimal changes to qr_solve.cpp and .h to get rid of malloc() and free(). Saves about 656 bytes of progmem (library-code) and 22 bytes for static variables. Should use exactly the same amount of stack as it did before on the heap.
This commit is contained in:
parent
f9195d114b
commit
d03f037a92
3 changed files with 11 additions and 30 deletions
|
|
@ -2643,7 +2643,8 @@ inline void gcode_G28() {
|
|||
#else // !DELTA
|
||||
|
||||
// solve lsq problem
|
||||
double *plane_equation_coefficients = qr_solve(abl2, 3, eqnAMatrix, eqnBVector);
|
||||
double plane_equation_coefficients[3];
|
||||
qr_solve(plane_equation_coefficients, abl2, 3, eqnAMatrix, eqnBVector);
|
||||
|
||||
mean /= abl2;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue