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

Functions

void initRangeSensors ()
 

Variables

static FunctionalSensor rangeSensors []
 
static ResistanceFunc rangeFuncs [RANGE_INPUT_COUNT]
 

Function Documentation

◆ initRangeSensors()

void initRangeSensors ( )

Definition at line 25 of file init_range.cpp.

25 {
26 for (size_t i = 0; i < efi::size(engineConfiguration->tcu_rangeAnalogInput); i++) {
28
29 // Skip unconfigured channels
31 continue;
32 }
33
35
36 auto& sensor = rangeSensors[i];
37 sensor.setFunction(rangeFuncs[i]);
39
41 }
42}
bool isAdcChannelValid(adc_channel_e hwChannel)
Definition adc_inputs.h:23
uint16_t channel
Definition adc_inputs.h:104
static AdcSubscriptionEntry * SubscribeSensor(FunctionalSensorBase &sensor, adc_channel_e channel, float lowpassCutoffHZ, float voltsPerAdcVolt=0.0f)
void configure(float supplyVoltage, float pullupResistor, bool isPulldown)
bool Register()
Definition sensor.cpp:131
static constexpr engine_configuration_s * engineConfiguration
static Lps25Sensor sensor(device)
static ResistanceFunc rangeFuncs[RANGE_INPUT_COUNT]
static FunctionalSensor rangeSensors[]

Referenced by sensorStartUpOrReconfiguration().

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

Variable Documentation

◆ rangeFuncs

ResistanceFunc rangeFuncs[RANGE_INPUT_COUNT]
static

Definition at line 21 of file init_range.cpp.

Referenced by initRangeSensors().

◆ rangeSensors

FunctionalSensor rangeSensors[]
static
Initial value:
= {
{ SensorType::RangeInput1, MS2NT(50) },
{ SensorType::RangeInput2, MS2NT(50) },
{ SensorType::RangeInput3, MS2NT(50) },
{ SensorType::RangeInput4, MS2NT(50) },
{ SensorType::RangeInput5, MS2NT(50) },
{ SensorType::RangeInput6, MS2NT(50) },
}

Definition at line 12 of file init_range.cpp.

12 {
13 { SensorType::RangeInput1, MS2NT(50) },
14 { SensorType::RangeInput2, MS2NT(50) },
15 { SensorType::RangeInput3, MS2NT(50) },
16 { SensorType::RangeInput4, MS2NT(50) },
17 { SensorType::RangeInput5, MS2NT(50) },
18 { SensorType::RangeInput6, MS2NT(50) },
19};

Referenced by initRangeSensors().

Go to the source code of this file.