static double config_altitude = NAN; /**< altitude */
static int config_normalize = 0; /**< normalization method */
-static _Bool configured = 0; /**< the whole plugin config status */
+static bool configured; /**< the whole plugin config status */
static int i2c_bus_fd = -1; /**< I2C bus device FD */
/* Used only for MPL115. MPL3115 supports real oversampling in the device so */
/* no need for any postprocessing. */
-static _Bool avg_initialized = 0; /**< already initialized by real values */
+static bool avg_initialized; /**< already initialized by real values */
typedef struct averaging_s {
long int *ring_buffer;
typedef struct temperature_list_s {
char *sensor_name; /**< sensor name/reference */
size_t num_values; /**< number of values (usually one) */
- _Bool initialized; /**< sensor already provides data */
+ bool initialized; /**< sensor already provides data */
struct temperature_list_s *next; /**< next in the list */
} temperature_list_t;
continue;
}
- DEBUG(
- "barometer: get_reference_temperature - initialize \"%s\", %zu vals",
- list->sensor_name, values_num);
+ DEBUG("barometer: get_reference_temperature - initialize \"%s\", %" PRIsz
+ " vals",
+ list->sensor_name, values_num);
list->initialized = 1;
list->num_values = values_num;
for (size_t i = 0; i < values_num; ++i) {
- DEBUG("barometer: get_reference_temperature - rate %zu: %lf **", i,
- values[i]);
+ DEBUG("barometer: get_reference_temperature - rate %" PRIsz ": %lf **",
+ i, values[i]);
if (!isnan(values[i])) {
avg_sum += values[i];
++avg_num;
}
for (size_t i = 0; i < REF_TEMP_AVG_NUM * list->num_values; ++i) {
- DEBUG("barometer: get_reference_temperature - history %zu: %lf", i,
+ DEBUG("barometer: get_reference_temperature - history %" PRIsz ": %lf", i,
values_history[i]);
if (!isnan(values_history[i])) {
avg_sum += values_history[i];
}
for (size_t i = 0; i < values_num; ++i) {
- DEBUG("barometer: get_reference_temperature - rate last %zu: %lf **", i,
- values[i]);
+ DEBUG("barometer: get_reference_temperature - rate last %" PRIsz
+ ": %lf **",
+ i, values[i]);
if (!isnan(values[i])) {
avg_sum += values[i];
++avg_num;