theFPVgeek / aeroquad

Automatically exported from code.google.com/p/aeroquad
0 stars 0 forks source link

Missing initializations in gyro.h and accel.h #142

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
The arrays accelData and gyroData are not initialized. This can be fixed in the 
constructor of the base classes like this:

  Gyro(void){
    gyroData[ROLL] = 0;
    gyroData[PITCH] = 0;
    gyroData[YAW] = 0;
  }

  Accel(void) {
    accelData[XAXIS] = 0;
    accelData[YAXIS] = 0;
    accelData[ZAXIS] = -9.81;
  }

Also remove the declaration of the zAxis variable in accel.h, as it is not used 
at all.

Original issue reported on code.google.com by al...@arcor.de on 3 Nov 2011 at 5:11