Line | Branch | Decision | Exec | Source |
---|---|---|---|---|
1 | // | |||
2 | // Created by kifir on 8/23/24. | |||
3 | // | |||
4 | ||||
5 | #include "hysteresis.h" | |||
6 | ||||
7 | 3800 | bool Hysteresis::test(const bool risingCondition, const bool fallingCondition) { | ||
8 |
2/2✓ Branch 0 taken 55 times.
✓ Branch 1 taken 3745 times.
|
2/2✓ Decision 'true' taken 55 times.
✓ Decision 'false' taken 3745 times.
|
3800 | if (risingCondition) { |
9 | 55 | m_state = true; | ||
10 |
2/2✓ Branch 0 taken 3140 times.
✓ Branch 1 taken 605 times.
|
2/2✓ Decision 'true' taken 3140 times.
✓ Decision 'false' taken 605 times.
|
3745 | } else if (fallingCondition) { |
11 | 3140 | m_state = false; | ||
12 | } | |||
13 | ||||
14 | 3800 | return m_state; | ||
15 | } | |||
16 |