rusEFI
The most advanced open source ECU
Loading...
Searching...
No Matches
Functions | Variables
init_lambda.cpp File Reference

Functions

template<>
const wideband_state_sgetLiveData (size_t idx)
 
void initLambda ()
 

Variables

static GetAfrWrapper afrWrapper
 
static FunctionPointerSensor lambdaSensor (SensorType::Lambda1, []() { return afrWrapper.getLambda();})
 
static FunctionPointerSensor lambdaSensor2 (SensorType::Lambda2, []() { return afrWrapper.getLambda2();})
 
static AemXSeriesWideband aem1 (0, SensorType::Lambda1)
 
static AemXSeriesWideband aem2 (1, SensorType::Lambda2)
 

Function Documentation

◆ getLiveData()

template<>
const wideband_state_s * getLiveData ( size_t  idx)

Definition at line 37 of file init_lambda.cpp.

37 {
38#if EFI_CAN_SUPPORT
39 switch (idx) {
40 case 0:
42 return &aem1;
43 case 1:
45 return &aem2;
46 }
47#endif
48
49 return nullptr;
50}
static AemXSeriesWideband aem2(1, SensorType::Lambda2)
static AemXSeriesWideband aem1(0, SensorType::Lambda1)
Here is the call graph for this function:

◆ initLambda()

void initLambda ( )

Definition at line 52 of file init_lambda.cpp.

52 {
53 // first we register the smoothed sensors for the early return on the can wbo case
56
57#if EFI_CAN_SUPPORT
60 criticalError("CAN read and write are required to use CAN wideband.");
61 return;
62 }
63
66
67 return;
68 }
69#endif
70
71#if EFI_UNIT_TEST
72 constexpr bool isUnitTest = true;
73#else
74 constexpr bool isUnitTest = false;
75#endif
76
77 // CANbus option is handled above, let's handle analog inputs conditionally to give Lua sensors a chance
80 }
83 }
84}
bool isAdcChannelValid(adc_channel_e hwChannel)
Definition adc_inputs.h:23
void registerCanSensor(CanSensorBase &sensor)
Definition can_rx.cpp:92
bool Register()
Definition sensor.cpp:131
StoredValueSensor smoothedLambda2Sensor(SensorType::SmoothedLambda2, MS2NT(500))
StoredValueSensor smoothedLambda1Sensor(SensorType::SmoothedLambda1, MS2NT(500))
static constexpr engine_configuration_s * engineConfiguration
static FunctionPointerSensor lambdaSensor2(SensorType::Lambda2, []() { return afrWrapper.getLambda2();})
static FunctionPointerSensor lambdaSensor(SensorType::Lambda1, []() { return afrWrapper.getLambda();})

Referenced by initNewSensors().

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

Variable Documentation

◆ aem1

Referenced by getLiveData(), and initLambda().

◆ aem2

Referenced by getLiveData(), and initLambda().

◆ afrWrapper

GetAfrWrapper afrWrapper
static

Definition at line 17 of file init_lambda.cpp.

◆ lambdaSensor

FunctionPointerSensor lambdaSensor(SensorType::Lambda1,[]() { return afrWrapper.getLambda();}) ( SensorType::Lambda1  ,
[] () { return afrWrapper.getLambda();}   
)
static

◆ lambdaSensor2

FunctionPointerSensor lambdaSensor2(SensorType::Lambda2,[]() { return afrWrapper.getLambda2();}) ( SensorType::Lambda2  ,
[] () { return afrWrapper.getLambda2();}   
)
static

Referenced by initLambda().

Go to the source code of this file.