rusEFI
The most advanced open source ECU
Loading...
Searching...
No Matches
Public Member Functions | Private Attributes
Deadband< TDeadband > Class Template Reference

#include <deadband.h>

Collaboration diagram for Deadband< TDeadband >:
Collaboration graph
[legend]

Public Member Functions

bool gt (float lhs, float rhs)
 
bool lt (float lhs, float rhs)
 

Private Attributes

bool m_lastState =false
 

Detailed Description

template<int TDeadband>
class Deadband< TDeadband >

Definition at line 13 of file deadband.h.

Member Function Documentation

◆ gt()

template<int TDeadband>
bool Deadband< TDeadband >::gt ( float  lhs,
float  rhs 
)
inline

Definition at line 15 of file deadband.h.

15 {
16 // If we're within the deadband, be "sticky" with the previous value
17 float absError = std::abs(lhs - rhs);
18
19 // If there's enough error, actually compare values
20 if (absError > TDeadband) {
21 m_lastState = lhs > rhs;
22 }
23
24 return m_lastState;
25 }
bool m_lastState
Definition deadband.h:33

Referenced by ShortTermFuelTrim::computeStftBin(), and Deadband< TDeadband >::lt().

Here is the caller graph for this function:

◆ lt()

template<int TDeadband>
bool Deadband< TDeadband >::lt ( float  lhs,
float  rhs 
)
inline

Definition at line 28 of file deadband.h.

28 {
29 return gt(rhs, lhs);
30 }
bool gt(float lhs, float rhs)
Definition deadband.h:15

Referenced by ShortTermFuelTrim::computeStftBin().

Here is the call graph for this function:
Here is the caller graph for this function:

Field Documentation

◆ m_lastState

template<int TDeadband>
bool Deadband< TDeadband >::m_lastState =false
private

Definition at line 33 of file deadband.h.

Referenced by Deadband< TDeadband >::gt().


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