1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-17 21:35:44 +03:00

Fixed defines for BARO_LPS.

This commit is contained in:
Michael Keller 2018-01-09 14:29:53 +13:00 committed by mikeller
parent 1b76929a3a
commit 72712b348d
4 changed files with 6 additions and 6 deletions

View file

@ -3,7 +3,7 @@
#include <platform.h>
#if defined(USE_BARO) && (defined(USE_BARO_LPS) || defined(USE_BARO_SPI_LPS))
#if defined(USE_BARO) && defined(USE_BARO_SPI_LPS)
#include "build/build_config.h"

View file

@ -226,7 +226,7 @@ void spiPreInit(void)
#ifdef USE_BARO_SPI_MS5611
spiPreInitCs(IO_TAG(MS5611_CS_PIN));
#endif
#ifdef USE_BARO_LPS
#ifdef USE_BARO_SPI_LPS
spiPreInitCs(IO_TAG(LPS_CS_PIN));
#endif
#ifdef USE_MAG_SPI_HMC5883

View file

@ -65,7 +65,7 @@ void pgResetFn_barometerConfig(barometerConfig_t *barometerConfig)
// a. Precedence is in the order of popularity; BMP280, MS5611 then BMP085, then
// b. If SPI variant is specified, it is likely onboard, so take it.
#if !(defined(DEFAULT_BARO_SPI_BMP280) || defined(DEFAULT_BARO_BMP280) || defined(DEFAULT_BARO_SPI_MS5611) || defined(DEFAULT_BARO_MS5611) || defined(DEFAULT_BARO_BMP085) || defined(DEFAULT_BARO_LPS))
#if !(defined(DEFAULT_BARO_SPI_BMP280) || defined(DEFAULT_BARO_BMP280) || defined(DEFAULT_BARO_SPI_MS5611) || defined(DEFAULT_BARO_MS5611) || defined(DEFAULT_BARO_BMP085) || defined(DEFAULT_BARO_SPI_LPS))
#if defined(USE_BARO_BMP280) || defined(USE_BARO_SPI_BMP280)
#if defined(USE_BARO_SPI_BMP280)
#define DEFAULT_BARO_SPI_BMP280
@ -78,7 +78,7 @@ void pgResetFn_barometerConfig(barometerConfig_t *barometerConfig)
#else
#define DEFAULT_BARO_MS5611
#endif
#elif defined(USE_BARO_LPS)
#elif defined(USE_BARO_SPI_LPS)
#define DEFAULT_BARO_SPI_LPS
#elif defined(DEFAULT_BARO_BMP085)
#define DEFAULT_BARO_BMP085
@ -196,7 +196,7 @@ bool baroDetect(baroDev_t *dev, baroSensor_e baroHardwareToUse)
FALLTHROUGH;
case BARO_LPS:
#if defined(USE_BARO_LPS)
#if defined(USE_BARO_SPI_LPS)
if (lpsDetect(dev)) {
baroHardware = BARO_LPS;
break;

View file

@ -53,7 +53,7 @@
//BARO
#define USE_BARO
#define USE_BARO_LPS
#define USE_BARO_SPI_LPS
#define LPS_SPI_INSTANCE SPI3
#define LPS_CS_PIN PB8