MS5611: Fix CONFIG_MS5611_SERIAL definitions.

- Make sure the values are defined as integers.  We were always using
  SPI rather than using I2C when desired.
This commit is contained in:
James Bielman 2013-01-08 10:25:51 -08:00 committed by Pat Hickey
parent 4e0806186f
commit ab37f833db
6 changed files with 10 additions and 7 deletions

View File

@ -209,9 +209,9 @@ AP_Baro_BMP085 barometer;
#elif CONFIG_BARO == AP_BARO_PX4
AP_Baro_PX4 barometer;
#elif CONFIG_BARO == AP_BARO_MS5611
#if CONFIG_MS5611_SERIAL == SPI
#if CONFIG_MS5611_SERIAL == AP_BARO_MS5611_SPI
AP_Baro_MS5611 barometer(&AP_Baro_MS5611::spi);
#elif CONFIG_MS5611_SERIAL == I2C
#elif CONFIG_MS5611_SERIAL == AP_BARO_MS5611_I2C
AP_Baro_MS5611 barometer(&AP_Baro_MS5611::i2c);
#else
#error Unrecognized CONFIG_MS5611_SERIAL setting.

View File

@ -63,7 +63,7 @@
# define CONFIG_BARO AP_BARO_BMP085
# else // APM2 Production Hardware (default)
# define CONFIG_BARO AP_BARO_MS5611
# define CONFIG_MS5611_SERIAL SPI
# define CONFIG_MS5611_SERIAL AP_BARO_MS5611_SPI
# endif
#elif CONFIG_HAL_BOARD == HAL_BOARD_AVR_SITL
# define CONFIG_IMU_TYPE CONFIG_IMU_SITL

View File

@ -424,6 +424,9 @@ enum gcs_severity {
#define AP_BARO_MS5611 2
#define AP_BARO_PX4 3
#define AP_BARO_MS5611_SPI 1
#define AP_BARO_MS5611_I2C 2
// Error message sub systems and error codes
#define ERROR_SUBSYSTEM_MAIN 1
#define ERROR_SUBSYSTEM_RADIO 2

View File

@ -155,9 +155,9 @@ 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
#if CONFIG_MS5611_SERIAL == AP_BARO_MS5611_SPI
static AP_Baro_MS5611 barometer(&AP_Baro_MS5611::spi);
#elif CONFIG_MS5611_SERIAL == I2C
#elif CONFIG_MS5611_SERIAL == AP_BARO_MS5611_I2C
static AP_Baro_MS5611 barometer(&AP_Baro_MS5611::i2c);
#else
#error Unrecognized CONFIG_MS5611_SERIAL setting.

View File

@ -121,7 +121,7 @@
# define CONFIG_BARO AP_BARO_BMP085
# else // APM2 Production Hardware (default)
# define CONFIG_BARO AP_BARO_MS5611
# define CONFIG_MS5611_SERIAL SPI
# define CONFIG_MS5611_SERIAL AP_BARO_MS5611_SPI
# endif
#elif CONFIG_HAL_BOARD == HAL_BOARD_AVR_SITL
# define A_LED_PIN 27

View File

@ -54,7 +54,7 @@
# define CONFIG_PITOT_SOURCE PITOT_SOURCE_ANALOG_PIN
# define MAGNETOMETER ENABLED
# define CONFIG_BARO AP_BARO_MS5611
# define CONFIG_MS5611_SERIAL SPI
# define CONFIG_MS5611_SERIAL AP_BARO_MS5611_SPI
# define A_LED_PIN 27
# define B_LED_PIN 26