Problem compiling 2.0 with new Drotek IMU

Post Reply
Joachim08
Posts: 31
Joined: Sat Mar 17, 2012 10:10 am

Problem compiling 2.0 with new Drotek IMU

Post by Joachim08 »

Hi ,

i have just got the new Drotek DROTEK_10DOF_MPU IMU with the new MPU sensor.
I have changed the sketch according to the suggestions at microcopters.de.
During compile i get the error which is shown on the attached screenshoot.
Something is wrong with the magnetic sensor definition i assume...

As i am a newbee on Multiwii i dont know how to solve the issue.
Can anybody out there help ?

Thanks and regards

Joachim
Attachments
magcal.jpg

User avatar
kos
Posts: 286
Joined: Thu Feb 16, 2012 4:51 am
Location: Fr

Re: Problem compiling 2.0 with new Drotek IMU

Post by kos »

suggestions at microcopters.de

We are not divine creature , so it is hard to know what those suggestions are if you do not provide any hints ..


as a quick hack , in file def.h change

Code: Select all

#if defined(HMC5883) || defined(HMC5843) || defined(AK8975) || defined(MAG3110)
  #define MAG 1
#else
  #define MAG 0
#endif


to

Code: Select all

  #define MAG 1

Joachim08
Posts: 31
Joined: Sat Mar 17, 2012 10:10 am

Re: Problem compiling 2.0 with new Drotek IMU

Post by Joachim08 »

Ok this is what i did:

i added in def.h:

Code: Select all

#if defined(DROTEK_10DOF_MPU)
  #define MPU6050
  #define HMC5883
  #define MS561101BA
  #define ACC_ORIENTATION(X, Y, Z)  {accADC[ROLL]  = Y;  accADC[PITCH]  = -X; accADC[YAW]  =  Z;}
  #define GYRO_ORIENTATION(X, Y, Z) {gyroADC[ROLL] = X;  gyroADC[PITCH] =  Y; gyroADC[YAW] = -Z;}
  #define MAG_ORIENTATION(X, Y, Z)  {magADC[ROLL]  = -Y; magADC[PITCH]  =  X; magADC[YAW]  = -Z;}
  #define MPU6050_ADDRESS 0xD2
  #define MPU6050_EN_I2C_BYPASS
#endif



in config.h:

Code: Select all

#define DROTEK_10DOF_MPU // Drotek 10DOF with MPU6050, HMC5883, MS5611

//enable internal I2C pull ups
//#define INTERNAL_I2C_PULLUPS


i will try your suggestion this morning and let you all know the outcome.

Thanks a lot !

Joachim08
Posts: 31
Joined: Sat Mar 17, 2012 10:10 am

Re: Problem compiling 2.0 with new Drotek IMU

Post by Joachim08 »

Oh boy, i found the problem: I added the code for the Drotek IMU at the end of the def.h and i get those errors..

If i add the code just behind the last IMU defined in def.h , i.e. crius_se everything compiles wihtout errors.

Sorry !

User avatar
kos
Posts: 286
Joined: Thu Feb 16, 2012 4:51 am
Location: Fr

Re: Problem compiling 2.0 with new Drotek IMU

Post by kos »

Drotek 10DOF .. in the main branch since Feb 24, 2012

http://code.google.com/p/multiwii/sourc ... iWii/def.h


//#define DROTEK_10DOF // Drotek 10DOF with ITG3200, BMA180, HMC5883, BMP085, w or w/o LLC

or


//#define DROTEK_10DOF_MS // Drotek 10DOF with ITG3200, BMA180, HMC5883, MS5611, LLC


Code: Select all

#if defined(DROTEK_10DOF) || defined(DROTEK_10DOF_MS)
  #define ITG3200
  #define BMA180
  #define HMC5883
  #define ACC_ORIENTATION(X, Y, Z)  {accADC[ROLL]  = -X; accADC[PITCH]  = -Y; accADC[YAW]  =  Z;}
  #define GYRO_ORIENTATION(X, Y, Z) {gyroADC[ROLL] =  Y; gyroADC[PITCH] = -X; gyroADC[YAW] = -Z;}
  #define MAG_ORIENTATION(X, Y, Z)  {magADC[ROLL]  =  X; magADC[PITCH]  =  Y; magADC[YAW]  = -Z;}
  #define ITG3200_ADDRESS 0XD2
  #if defined(DROTEK_10DOF_MS)
    #define MS561101BA
  #elif defined(DROTEK_10DOF)
    #define BMP085
  #endif
#endif

Joachim08
Posts: 31
Joined: Sat Mar 17, 2012 10:10 am

Re: Problem compiling 2.0 with new Drotek IMU

Post by Joachim08 »

This is not the new Drotek 10DOF IMU. The newest one is using MPU 6050 instead of ITG3200 and BMA180....

So even in 2.0 release it is not included

Post Reply