rusEFI
The most advanced open source ECU
Loading...
Searching...
No Matches
Public Member Functions | Private Attributes
Hysteresis Class Reference

#include <hysteresis.h>

Collaboration diagram for Hysteresis:
Collaboration graph
[legend]

Public Member Functions

template<typename RisingChecker = StrictChecker, typename FallingChecker = StrictChecker>
bool test (float value, float rising, float falling)
 
bool test (bool risingCondition, bool fallingCondition)
 

Private Attributes

bool m_state = false
 

Detailed Description

Definition at line 19 of file hysteresis.h.

Member Function Documentation

◆ test() [1/2]

bool Hysteresis::test ( bool  risingCondition,
bool  fallingCondition 
)

Definition at line 7 of file hysteresis.cpp.

7 {
8 if (risingCondition) {
9 m_state = true;
10 } else if (fallingCondition) {
11 m_state = false;
12 }
13
14 return m_state;
15}
bool m_state
Definition hysteresis.h:27

◆ test() [2/2]

template<typename RisingChecker , typename FallingChecker >
bool Hysteresis::test ( float  value,
float  rising,
float  falling 
)

Definition at line 31 of file hysteresis.h.

31 {
32 return test(RisingChecker::isBefore(rising, value), FallingChecker::isBefore(value, falling));
33}
union test_buffers test
Definition test.c:50

Referenced by getStage2InjectionFraction(), DfcoController::getState(), and LimpManager::updateState().

Here is the caller graph for this function:

Field Documentation

◆ m_state

bool Hysteresis::m_state = false
private

Definition at line 27 of file hysteresis.h.

Referenced by test().


The documentation for this class was generated from the following files: