Copter: added support for the flymaple board

This commit is contained in:
Andrew Tridgell 2013-09-23 17:06:51 +10:00
parent 815be5ddfe
commit 3378c7901a
3 changed files with 17 additions and 1 deletions

View File

@ -79,6 +79,7 @@
#include <AP_HAL_AVR_SITL.h>
#include <AP_HAL_SMACCM.h>
#include <AP_HAL_PX4.h>
#include <AP_HAL_FLYMAPLE.h>
#include <AP_HAL_Empty.h>
// Application dependencies
@ -223,7 +224,9 @@ static AP_InertialSensor_Oilpan ins(&adc);
static AP_InertialSensor_Stub ins;
#elif CONFIG_IMU_TYPE == CONFIG_IMU_PX4
static AP_InertialSensor_PX4 ins;
#endif
#elif CONFIG_IMU_TYPE == CONFIG_IMU_FLYMAPLE
AP_InertialSensor_Flymaple ins;
#endif
#if CONFIG_HAL_BOARD == HAL_BOARD_AVR_SITL
// When building for SITL we use the HIL barometer and compass drivers

View File

@ -81,6 +81,13 @@
# define CONFIG_ADC DISABLED
# define CONFIG_SONAR_SOURCE SONAR_SOURCE_ANALOG_PIN
# define MAGNETOMETER ENABLED
#elif CONFIG_HAL_BOARD == HAL_BOARD_FLYMAPLE
# define CONFIG_IMU_TYPE CONFIG_IMU_FLYMAPLE
# define CONFIG_BARO AP_BARO_BMP085
# define CONFIG_COMPASS AP_COMPASS_HMC5843
# define CONFIG_ADC DISABLED
# define MAGNETOMETER ENABLED
# define CONFIG_SONAR_SOURCE SONAR_SOURCE_ANALOG_PIN
#endif
//////////////////////////////////////////////////////////////////////////////
@ -189,6 +196,11 @@
# define LED_OFF HIGH
# define BATTERY_VOLT_PIN -1
# define BATTERY_CURR_PIN -1
#elif CONFIG_HAL_BOARD == HAL_BOARD_FLYMAPLE
# define BATTERY_VOLT_PIN 20
# define BATTERY_CURR_PIN 19
# define LED_ON LOW
# define LED_OFF HIGH
#endif
////////////////////////////////////////////////////////////////////////////////

View File

@ -416,6 +416,7 @@ enum ap_message {
#define CONFIG_IMU_MPU6000 2
#define CONFIG_IMU_SITL 3
#define CONFIG_IMU_PX4 4
#define CONFIG_IMU_FLYMAPLE 5
#define AP_BARO_BMP085 1
#define AP_BARO_MS5611 2