Skip to content

Commit

Permalink
some bugs on timing and missing data in some situations
Browse files Browse the repository at this point in the history
  • Loading branch information
pat1 committed Feb 16, 2022
1 parent 7fcbb6d commit e86a472
Show file tree
Hide file tree
Showing 2 changed files with 168 additions and 188 deletions.
13 changes: 7 additions & 6 deletions platformio/stima_v3/i2c-th/src/i2c-th-config.h
Original file line number Diff line number Diff line change
Expand Up @@ -157,19 +157,20 @@ WDTO_1S, WDTO_2S, WDTO_4S, WDTO_8S

#define SAMPLES_COUNT_MAX (((60000 * OBSERVATIONS_MINUTES) / SENSORS_SAMPLE_TIME_MS) + 10)

/*!
\def OBSERVATION_SAMPLE_ERROR_MAX
\brief Maximum invalid sample count for generate a valid observations.
*/
#define OBSERVATION_SAMPLE_ERROR_MAX ((uint16_t)(round(SAMPLES_COUNT_MAX/10)))

/*!
\def OBSERVATION_SAMPLES_COUNT
\brief Sample count in OBSERVATIONS_MINUTES minutes.
*/
#define OBSERVATION_SAMPLES_COUNT ((uint8_t)(OBSERVATIONS_MINUTES * 60 / ((uint8_t)(SENSORS_SAMPLE_TIME_MS / 1000))))


/*!
\def OBSERVATION_SAMPLE_ERROR_MAX
\brief Maximum invalid sample count for generate a valid observations.
*/
#define OBSERVATION_SAMPLE_ERROR_MAX ((uint16_t)(round(OBSERVATION_SAMPLES_COUNT/10.)))


#define RMAP_REPORT_ERROR_MAX ((uint16_t)(1))
#define RMAP_REPORT_VALID_MIN ((uint16_t)(2))

Expand Down
Loading

0 comments on commit e86a472

Please sign in to comment.