mirror of
https://github.com/utkumaden/esp-idf-bmx280
synced 2025-01-23 05:26:33 +01:00
Fix preprocessor directive mishap causing compilation failure when BMX280_EXPECT_BMP280 set.
This commit is contained in:
parent
2bc4373f8d
commit
e1a05657e2
@ -142,26 +142,25 @@ typedef struct bmx280_config_t {
|
||||
#endif
|
||||
|
||||
#ifndef CONFIG_BMX280_EXPECT_BMP280
|
||||
#if (CONFIG_BMX280_DEFAULT_HUMIDITY_OVERSAMPLING_NONE)
|
||||
#define BMX280_DEFAULT_HUMIDITY_OVERSAMPLING BMX280_HUMIDITY_OVERSAMPLING_NONE
|
||||
#elif (CONFIG_BMX280_DEFAULT_HUMIDITY_OVERSAMPLING_X1)
|
||||
#define BMX280_DEFAULT_HUMIDITY_OVERSAMPLING BMX280_HUMIDITY_OVERSAMPLING_X1
|
||||
#elif (CONFIG_BMX280_DEFAULT_HUMIDITY_OVERSAMPLING_X2)
|
||||
#define BMX280_DEFAULT_HUMIDITY_OVERSAMPLING BMX280_HUMIDITY_OVERSAMPLING_X2
|
||||
#elif (CONFIG_BMX280_DEFAULT_HUMIDITY_OVERSAMPLING_X4)
|
||||
#define BMX280_DEFAULT_HUMIDITY_OVERSAMPLING BMX280_HUMIDITY_OVERSAMPLING_X4
|
||||
#elif (CONFIG_BMX280_DEFAULT_HUMIDITY_OVERSAMPLING_X8)
|
||||
#define BMX280_DEFAULT_HUMIDITY_OVERSAMPLING BMX280_HUMIDITY_OVERSAMPLING_X8
|
||||
#else
|
||||
#define BMX280_DEFAULT_HUMIDITY_OVERSAMPLING BMX280_HUMIDITY_OVERSAMPLING_X16
|
||||
#if (CONFIG_BMX280_DEFAULT_HUMIDITY_OVERSAMPLING_NONE)
|
||||
#define BMX280_DEFAULT_HUMIDITY_OVERSAMPLING BMX280_HUMIDITY_OVERSAMPLING_NONE
|
||||
#elif (CONFIG_BMX280_DEFAULT_HUMIDITY_OVERSAMPLING_X1)
|
||||
#define BMX280_DEFAULT_HUMIDITY_OVERSAMPLING BMX280_HUMIDITY_OVERSAMPLING_X1
|
||||
#elif (CONFIG_BMX280_DEFAULT_HUMIDITY_OVERSAMPLING_X2)
|
||||
#define BMX280_DEFAULT_HUMIDITY_OVERSAMPLING BMX280_HUMIDITY_OVERSAMPLING_X2
|
||||
#elif (CONFIG_BMX280_DEFAULT_HUMIDITY_OVERSAMPLING_X4)
|
||||
#define BMX280_DEFAULT_HUMIDITY_OVERSAMPLING BMX280_HUMIDITY_OVERSAMPLING_X4
|
||||
#elif (CONFIG_BMX280_DEFAULT_HUMIDITY_OVERSAMPLING_X8)
|
||||
#define BMX280_DEFAULT_HUMIDITY_OVERSAMPLING BMX280_HUMIDITY_OVERSAMPLING_X8
|
||||
#else
|
||||
#define BMX280_DEFAULT_HUMIDITY_OVERSAMPLING BMX280_HUMIDITY_OVERSAMPLING_X16
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#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
|
||||
#define BMX280_DEFAULT_CONFIG ((bmx280_config_t) { BMX280_DEFAULT_TEMPERATURE_OVERSAMPLING, BMX280_DEFAULT_PRESSURE_OVERSAMPLING, BMX280_DEFAULT_STANDBY, BMX280_DEFAULT_IIR})
|
||||
#endif
|
||||
|
||||
#define BMX280_DEFAULT_CONFIG ((bmx280_config_t) { BMX280_DEFAULT_TEMPERATURE_OVERSAMPLING, BMX280_DEFAULT_PRESSURE_OVERSAMPLING, BMX280_DEFAULT_STANDBY, BMX280_DEFAULT_IIR})
|
||||
#endif
|
||||
|
||||
#endif
|
Loading…
Reference in New Issue
Block a user