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