1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-21 15:25:36 +03:00

Merge pull request #4915 from mikeller/fix_baro_lps

Fixed defines for BARO_LPS.
This commit is contained in:
Martin Budden 2018-01-09 08:52:57 +00:00 committed by GitHub
commit 5eabc8a568
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 6 additions and 6 deletions

View file

@ -3,7 +3,7 @@
#include <platform.h> #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" #include "build/build_config.h"

View file

@ -226,7 +226,7 @@ void spiPreInit(void)
#ifdef USE_BARO_SPI_MS5611 #ifdef USE_BARO_SPI_MS5611
spiPreInitCs(IO_TAG(MS5611_CS_PIN)); spiPreInitCs(IO_TAG(MS5611_CS_PIN));
#endif #endif
#ifdef USE_BARO_LPS #ifdef USE_BARO_SPI_LPS
spiPreInitCs(IO_TAG(LPS_CS_PIN)); spiPreInitCs(IO_TAG(LPS_CS_PIN));
#endif #endif
#ifdef USE_MAG_SPI_HMC5883 #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 // 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. // 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_BMP280) || defined(USE_BARO_SPI_BMP280)
#if defined(USE_BARO_SPI_BMP280) #if defined(USE_BARO_SPI_BMP280)
#define DEFAULT_BARO_SPI_BMP280 #define DEFAULT_BARO_SPI_BMP280
@ -78,7 +78,7 @@ void pgResetFn_barometerConfig(barometerConfig_t *barometerConfig)
#else #else
#define DEFAULT_BARO_MS5611 #define DEFAULT_BARO_MS5611
#endif #endif
#elif defined(USE_BARO_LPS) #elif defined(USE_BARO_SPI_LPS)
#define DEFAULT_BARO_SPI_LPS #define DEFAULT_BARO_SPI_LPS
#elif defined(DEFAULT_BARO_BMP085) #elif defined(DEFAULT_BARO_BMP085)
#define DEFAULT_BARO_BMP085 #define DEFAULT_BARO_BMP085
@ -196,7 +196,7 @@ bool baroDetect(baroDev_t *dev, baroSensor_e baroHardwareToUse)
FALLTHROUGH; FALLTHROUGH;
case BARO_LPS: case BARO_LPS:
#if defined(USE_BARO_LPS) #if defined(USE_BARO_SPI_LPS)
if (lpsDetect(dev)) { if (lpsDetect(dev)) {
baroHardware = BARO_LPS; baroHardware = BARO_LPS;
break; break;

View file

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