Stima V4 Slave RAIN
4.2
|
Go to the source code of this file.
Macros | |
#define | MODULE_MAIN_VERSION (4) |
Module main version. More... | |
#define | MODULE_MINOR_VERSION (3) |
Module minor version. More... | |
#define | RMAP_PROCOTOL_VERSION (1) |
rmap protocol version More... | |
#define | MODULE_TYPE (STIMA_MODULE_TYPE_TH) |
Type of module. It is defined in registers.h. More... | |
#define | DEBUG_MODE (false) |
Enable control Error for Debug. More... | |
#define | ERROR_HANDLER_CB (false) |
#define | ENABLE_I2C1 (true) |
Enable I2C1 interface. More... | |
#define | ENABLE_I2C2 (true) |
Enable I2C2 interface. More... | |
#define | ENABLE_QSPI (true) |
Enable QSPI interface. More... | |
#define | ENABLE_CAN (true) |
Enable CAN BUS interface. More... | |
#define | ENABLE_ACCELEROMETER (true) |
Enable I2C Accelerometer. More... | |
#define | ENABLE_DIAG_PIN (false) |
Enable HW Diag PIN redefine. More... | |
#define | ENABLE_WDT (true) |
Enable WatchDog Task and Module. More... | |
#define | WDT_TIMEOUT_BASE_US (8000000) |
WatchDog Hardware microseconds timeout. More... | |
#define | WDT_STARTING_TASK_MS (60000) |
Init WatchDog Task local milliseconds. More... | |
#define | WDT_CONTROLLER_MS (2000) |
Task milliseconds minimal check. More... | |
#define | ENABLE_STACK_USAGE (true) |
Enable stack usage. More... | |
#define | UNUSED_SUB_POSITION (0) |
Monitor Sub Position not used flag. More... | |
#define | NORMAL_STATE (0) |
Monitor No Sleep / No Suspend. More... | |
#define | SLEEP_STATE (1) |
Sleep Task For Wdt or LowPower Check More... | |
#define | SUSPEND_STATE (2) |
Suspend Task from Wdt More... | |
#define | ENABLE_RTC (true) |
Enable RTC Interface. More... | |
#define | RTC_WAIT_DELAY_MS (100) |
Delay for RTC in milliseconds. More... | |
#define | START_EEPROM_ADDRESS (0) |
Starting EEPROM address. More... | |
#define | SIZE_EEPROM_RESERVED (450) |
Size EEPROM reserved address. Must be > CONFIGURATION_EEPROM_END. More... | |
#define | BOOT_LOADER_STRUCT_ADDR (START_EEPROM_ADDRESS) |
Bootloader start address More... | |
#define | BOOT_LOADER_STRUCT_SIZE (sizeof(bootloader_t)) |
Bootloader struct size. More... | |
#define | BOOT_LOADER_STRUCT_END (START_EEPROM_ADDRESS + BOOT_LOADER_STRUCT_SIZE) |
Bootloader struct end address More... | |
#define | CONFIGURATION_EEPROM_ADDRESS (20) |
Start Address EEPROM configuration. More... | |
#define | REGISTER_EEPROM_ADDRESS (START_EEPROM_ADDRESS + SIZE_EEPROM_RESERVED) |
Start Standard UAVCAN Register. More... | |
#define | SERIAL_DEBUG_BAUD_RATE (115200) |
Monitor Debug Serial speed. More... | |
#define | SYSTEM_MESSAGE_QUEUE_LENGTH (4) |
Request system message queue length. More... | |
#define | ELABORATE_DATA_QUEUE_LENGTH (6) |
Elaborate data message queue length. More... | |
#define | REQUEST_DATA_QUEUE_LENGTH (1) |
Request data message queue length. More... | |
#define | REPORT_DATA_QUEUE_LENGTH (1) |
Report data message queue length. More... | |
#define | RAIN_QUEUE_LENGTH (1) |
Request sensor queue length. More... | |
#define | ALL_TASK_ID (99) |
All task ID. Send message to ALL Task. More... | |
#define | SUPERVISOR_TASK_ID (0) |
Supervisor task ID. More... | |
#define | CAN_TASK_ID (1) |
CAN task ID. More... | |
#define | ELABORATE_TASK_ID (2) |
Elaborate data task ID. More... | |
#define | SENSOR_TASK_ID (3) |
Sensor acquire task ID. More... | |
#define | ACCELEROMETER_TASK_ID (4) |
Accelerometer task ID. More... | |
#define | WDT_TASK_ID (5) |
Watch Dog task ID. More... | |
#define | TOTAL_INFO_TASK (WDT_TASK_ID + 1) |
Total Max Task for WDT Task Control. More... | |
#define | WAIT_QUEUE_REQUEST_PUSHDATA_MS (500) |
Time to wait pushing data queue. More... | |
#define | WAIT_QUEUE_REQUEST_COMMAND_MS (500) |
Time to wait pushing command queue. More... | |
#define | WAIT_QUEUE_REQUEST_RESET_TIP_MS (2000) |
Time to wait event reset get tips command. More... | |
#define | RAIN_TIPPING_DELAY_MS (100) |
Default value for sensor acquire task delay tipping. More... | |
#define | RAIN_TIPPING_INIBITH_DELAY_MS (500) |
Default value for inibith tipping from 2 events. More... | |
#define | RAIN_TIPS_FOR_EVENT (2) |
How much mm (scaled RMAP) of rain for one tip of tipping bucket rain gauge. More... | |
#define | USE_TIPPING_BUCKET_REDUNDANT (true) |
Use redundant PIN tipping (verify and alert) More... | |
#define | USE_CLOGGED_UP_CONTROL (true) |
Use clogged UP system control (verify and alert) More... | |
#define | USE_TIPPING_CONTROL (false) |
Use strict tipping timings mode. More... | |
#define | TIPPING_EVENT_VALUE HIGH |
Input PIN tipping expected event value. More... | |
#define | TIPPING_BUCKET_PIN PIN_IN0 |
Input PIN tipping. More... | |
#define | TIPPING_BUCKET_PIN_REDUNDANT PIN_IN1 |
Redundant PIN tipping (verify and alert) More... | |
#define | CLOGGED_UP_PIN PIN_IN2 |
Clogged Up Alert PIN. More... | |
#define | CLOGGED_EVENT_VALUE LOW |
Input PIN clogged expected event value. More... | |
#define | SAMPLES_COUNT_MAX (3600) |
Sample and default value for elaborate task. More... | |
#define | OBSERVATIONS_TIME_S (60) |
Default observation (RMAP) time in second. More... | |
#define | REPORTS_TIME_S (900) |
Default report (RMAP) time in second. More... | |
#define | USE_MOBILE_TPR_60_S_AVG_MODE (false) |
Using mobile scrolling max -> avg value by 60 sec. on all data buffered consecutive. More... | |
#define | REPORT_INVALID_ACQUIRE_MIN_MS (3000) |
Minimal timing for 2 report calculate (less can be only a command retry) More... | |
#define | SAMPLES_ACQUIRE_MS (10000) |
Timing for acquire and check TPR elaboration. More... | |
#define | SAMPLES_NEED_TPR_60_S (60000 / SAMPLES_ACQUIRE_MS) |
Samples need for TPR over 1'. More... | |
#define | SAMPLES_NEED_TPR_05_M (300000 / SAMPLES_ACQUIRE_MS) |
Samples need for TPR over 5'. More... | |
#define | RAIN_TIPS_INDEX (0) |
#define | RAIN_RAIN_INDEX (1) |
#define | RAIN_FULL_INDEX (2) |
#define | RAIN_TIPS_RESET (3) |
#define | RAIN_SCROLL_INDEX (4) |
#define | RAIN_SCROLL_RESET (5) |
#define | MAX_VALID_RAIN (1000.0) |
Limit MAX valid range for module sensor. More... | |
#define | MIN_VALID_RAIN (0.0) |
Limit MIN valid range for module sensor. More... | |
#define | RAIN_RATE_MULTIPLY (1000) |
RMAP Multiply value for TPR Elaboration. More... | |
#define | SAMPLE_ERROR_PERCENTAGE_MIN (90.0) |
Samples min percent valid on elaboration data. More... | |
#define | OBSERVATION_ERROR_PERCENTAGE_MIN (90.0) |
Observation min percent valid on elaboration data. More... | |
#define ACCELEROMETER_TASK_ID (4) |
Accelerometer task ID.
#define ALL_TASK_ID (99) |
#define BOOT_LOADER_STRUCT_ADDR (START_EEPROM_ADDRESS) |
#define BOOT_LOADER_STRUCT_END (START_EEPROM_ADDRESS + BOOT_LOADER_STRUCT_SIZE) |
#define BOOT_LOADER_STRUCT_SIZE (sizeof(bootloader_t)) |
#define CLOGGED_EVENT_VALUE LOW |
#define CONFIGURATION_EEPROM_ADDRESS (20) |
#define ELABORATE_DATA_QUEUE_LENGTH (6) |
#define ENABLE_ACCELEROMETER (true) |
Enable I2C Accelerometer.
#define ENABLE_DIAG_PIN (false) |
#define MAX_VALID_RAIN (1000.0) |
#define MIN_VALID_RAIN (0.0) |
#define MODULE_TYPE (STIMA_MODULE_TYPE_TH) |
#define OBSERVATION_ERROR_PERCENTAGE_MIN (90.0) |
#define OBSERVATIONS_TIME_S (60) |
#define RAIN_RATE_MULTIPLY (1000) |
#define RAIN_TIPPING_DELAY_MS (100) |
#define RAIN_TIPPING_INIBITH_DELAY_MS (500) |
#define RAIN_TIPS_FOR_EVENT (2) |
#define REGISTER_EEPROM_ADDRESS (START_EEPROM_ADDRESS + SIZE_EEPROM_RESERVED) |
#define REPORT_DATA_QUEUE_LENGTH (1) |
#define REPORT_INVALID_ACQUIRE_MIN_MS (3000) |
#define REPORTS_TIME_S (900) |
#define REQUEST_DATA_QUEUE_LENGTH (1) |
#define RTC_WAIT_DELAY_MS (100) |
#define SAMPLE_ERROR_PERCENTAGE_MIN (90.0) |
#define SAMPLES_ACQUIRE_MS (10000) |
#define SAMPLES_COUNT_MAX (3600) |
#define SAMPLES_NEED_TPR_05_M (300000 / SAMPLES_ACQUIRE_MS) |
#define SAMPLES_NEED_TPR_60_S (60000 / SAMPLES_ACQUIRE_MS) |
#define SERIAL_DEBUG_BAUD_RATE (115200) |
#define SIZE_EEPROM_RESERVED (450) |
#define SLEEP_STATE (1) |
#define SYSTEM_MESSAGE_QUEUE_LENGTH (4) |
#define TIPPING_BUCKET_PIN_REDUNDANT PIN_IN1 |
#define TIPPING_EVENT_VALUE HIGH |
#define TOTAL_INFO_TASK (WDT_TASK_ID + 1) |
#define UNUSED_SUB_POSITION (0) |
#define USE_CLOGGED_UP_CONTROL (true) |
#define USE_MOBILE_TPR_60_S_AVG_MODE (false) |
#define USE_TIPPING_BUCKET_REDUNDANT (true) |
#define USE_TIPPING_CONTROL (false) |
#define WAIT_QUEUE_REQUEST_COMMAND_MS (500) |
#define WAIT_QUEUE_REQUEST_PUSHDATA_MS (500) |
#define WAIT_QUEUE_REQUEST_RESET_TIP_MS (2000) |
#define WDT_CONTROLLER_MS (2000) |
#define WDT_STARTING_TASK_MS (60000) |