rusEFI
The most advanced open source ECU
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 
10 #include <rusefi/timer.h>
12 
13 void initLaunchControl();
14 
15 enum class LaunchCondition {
16  Launch,
17  NotMet
18 };
19 
21 public:
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 
34  bool isLaunchFuelRpmRetardCondition() const;
35 
36 private:
37  bool isLaunchRpmRetardCondition() const;
38 
40 };
41 
42 /**
43  * See also SoftLimiterSandbox.java
44  */
46 public:
48  /**
49  * targetSkipRatio of '0' means 'do not skip', would always return false
50  */
52 
53  bool shouldSkip();
54 private:
56  bool wasJustSkipped = false;
57  float targetSkipRatio = 0;
58 };
bool isLaunchRpmRetardCondition() const
bool isLaunchFuelRpmRetardCondition() const
float getFuelCoefficient() const
bool isLaunchSparkRpmRetardCondition() const
LaunchCondition isInsideRPMCondition(int rpm) const
LaunchCondition isLaunchConditionMet(int rpm)
bool isInsideSpeedCondition() const
bool isInsideTpsCondition() const
bool isInsideSwitchCondition()
SoftSparkLimiter(bool allowHardCut)
void setTargetSkipRatio(float targetSkipRatio)
void initLaunchControl()
LaunchCondition