Skip to content

Commit

Permalink
[TEST] Added unit tests for SPC classes
Browse files Browse the repository at this point in the history
  • Loading branch information
rlagneau committed Mar 8, 2024
1 parent 88ed4c8 commit 54a2513
Show file tree
Hide file tree
Showing 4 changed files with 819 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -86,9 +86,9 @@ class VISP_EXPORT vpStatisticalTestShewhart : public vpStatisticalTestSigma
static std::string vpWecoRulesAlarmToString(const vpWecoRulesAlarm &alarm);

static const bool CONST_ALL_WECO_ACTIVATED[COUNT_WECO - 1];
static const int NB_DATA_SIGNAL = 8;

protected:
static const int NB_DATA_SIGNAL = 8;
unsigned int m_nbDataInBuffer; /*!< Indicate how many data are available in the circular buffer.*/
float m_signal[NB_DATA_SIGNAL]; /*!< The last values of the signal.*/
bool m_activateWECOrules; /*!< If true, activate the WECO's rules (NB: it increases the sensitivity of the Shewhart
Expand Down
2 changes: 1 addition & 1 deletion modules/core/src/math/misc/vpStatisticalTestShewhart.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ vpStatisticalTestAbstract::vpMeanDriftType vpStatisticalTestShewhart::detectDown
// Reinit for next iteration
nbAbove2SigmaLimit = 0;
nbAbove1SigmaLimit = 0;
if (m_signal[id] <= m_mean && m_activatedWECOrules[SAME_SIDE_WECO]) {
if (m_signal[id] < m_mean && m_activatedWECOrules[SAME_SIDE_WECO]) {
// Single-side test
++nbAboveMean;
}
Expand Down
Loading

0 comments on commit 54a2513

Please sign in to comment.