drcpattison/ICM-20948

Sketch won't compile

Opened this issue · 1 comments

SL06 commented

HI, thanks for sharing.
I have those compilation issues, and was wondering if you can help. Thanks👍

ICM20948BasicAHRS_I2C:202:165: error: 'MahonyQuaternionUpdate' was not declared in this scope
MahonyQuaternionUpdate(myIMU.ax, myIMU.ay, myIMU.az, myIMU.gx * DEG_TO_RAD,myIMU.gy * DEG_TO_RAD, myIMU.gz * DEG_TO_RAD,myIMU.my, myIMU.mx, myIMU.mz, myIMU.deltat);
^
ICM20948BasicAHRS_I2C:272:52: error: 'getQ' was not declared in this scope
Serial.print("q0 = "); Serial.print(getQ());
^
ICM20948BasicAHRS_I2C:294:42: error: 'getQ' was not declared in this scope
myIMU.yaw = atan2(2.0f * (
(getQ()+1) * *(getQ()+2) + *getQ()

SL06 commented

By fixing issue 2, the sketch now compiled and work. The only problem is that Mag calibration is about 10 x longer than normal with my nrf52DK. In fact the 4 sec delay give about 40 sec delay. I had serial print comment to test the delay. So 15 sec testing give about 150 sec. I should probably test the program with my Uno.