Browse Source

Plane: enable hardware sensors on PX4

master
Andrew Tridgell 12 years ago
parent
commit
38f56be2c4
  1. 8
      ArduPlane/ArduPlane.pde
  2. 6
      ArduPlane/config.h
  3. 1
      ArduPlane/defines.h

8
ArduPlane/ArduPlane.pde

@ -152,6 +152,8 @@ SITL sitl; @@ -152,6 +152,8 @@ SITL sitl;
#if CONFIG_BARO == AP_BARO_BMP085
static AP_Baro_BMP085 barometer;
#elif CONFIG_BARO == AP_BARO_PX4
static AP_Baro_PX4 barometer;
#elif CONFIG_BARO == AP_BARO_MS5611
#if CONFIG_MS5611_SERIAL == SPI
static AP_Baro_MS5611 barometer(&AP_Baro_MS5611::spi);
@ -162,7 +164,11 @@ static AP_Baro_MS5611 barometer(&AP_Baro_MS5611::i2c); @@ -162,7 +164,11 @@ static AP_Baro_MS5611 barometer(&AP_Baro_MS5611::i2c);
#endif
#endif
#if CONFIG_HAL_BOARD == HAL_BOARD_PX4
static AP_Compass_PX4 compass;
#else
static AP_Compass_HMC5843 compass;
#endif
#endif
// real GPS selection
@ -193,6 +199,8 @@ AP_GPS_None g_gps_driver(); @@ -193,6 +199,8 @@ AP_GPS_None g_gps_driver();
# if CONFIG_INS_TYPE == CONFIG_INS_MPU6000
AP_InertialSensor_MPU6000 ins;
# elif CONFIG_INS_TYPE == CONFIG_INS_PX4
AP_InertialSensor_PX4 ins;
# elif CONFIG_HAL_BOARD != HAL_BOARD_AVR_SITL
AP_InertialSensor_Oilpan ins( &adc );
#endif // CONFIG_INS_TYPE

6
ArduPlane/config.h

@ -142,12 +142,10 @@ @@ -142,12 +142,10 @@
# define LED_OFF HIGH
# define BATTERY_VOLT_PIN -1
# define BATTERY_CURR_PIN -1
# define CONFIG_INS_TYPE CONFIG_INS_STUB
# define CONFIG_INS_TYPE CONFIG_INS_PX4
# define CONFIG_PITOT_SOURCE PITOT_SOURCE_ANALOG_PIN
# define MAGNETOMETER ENABLED
// force HIL mode until we have the drivers done
# define HIL_MODE HIL_MODE_SENSORS
# define CONFIG_BARO AP_BARO_PX4
#endif

1
ArduPlane/defines.h

@ -226,6 +226,7 @@ enum gcs_severity { @@ -226,6 +226,7 @@ enum gcs_severity {
#define AP_BARO_BMP085 1
#define AP_BARO_MS5611 2
#define AP_BARO_PX4 3
// altitude control algorithms
enum {

Loading…
Cancel
Save