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

#include <antilag_system.h>

Inheritance diagram for AntilagSystemBase:
Inheritance graph
[legend]
Collaboration diagram for AntilagSystemBase:
Collaboration graph
[legend]

Public Member Functions

void update ()
 
bool isALSMinRPMCondition (float rpm) const
 
bool isALSMaxRPMCondition (float rpm) const
 
bool isALSMinCLTCondition () const
 
bool isALSMaxCLTCondition () const
 
bool isALSMaxThrottleIntentCondition () const
 
bool isInsideALSSwitchCondition ()
 
bool isInsideALSTimerCondition ()
 
bool isAntilagConditionMet (float rpm)
 

Private Attributes

Timer ALStimer
 

Additional Inherited Members

- Data Fields inherited from antilag_system_state_s
bool isAntilagCondition: 1 {}
 
bool ALSMinRPMCondition: 1 {}
 
bool ALSMaxRPMCondition: 1 {}
 
bool ALSMinCLTCondition: 1 {}
 
bool ALSMaxCLTCondition: 1 {}
 
bool ALSMaxThrottleIntentCondition: 1 {}
 
bool isALSSwitchActivated: 1 {}
 
bool ALSActivatePinState: 1 {}
 
bool ALSSwitchCondition: 1 {}
 
bool ALSTimerCondition: 1 {}
 
bool luaAntilagState: 1 {}
 
bool unusedBit_11_11: 1 {}
 
bool unusedBit_11_12: 1 {}
 
bool unusedBit_11_13: 1 {}
 
bool unusedBit_11_14: 1 {}
 
bool unusedBit_11_15: 1 {}
 
bool unusedBit_11_16: 1 {}
 
bool unusedBit_11_17: 1 {}
 
bool unusedBit_11_18: 1 {}
 
bool unusedBit_11_19: 1 {}
 
bool unusedBit_11_20: 1 {}
 
bool unusedBit_11_21: 1 {}
 
bool unusedBit_11_22: 1 {}
 
bool unusedBit_11_23: 1 {}
 
bool unusedBit_11_24: 1 {}
 
bool unusedBit_11_25: 1 {}
 
bool unusedBit_11_26: 1 {}
 
bool unusedBit_11_27: 1 {}
 
bool unusedBit_11_28: 1 {}
 
bool unusedBit_11_29: 1 {}
 
bool unusedBit_11_30: 1 {}
 
bool unusedBit_11_31: 1 {}
 
float fuelALSCorrection = (float)0
 
scaled_channel< int16_t, 100, 1 > timingALSCorrection = (int16_t)0
 
scaled_channel< int16_t, 100, 1 > timingALSSkip = (int16_t)0
 

Detailed Description

Definition at line 15 of file antilag_system.h.

Member Function Documentation

◆ isALSMaxCLTCondition()

bool AntilagSystemBase::isALSMaxCLTCondition ( ) const

Definition at line 51 of file antilag_system.cpp.

51 {
53
55}
static float getOrZero(SensorType type)
Definition sensor.h:83
static constexpr engine_configuration_s * engineConfiguration
static CCM_OPTIONAL FunctionalSensor clt(SensorType::Clt, MS2NT(10))

Referenced by isAntilagConditionMet().

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

◆ isALSMaxRPMCondition()

bool AntilagSystemBase::isALSMaxRPMCondition ( float  rpm) const

Definition at line 41 of file antilag_system.cpp.

Referenced by isAntilagConditionMet().

Here is the caller graph for this function:

◆ isALSMaxThrottleIntentCondition()

bool AntilagSystemBase::isALSMaxThrottleIntentCondition ( ) const

Definition at line 57 of file antilag_system.cpp.

Referenced by isAntilagConditionMet().

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

◆ isALSMinCLTCondition()

bool AntilagSystemBase::isALSMinCLTCondition ( ) const

Definition at line 45 of file antilag_system.cpp.

Referenced by isAntilagConditionMet().

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

◆ isALSMinRPMCondition()

bool AntilagSystemBase::isALSMinRPMCondition ( float  rpm) const

Definition at line 37 of file antilag_system.cpp.

Referenced by isAntilagConditionMet().

Here is the caller graph for this function:

◆ isAntilagConditionMet()

bool AntilagSystemBase::isAntilagConditionMet ( float  rpm)

Definition at line 69 of file antilag_system.cpp.

69 {
70
71
78 ALSTimerCondition = true;
79/*
80todo: looking for a hero to figure out unit test part of this
81 ALSTimerCondition = isInsideALSTimerCondition();
82 */
83
84 return ALSMinRPMCondition &&
91}
bool isALSMinCLTCondition() const
bool isALSMinRPMCondition(float rpm) const
bool isALSMaxThrottleIntentCondition() const
bool isALSMaxCLTCondition() const
bool isInsideALSSwitchCondition()
bool isALSMaxRPMCondition(float rpm) const

Referenced by update().

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

◆ isInsideALSSwitchCondition()

bool AntilagSystemBase::isInsideALSSwitchCondition ( )

Definition at line 15 of file antilag_system.cpp.

15 {
17
20#if EFI_PROD_CODE
22#else
23 ALSActivatePinState = false;
24#endif
25 }
27 } else if (engineConfiguration->antiLagActivationMode == LUA_ANTILAG) {
28 return luaAntilagState;
29 } else if (engineConfiguration->antiLagActivationMode == ALWAYS_ON_ANTILAG) {
30 return true;
31 } else {
32 criticalError("Unexpected antiLagActivationMode");
33 return false;
34 }
35}
bool efiReadPin(brain_pin_e pin)
Definition io_pins.cpp:89
bool isBrainPinValid(brain_pin_e brainPin)

Referenced by isAntilagConditionMet().

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

◆ isInsideALSTimerCondition()

bool AntilagSystemBase::isInsideALSTimerCondition ( )

Definition at line 63 of file antilag_system.cpp.

63 {
64 auto ALStime = ALStimer.getElapsedSeconds();
65
66 return ALStime < engineConfiguration->ALSMaxDuration;
67}

◆ update()

void AntilagSystemBase::update ( )

Definition at line 93 of file antilag_system.cpp.

93 {
96
97 if (!ALSMaxRPMCondition) {
98 ALStimer.reset();
99 }
100
101#if EFI_ANTILAG_SYSTEM
103#endif // EFI_ANTILAG_SYSTEM
104}
bool isAntilagConditionMet(float rpm)
percent_t getFuelALSCorrection(float rpm)

Referenced by EngineState::periodicFastCallback().

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

Field Documentation

◆ ALStimer

Timer AntilagSystemBase::ALStimer
private

Definition at line 30 of file antilag_system.h.

Referenced by isInsideALSTimerCondition(), and update().


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