rpicopter / MotionSensorExample

MPU6050/MPU6500/MPU9150/MPU9250 over I2c for RaspberryPi
137 stars 80 forks source link

Compatability issue initializing struct #11

Open Fachmann04 opened 5 years ago

Fachmann04 commented 5 years ago

In Line 508 of inv_mpu.c you initialize " ,.raw_compass = 0x49,". This will cause an issue on some systems as the compiler expects the members in the same order as declared. "sorry, unimplemented: non-trivial designated initializers not supported" This can be fixed by moving the initialization of raw_compass to the bottom of the struct.