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

Functions

PUBLIC_API_WEAK float getFuncPairAllowedSplit ()
 
static FuncSensPair tps1p (TPS_TS_CONVERSION, SensorType::Tps1Primary)
 
static FuncSensPair tps1s (TPS_TS_CONVERSION, SensorType::Tps1Secondary)
 
static FuncSensPair tps2p (TPS_TS_CONVERSION, SensorType::Tps2Primary)
 
static FuncSensPair tps2s (TPS_TS_CONVERSION, SensorType::Tps2Secondary)
 
static RedundantPair analogTps1 (tps1p, tps1s, SensorType::Tps1)
 
static RedundantPair tps2 (tps2p, tps2s, SensorType::Tps2)
 
static FuncSensPair pedalPrimary (1, SensorType::AcceleratorPedalPrimary)
 
static FuncSensPair pedalSecondary (1, SensorType::AcceleratorPedalSecondary)
 
static RedundantPair pedal (pedalPrimary, pedalSecondary, SensorType::AcceleratorPedalUnfiltered)
 
void updateUnfilteredRawPedal ()
 
static FuncSensPair wastegate (1, SensorType::WastegatePosition)
 
static FuncSensPair idlePos (PACK_MULT_VOLTAGE, SensorType::IdlePosition)
 
void initTps ()
 
void deinitTps ()
 

Variables

SentTps sentTps
 
static RedundantFordTps fordTps1 (SensorType::Tps1, SensorType::Tps1Primary, SensorType::Tps1Secondary)
 
static RedundantFordTps fordTps2 (SensorType::Tps2, SensorType::Tps2Primary, SensorType::Tps2Secondary)
 
static RedundantFordTps fordPps (SensorType::AcceleratorPedalUnfiltered, SensorType::AcceleratorPedalPrimary, SensorType::AcceleratorPedalSecondary)
 
static ProxySensor driverIntent (SensorType::DriverThrottleIntent)
 
static ProxySensor ppsFilterSensor (SensorType::AcceleratorPedal)
 

Function Documentation

◆ analogTps1()

static RedundantPair analogTps1 ( tps1p  ,
tps1s  ,
SensorType::Tps1   
)
static

Referenced by deinitTps(), and initTps().

Here is the caller graph for this function:

◆ deinitTps()

void deinitTps ( )

Definition at line 278 of file init_tps.cpp.

278 {
281
282 analogTps1.deinit(isFordTps, &fordTps1);
283 tps2.deinit(isFordTps, &fordTps2);
284 pedal.deinit(isFordPps, &fordPps);
285
286#if EFI_SENT_SUPPORT
288#endif
289
290 wastegate.deinit();
291 idlePos.deinit();
292}
void unregister()
Definition sensor.cpp:135
engine_configuration_s & activeConfiguration
static FuncSensPair wastegate(1, SensorType::WastegatePosition)
static RedundantFordTps fordTps1(SensorType::Tps1, SensorType::Tps1Primary, SensorType::Tps1Secondary)
static RedundantPair pedal(pedalPrimary, pedalSecondary, SensorType::AcceleratorPedalUnfiltered)
static RedundantPair tps2(tps2p, tps2s, SensorType::Tps2)
static FuncSensPair idlePos(PACK_MULT_VOLTAGE, SensorType::IdlePosition)
static RedundantPair analogTps1(tps1p, tps1s, SensorType::Tps1)
static RedundantFordTps fordPps(SensorType::AcceleratorPedalUnfiltered, SensorType::AcceleratorPedalPrimary, SensorType::AcceleratorPedalSecondary)
SentTps sentTps
Definition init_tps.cpp:181
static RedundantFordTps fordTps2(SensorType::Tps2, SensorType::Tps2Primary, SensorType::Tps2Secondary)

Referenced by stopSensors().

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

◆ getFuncPairAllowedSplit()

PUBLIC_API_WEAK float getFuncPairAllowedSplit ( )

Definition at line 21 of file init_tps.cpp.

21 {
22 return 0.5f;
23}

◆ idlePos()

static FuncSensPair idlePos ( PACK_MULT_VOLTAGE  ,
SensorType::IdlePosition   
)
static

Referenced by deinitTps(), IdleController::getIdlePosition(), and initTps().

Here is the caller graph for this function:

◆ initTps()

void initTps ( )

Definition at line 206 of file init_tps.cpp.

