diff --git a/code/espurna/sensor.ino b/code/espurna/sensor.ino index 4d4210dd..d314e6d0 100644 --- a/code/espurna/sensor.ino +++ b/code/espurna/sensor.ino @@ -15,15 +15,15 @@ Copyright (C) 2016-2017 by Xose PĂ©rez #include "sensors/BaseSensor.h" typedef struct { - BaseSensor * sensor; + BaseSensor * sensor; // Sensor object + BaseFilter * filter; // Filter object unsigned char local; // Local index in its provider - unsigned char type; // Type of measurement + unsigned char type; // Type of measurement unsigned char global; // Global index in its type double current; // Current (last) value, unfiltered double filtered; // Filtered (averaged) value double reported; // Last reported value double min_change; // Minimum value change to report - BaseFilter * filter; // Filter object } sensor_magnitude_t; std::vector _sensors; @@ -32,7 +32,7 @@ std::vector _magnitudes; unsigned char _counts[MAGNITUDE_MAX]; bool _sensor_realtime = API_REAL_TIME_VALUES; unsigned long _sensor_read_interval = 1000 * SENSOR_READ_INTERVAL; -unsigned int _sensor_report_every = SENSOR_REPORT_EVERY; +unsigned char _sensor_report_every = SENSOR_REPORT_EVERY; unsigned char _sensor_temperature_units = SENSOR_TEMPERATURE_UNITS; double _sensor_temperature_correction = SENSOR_TEMPERATURE_CORRECTION;