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:
parent
4e0806186f
commit
ab37f833db
@ -209,9 +209,9 @@ AP_Baro_BMP085 barometer;
|
|||||||
#elif CONFIG_BARO == AP_BARO_PX4
|
#elif CONFIG_BARO == AP_BARO_PX4
|
||||||
AP_Baro_PX4 barometer;
|
AP_Baro_PX4 barometer;
|
||||||
#elif CONFIG_BARO == AP_BARO_MS5611
|
#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);
|
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);
|
AP_Baro_MS5611 barometer(&AP_Baro_MS5611::i2c);
|
||||||
#else
|
#else
|
||||||
#error Unrecognized CONFIG_MS5611_SERIAL setting.
|
#error Unrecognized CONFIG_MS5611_SERIAL setting.
|
||||||
|
@ -63,7 +63,7 @@
|
|||||||
# define CONFIG_BARO AP_BARO_BMP085
|
# define CONFIG_BARO AP_BARO_BMP085
|
||||||
# else // APM2 Production Hardware (default)
|
# else // APM2 Production Hardware (default)
|
||||||
# define CONFIG_BARO AP_BARO_MS5611
|
# define CONFIG_BARO AP_BARO_MS5611
|
||||||
# define CONFIG_MS5611_SERIAL SPI
|
# define CONFIG_MS5611_SERIAL AP_BARO_MS5611_SPI
|
||||||
# endif
|
# endif
|
||||||
#elif CONFIG_HAL_BOARD == HAL_BOARD_AVR_SITL
|
#elif CONFIG_HAL_BOARD == HAL_BOARD_AVR_SITL
|
||||||
# define CONFIG_IMU_TYPE CONFIG_IMU_SITL
|
# define CONFIG_IMU_TYPE CONFIG_IMU_SITL
|
||||||
|
@ -424,6 +424,9 @@ enum gcs_severity {
|
|||||||
#define AP_BARO_MS5611 2
|
#define AP_BARO_MS5611 2
|
||||||
#define AP_BARO_PX4 3
|
#define AP_BARO_PX4 3
|
||||||
|
|
||||||
|
#define AP_BARO_MS5611_SPI 1
|
||||||
|
#define AP_BARO_MS5611_I2C 2
|
||||||
|
|
||||||
// Error message sub systems and error codes
|
// Error message sub systems and error codes
|
||||||
#define ERROR_SUBSYSTEM_MAIN 1
|
#define ERROR_SUBSYSTEM_MAIN 1
|
||||||
#define ERROR_SUBSYSTEM_RADIO 2
|
#define ERROR_SUBSYSTEM_RADIO 2
|
||||||
|
@ -155,9 +155,9 @@ static AP_Baro_BMP085 barometer;
|
|||||||
#elif CONFIG_BARO == AP_BARO_PX4
|
#elif CONFIG_BARO == AP_BARO_PX4
|
||||||
static AP_Baro_PX4 barometer;
|
static AP_Baro_PX4 barometer;
|
||||||
#elif CONFIG_BARO == AP_BARO_MS5611
|
#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);
|
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);
|
static AP_Baro_MS5611 barometer(&AP_Baro_MS5611::i2c);
|
||||||
#else
|
#else
|
||||||
#error Unrecognized CONFIG_MS5611_SERIAL setting.
|
#error Unrecognized CONFIG_MS5611_SERIAL setting.
|
||||||
|
@ -121,7 +121,7 @@
|
|||||||
# define CONFIG_BARO AP_BARO_BMP085
|
# define CONFIG_BARO AP_BARO_BMP085
|
||||||
# else // APM2 Production Hardware (default)
|
# else // APM2 Production Hardware (default)
|
||||||
# define CONFIG_BARO AP_BARO_MS5611
|
# define CONFIG_BARO AP_BARO_MS5611
|
||||||
# define CONFIG_MS5611_SERIAL SPI
|
# define CONFIG_MS5611_SERIAL AP_BARO_MS5611_SPI
|
||||||
# endif
|
# endif
|
||||||
#elif CONFIG_HAL_BOARD == HAL_BOARD_AVR_SITL
|
#elif CONFIG_HAL_BOARD == HAL_BOARD_AVR_SITL
|
||||||
# define A_LED_PIN 27
|
# define A_LED_PIN 27
|
||||||
|
@ -54,7 +54,7 @@
|
|||||||
# define CONFIG_PITOT_SOURCE PITOT_SOURCE_ANALOG_PIN
|
# define CONFIG_PITOT_SOURCE PITOT_SOURCE_ANALOG_PIN
|
||||||
# define MAGNETOMETER ENABLED
|
# define MAGNETOMETER ENABLED
|
||||||
# define CONFIG_BARO AP_BARO_MS5611
|
# 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 A_LED_PIN 27
|
||||||
# define B_LED_PIN 26
|
# define B_LED_PIN 26
|
||||||
|
Loading…
Reference in New Issue
Block a user