206 {
207 criticalAssertVoid(engineConfiguration != nullptr, "null engineConfiguration");
210
214
215 float tpsSecondaryMaximum = engineConfiguration->tpsSecondaryMaximum;
216 if (tpsSecondaryMaximum < 20) {
217 // don't allow <20% split point
218 tpsSecondaryMaximum = 20;
219 }
220
221
222#if EFI_SENT_SUPPORT
223 if (isDigitalTps1()) {
225 } else
226#endif
227 {
228 analogTps1.init(isFordTps, &fordTps1, tpsSecondaryMaximum,
231 );
232 }
233
234 tps2.init(isFordTps, &fordTps2, tpsSecondaryMaximum,
237 );
238
239 float ppsSecondaryMaximum = engineConfiguration->ppsSecondaryMaximum;
240 if (ppsSecondaryMaximum < 20) {
241 // don't allow <20% split point
242 ppsSecondaryMaximum = 20;
243 }
244
245 // Pedal sensors
246 pedal.init(isFordPps, &fordPps, ppsSecondaryMaximum,
250 );
253 if (!arg) {
254 return arg;
255 }
256 static ExpAverage ppsExpAverage;
258 SensorResult result = ppsExpAverage.initOrAverage(arg.Value);
259 return result;
260 });
262
263 // TPS-like stuff that isn't actually a TPS
266 }
267
268 // Route the pedal or TPS to driverIntent as appropriate
271 } else {
273 }
274
276}
bool isAdcChannelValid(adc_channel_e hwChannel)
Definition adc_inputs.h:23
void setSmoothingFactor(float p_smoothingFactor)
Definition exp_average.h:26
float initOrAverage(float value)
Definition exp_average.h:9
void setConverter(functionFunctionPtr p_converter)
void setProxiedSensor(SensorType proxiedSensor)
bool Register()
Definition sensor.cpp:131
static constexpr engine_configuration_s * engineConfiguration
static ProxySensor ppsFilterSensor(SensorType::AcceleratorPedal)
static ProxySensor driverIntent(SensorType::DriverThrottleIntent)
float percent_t
expected< float > SensorResult
Definition sensor.h:46
@ AcceleratorPedalUnfiltered
bool isDigitalTps1()
Definition tps.cpp:83

Referenced by sensorStartUpOrReconfiguration().

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

◆ pedal()

static RedundantPair pedal ( pedalPrimary  ,
pedalSecondary  ,
SensorType::AcceleratorPedalUnfiltered   
)
static

Referenced by deinitTps(), initTps(), updateThrottles(), and updateUnfilteredRawPedal().

Here is the caller graph for this function:

◆ pedalPrimary()

static FuncSensPair pedalPrimary ( ,
SensorType::AcceleratorPedalPrimary   
)
static

◆ pedalSecondary()

static FuncSensPair pedalSecondary ( ,
SensorType::AcceleratorPedalSecondary   
)
static

◆ tps1p()

static FuncSensPair tps1p ( TPS_TS_CONVERSION  ,
SensorType::Tps1Primary   
)
static

◆ tps1s()

static FuncSensPair tps1s ( TPS_TS_CONVERSION  ,
SensorType::Tps1Secondary   
)
static

◆ tps2()

static RedundantPair tps2 ( tps2p  ,
tps2s  ,
SensorType::Tps2   
)
static

Referenced by deinitTps(), RedundantFordTps::get(), initTps(), setTPS1Inputs(), and updateThrottles().

Here is the caller graph for this function:

◆ tps2p()

static FuncSensPair tps2p ( TPS_TS_CONVERSION  ,
SensorType::Tps2Primary   
)
static

◆ tps2s()

static FuncSensPair tps2s ( TPS_TS_CONVERSION  ,
SensorType::Tps2Secondary   
)
static

◆ updateUnfilteredRawPedal()

void updateUnfilteredRawPedal ( )

Definition at line 194 of file init_tps.cpp.

194 {
195 pedal.updateUnfilteredRawValues();
196}

Referenced by updateThrottles().

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

◆ wastegate()

static FuncSensPair wastegate ( ,
SensorType::WastegatePosition   
)
static

Referenced by deinitTps(), and initTps().

Here is the caller graph for this function:

Variable Documentation

◆ driverIntent

◆ fordPps

Referenced by deinitTps(), and initTps().

◆ fordTps1

Referenced by deinitTps(), and initTps().

◆ fordTps2

Referenced by deinitTps(), and initTps().

◆ ppsFilterSensor

Referenced by initTps().

◆ sentTps

SentTps sentTps

Definition at line 181 of file init_tps.cpp.

Referenced by deinitTps(), initTps(), and sentTpsDecode().

Go to the source code of this file.