Fix use of uninitialized data in fUpdateCalibration10EIG
This commit is contained in:
parent
f8f279563f
commit
dabaaece7d
1 changed files with 1 additions and 1 deletions
2
magcal.c
2
magcal.c
|
|
@ -453,7 +453,7 @@ static void fUpdateCalibration10EIG(MagCalibration_t *MagCal)
|
||||||
// sum between MINEQUATIONS to MAXEQUATIONS entries into the 10x10 product matrix matA
|
// sum between MINEQUATIONS to MAXEQUATIONS entries into the 10x10 product matrix matA
|
||||||
iCount = 0;
|
iCount = 0;
|
||||||
for (j = 0; j < MAGBUFFSIZE; j++) {
|
for (j = 0; j < MAGBUFFSIZE; j++) {
|
||||||
if (MagCal->valid[j] != -1) {
|
if (MagCal->valid[j]) {
|
||||||
// use first valid magnetic buffer entry as estimate for offset
|
// use first valid magnetic buffer entry as estimate for offset
|
||||||
// to help solution (bit counts)
|
// to help solution (bit counts)
|
||||||
if (iCount == 0) {
|
if (iCount == 0) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue