Fix preprocessor directive mishap causing compilation failure when BMX280_EXPECT_BMP280 set.

This commit is contained in:
H. Utku Maden 2022-05-04 10:24:40 +03:00
parent 2bc4373f8d
commit e1a05657e2

@ -142,26 +142,25 @@ typedef struct bmx280_config_t {
#endif #endif
#ifndef CONFIG_BMX280_EXPECT_BMP280 #ifndef CONFIG_BMX280_EXPECT_BMP280
#if (CONFIG_BMX280_DEFAULT_HUMIDITY_OVERSAMPLING_NONE) #if (CONFIG_BMX280_DEFAULT_HUMIDITY_OVERSAMPLING_NONE)
#define BMX280_DEFAULT_HUMIDITY_OVERSAMPLING BMX280_HUMIDITY_OVERSAMPLING_NONE #define BMX280_DEFAULT_HUMIDITY_OVERSAMPLING BMX280_HUMIDITY_OVERSAMPLING_NONE
#elif (CONFIG_BMX280_DEFAULT_HUMIDITY_OVERSAMPLING_X1) #elif (CONFIG_BMX280_DEFAULT_HUMIDITY_OVERSAMPLING_X1)
#define BMX280_DEFAULT_HUMIDITY_OVERSAMPLING BMX280_HUMIDITY_OVERSAMPLING_X1 #define BMX280_DEFAULT_HUMIDITY_OVERSAMPLING BMX280_HUMIDITY_OVERSAMPLING_X1
#elif (CONFIG_BMX280_DEFAULT_HUMIDITY_OVERSAMPLING_X2) #elif (CONFIG_BMX280_DEFAULT_HUMIDITY_OVERSAMPLING_X2)
#define BMX280_DEFAULT_HUMIDITY_OVERSAMPLING BMX280_HUMIDITY_OVERSAMPLING_X2 #define BMX280_DEFAULT_HUMIDITY_OVERSAMPLING BMX280_HUMIDITY_OVERSAMPLING_X2
#elif (CONFIG_BMX280_DEFAULT_HUMIDITY_OVERSAMPLING_X4) #elif (CONFIG_BMX280_DEFAULT_HUMIDITY_OVERSAMPLING_X4)
#define BMX280_DEFAULT_HUMIDITY_OVERSAMPLING BMX280_HUMIDITY_OVERSAMPLING_X4 #define BMX280_DEFAULT_HUMIDITY_OVERSAMPLING BMX280_HUMIDITY_OVERSAMPLING_X4
#elif (CONFIG_BMX280_DEFAULT_HUMIDITY_OVERSAMPLING_X8) #elif (CONFIG_BMX280_DEFAULT_HUMIDITY_OVERSAMPLING_X8)
#define BMX280_DEFAULT_HUMIDITY_OVERSAMPLING BMX280_HUMIDITY_OVERSAMPLING_X8 #define BMX280_DEFAULT_HUMIDITY_OVERSAMPLING BMX280_HUMIDITY_OVERSAMPLING_X8
#else #else
#define BMX280_DEFAULT_HUMIDITY_OVERSAMPLING BMX280_HUMIDITY_OVERSAMPLING_X16 #define BMX280_DEFAULT_HUMIDITY_OVERSAMPLING BMX280_HUMIDITY_OVERSAMPLING_X16
#endif
#endif #endif
#if !(CONFIG_BMX280_EXPECT_BMP280) #if !(CONFIG_BMX280_EXPECT_BMP280)
#define BMX280_DEFAULT_CONFIG ((bmx280_config_t) { BMX280_DEFAULT_TEMPERATURE_OVERSAMPLING, BMX280_DEFAULT_PRESSURE_OVERSAMPLING, BMX280_DEFAULT_STANDBY, BMX280_DEFAULT_IIR, BMX280_DEFAULT_HUMIDITY_OVERSAMPLING }) #define BMX280_DEFAULT_CONFIG ((bmx280_config_t) { BMX280_DEFAULT_TEMPERATURE_OVERSAMPLING, BMX280_DEFAULT_PRESSURE_OVERSAMPLING, BMX280_DEFAULT_STANDBY, BMX280_DEFAULT_IIR, BMX280_DEFAULT_HUMIDITY_OVERSAMPLING })
#else #else
#define BMX280_DEFAULT_CONFIG ((bmx280_config_t) { BMX280_DEFAULT_TEMPERATURE_OVERSAMPLING, BMX280_DEFAULT_PRESSURE_OVERSAMPLING, BMX280_DEFAULT_STANDBY, BMX280_DEFAULT_IIR}) #define BMX280_DEFAULT_CONFIG ((bmx280_config_t) { BMX280_DEFAULT_TEMPERATURE_OVERSAMPLING, BMX280_DEFAULT_PRESSURE_OVERSAMPLING, BMX280_DEFAULT_STANDBY, BMX280_DEFAULT_IIR})
#endif
#endif #endif
#endif #endif