added gy80 dcm

Dependencies:   mbed DCM_AHRS_GY80 PID MMA8451Q

Fork of quadCommand by Greg Abdo

quadCommand/sensors/sensors.cpp

Committer:
oprospero
Date:
2013-07-28
Revision:
64:2b6399fe00f6

File content as of revision 64:2b6399fe00f6:

/************************ quadCommand.cpp ********************************/
/*                                                                       */
/*************************************************************************/
#include "sensors.h"

/***************************** sensors() *********************************/
/*                                                                       */
/*************************************************************************/

sensors::sensors()
{
    acc = new MMA8451Q( ACCSDA, ACCSCL, MMA8451_I2C_ADDRESS);
}

/************************** getAbsoluteX() *******************************/
/* Returns a float from -1 to 1 for the value off level in the x         */
/*directoin. 0 = level.                                                  */
/*************************************************************************/

float sensors::getAbsoluteX()
{
    return acc->getAccX();
} 

/************************** getAbsoluteY() *******************************/
/* Returns a float from -1 to 1 for the value off level in the Y         */
/*directoin. 0 = level.                                                  */
/*************************************************************************/

float sensors::getAbsoluteY()
{
    return acc->getAccY();
}