STIMA
3
|
#include <sensors_config.h>
Go to the source code of this file.
Macros | |
#define | MODULE_MAIN_VERSION (3) |
Module main version. | |
#define | MODULE_MINOR_VERSION (6) |
Module minor version. | |
#define | MODULE_CONFIGURATION_VERSION (1) |
Module version of compatibile configuration. If you change it, you have to reconfigure. | |
#define | CONFIGURATION_DEFAULT_TEMPERATURE_ADDRESS (I2C_THR_TEMPERATURE_DEFAULT_ADDRESS) |
Default i2c temperature address. | |
#define | CONFIGURATION_DEFAULT_HUMIDITY_ADDRESS (I2C_THR_HUMIDITY_DEFAULT_ADDRESS) |
Default i2c humidity address. | |
#define | CONFIGURATION_RESET_PIN (8) |
Input pin for reset configuration at startup. | |
#define | I2C_MAX_TIME (12) |
Max i2c time in seconds before i2c restart. | |
#define | USE_POWER_DOWN (true) |
Enable or disable power down. | |
#define | DEBOUNCING_POWER_DOWN_TIME_MS (10) |
Debounce power down ms. | |
#define | USE_TIMER_1 (true) |
Enable or disable timer1. | |
#define | WDT_TIMER (WDTO_8S) |
Watchdog timer for periodically check microprocessor block states. More... | |
#define | TIMER1_INTERRUPT_TIME_MS (4000) |
Value in milliseconds for generating timer1 interrupt: from 100 to TIMER1_OVERFLOW_TIME_MS. | |
#define | TIMER1_TCNT1_VALUE ((uint16_t)(0xFFFF - (float)(1.0 * 0xFFFF * TIMER1_INTERRUPT_TIME_MS / TIMER1_OVERFLOW_TIME_MS))) |
Timer1 timer overflow with 1024 prescaler at 8 MHz. | |
#define | TIMER_COUNTER_VALUE_MAX_MS (SENSORS_SAMPLE_TIME_MS) |
Maximum timer1 counter value for timed tasks. | |
#define | SDCARD_CHIP_SELECT_PIN (7) |
Chip select for SDcard SPI. | |
#define | SPI_SPEED (SD_SCK_MHZ(4)) |
Clock speed for SPI and SDcard. | |
#define | SENSOR_ERROR_COUNT_MAX (20) |
#define | SENSORS_SAMPLE_TIME_MS (4000) |
Milliseconds for sampling sensors: 100 - 60000 [ms] must be integer multiple of TIMER1_INTERRUPT_TIME_MS !!! | |
#define | OBSERVATION_SAMPLES_COUNT_MIN ((uint8_t)(OBSERVATIONS_MINUTES * 60 / ((uint8_t)(SENSORS_SAMPLE_TIME_MS / 1000)))) |
Sample count minimum in OBSERVATIONS_MINUTES minutes. | |
#define | OBSERVATION_SAMPLES_COUNT_MAX (OBSERVATION_SAMPLES_COUNT_MIN) |
Sample count maximum in OBSERVATIONS_MINUTES minutes. | |
#define | RMAP_REPORT_SAMPLE_VALID (true) |
#define | RMAP_REPORT_SAMPLES_COUNT (STATISTICAL_DATA_COUNT * OBSERVATIONS_MINUTES * OBSERVATION_SAMPLES_COUNT_MAX) |
#define | OBSERVATION_SAMPLE_ERROR_MAX ((uint16_t)(round(OBSERVATION_SAMPLES_COUNT_MAX - 2))) |
Maximum invalid sample count for generate a valid observations. | |
#define | OBSERVATION_SAMPLE_VALID_MIN ((uint16_t)(OBSERVATION_SAMPLES_COUNT_MAX - OBSERVATION_SAMPLE_ERROR_MAX)) |
#define | RMAP_REPORT_SAMPLE_ERROR_MAX ((uint16_t)(STATISTICAL_DATA_COUNT * OBSERVATION_SAMPLE_ERROR_MAX)) |
#define | RMAP_REPORT_SAMPLE_VALID_MIN ((uint16_t)(STATISTICAL_DATA_COUNT * OBSERVATION_SAMPLE_VALID_MIN)) |
#define | RMAP_REPORT_ERROR_MAX ((uint16_t)(STATISTICAL_DATA_COUNT - 1)) |
#define | RMAP_REPORT_VALID_MIN ((uint16_t)(STATISTICAL_DATA_COUNT - RMAP_REPORT_ERROR_MAX)) |
#define | SAMPLES_COUNT ((60000 / SENSORS_SAMPLE_TIME_MS * STATISTICAL_DATA_COUNT) + 10) |
#define | RMAP_REPORT_INTERVAL_S (STATISTICAL_DATA_COUNT * OBSERVATIONS_MINUTES * 60.0) |
#define | USE_SENSORS_COUNT (USE_SENSOR_ADT + USE_SENSOR_HIH + USE_SENSOR_HYT + USE_SENSOR_TBR) |
Sensors count. | |
#define | USE_SENSOR_DRIVER_COUNT (USE_SENSOR_ADT + USE_SENSOR_HIH + USE_SENSOR_HYT) |
#define | SENSORS_RETRY_COUNT_MAX (2) |
Maximum number of retry for sensors reading. | |
#define | SENSORS_RETRY_DELAY_MS (100) |
Waiting for reading between two attempts. | |
#define WDT_TIMER (WDTO_8S) |
Watchdog timer for periodically check microprocessor block states.
Possible value for WDT_TIMER are: WDTO_15MS, WDTO_30MS, WDTO_60MS, WDTO_120MS, WDTO_250MS, WDTO_500MS, WDTO_1S, WDTO_2S, WDTO_4S, WDTO_8S