rusEFI
The most advanced open source ECU
Loading...
Searching...
No Matches
launch_control.h
Go to the documentation of this file.
1/*
2 * @file launch_control.h
3 *
4 * @date Mar 23, 2020
5 * @author Andrey Belomutskiy, (c) 2012-2020
6 */
7
8#pragma once
9
11
13
14enum class LaunchCondition {
16 Launch,
17 NotMet
18};
19
21public:
23 // Update the state of the launch control system
24 void update();
25
26 float getFuelCoefficient() const;
27 bool isInsideSpeedCondition() const;
28 bool isInsideTpsCondition() const;
32
35
36 float getSparkSkipRatio() const { return sparkSkipRatio; }
37
38private:
39 bool isLaunchRpmRetardCondition() const;
40
41 float calculateSparkSkipRatio(float rpm) const;
42
43
44 float sparkSkipRatio = 0.0f;
45};
46
47/**
48 * See also SoftLimiterSandbox.java
49 */
51public:
52 SoftSparkLimiter(bool p_allowHardCut);
53 /**
54 * targetSkipRatio of '0' means 'do not skip', would always return false
55 */
57 float luaSoftSparkSkip,
59 float launchOrShiftTorqueReductionControllerSparkSkipRatio = 0.0f
60 );
61 [[nodiscard]] float getTargetSkipRatio() const { return targetSkipRatio; }
62
63 bool shouldSkip();
64private:
65 const bool allowHardCut;
66 bool wasJustSkipped = false;
67 float targetSkipRatio = 0;
68};
float calculateSparkSkipRatio(float rpm) const
LaunchCondition calculateLaunchCondition(float rpm)
bool isLaunchRpmRetardCondition() const
bool isLaunchFuelRpmRetardCondition() const
float getFuelCoefficient() const
bool isLaunchSparkRpmRetardCondition() const
LaunchCondition calculateRPMLaunchCondition(float rpm)
bool isInsideSpeedCondition() const
bool isInsideTpsCondition() const
float getSparkSkipRatio() const
const bool allowHardCut
void updateTargetSkipRatio(float luaSoftSparkSkip, float tractionControlSparkSkip, float launchOrShiftTorqueReductionControllerSparkSkipRatio=0.0f)
float getTargetSkipRatio() const
void initLaunchControl()
LaunchCondition
tractionControlSparkSkip("tractionControlSparkSkip", SensorCategory.SENSOR_INPUTS, FieldType.INT, 1396, 1.0, -1.0, -1.0, "")
luaSoftSparkSkip("luaSoftSparkSkip", SensorCategory.SENSOR_INPUTS, FieldType.INT, 1388, 1.0, -1.0, -1.0, "")