X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Fbarometer.c;h=a54d998a99281e20049ad66620a424bf92fdd784;hb=d67f84e24b2520b5b1ccbbf1ff9d1f397e075417;hp=17c2a1a2398d3579694b97082584526dd5344b78;hpb=a396da422740caf336a6d594515e8d80de6f440a;p=collectd.git diff --git a/src/barometer.c b/src/barometer.c index 17c2a1a2..a54d998a 100644 --- a/src/barometer.c +++ b/src/barometer.c @@ -27,6 +27,9 @@ #include #include +#if HAVE_I2C_SMBUS_H +#include +#endif #include #include #include @@ -180,11 +183,11 @@ static int config_keys_num = STATIC_ARRAY_SIZE(config_keys); static char *config_device; /**< I2C bus device */ static int config_oversample = 1; /**< averaging window */ -static double config_press_offset = 0.0; /**< pressure offset */ -static double config_temp_offset = 0.0; /**< temperature offset */ +static double config_press_offset; /**< pressure offset */ +static double config_temp_offset; /**< temperature offset */ static double config_altitude = NAN; /**< altitude */ -static int config_normalize = 0; /**< normalization method */ +static int config_normalize; /**< normalization method */ static bool configured; /**< the whole plugin config status */ @@ -193,7 +196,7 @@ static int i2c_bus_fd = -1; /**< I2C bus device FD */ static enum Sensor_type sensor_type = Sensor_none; /**< detected/used sensor type */ -static __s32 mpl3115_oversample = 0; /**< MPL3115 CTRL1 oversample setting */ +static __s32 mpl3115_oversample; /**< MPL3115 CTRL1 oversample setting */ // BMP085 configuration static unsigned bmp085_oversampling; /**< BMP085 oversampling (0-3) */