41 {
42 if (std::isnan(engineLoad)) {
44 return NAN;
45 }
46
48
49
51
57
59
60#if EFI_ANTILAG_SYSTEM
67 );
69 }
70#endif
71
72
75
80
81 advanceAngle += result.Value;
82 }
83
84
85#if EFI_IDLE_CONTROL
89
91 if (tps) {
92
93
94
95
97 advanceAngle =
interpolateClamped(idleThreshold / 2, idleAdvance, idleThreshold, advanceAngle, tps.Value);
98 }
99 }
100#endif
101
102#if EFI_IDLE_CONTROL
103
108 } else {
112 }
113#endif
114
115#if EFI_LAUNCH_CONTROL
122 if (smoothRetardStartRpm <= rpm) {
124
125 return interpolateClamped(smoothRetardStartRpm, advanceAngle, smoothRetardEndRpm, launchAngle, rpm);
126 } else {
127 return launchAngle;
128 }
129 }
131 return launchAngle;
132 }
133 }
136 ) {
138 }
141 }
142#endif
143
144#ifdef MODULE_VVL_CONTROLLER
146#endif
147
148 return advanceAngle;
149}
LaunchControlBase launchController
AntilagSystemBase antilagController
ShiftTorqueReductionController shiftTorqueReductionController
bool isIdlingOrTaper() const override
bool isCoastingAdvance() const override
static angle_t getInterpolatedIgnitionAngle(float rpm, float ignitionLoad)
static float getOrZero(SensorType type)
float getTorqueReductionIgnitionRetard() const
float getTimingModifier() const
BlendResult calculateBlend(blend_table_s &cfg, float rpm, float load)
bool warning(ObdCode code, const char *fmt,...)
static Map3D< TRACTION_CONTROL_ETB_DROP_SLIP_SIZE, TRACTION_CONTROL_ETB_DROP_SPEED_SIZE, int8_t, uint16_t, uint8_t > tcTimingDropTable
static Map3D< TRACTION_CONTROL_ETB_DROP_SLIP_SIZE, TRACTION_CONTROL_ETB_DROP_SPEED_SIZE, int8_t, uint16_t, uint8_t > tcSparkSkipTable
scaled_channel< int16_t, 100, 1 > timingALSCorrection
float nitrousIgnitionRetard
bool launchControlEnabled
uint16_t launchCorrectionsEndRpm
bool nitrousControlEnabled
bool torqueReductionEnabled
bool useSeparateAdvanceForIdle
int16_t idlePidDeactivationTpsThreshold
float tractionControlSparkSkip
int16_t rpmForIgnitionTableDot
int16_t rpmForIgnitionIdleTableDot
scaled_channel< int16_t, 50, 1 > tractionAdvanceDrop
float loadForIgnitionTableDot
bool isPreLaunchCondition
scaled_channel< int16_t, 100, 1 > ignBlendOutput[IGN_BLEND_COUNT]
scaled_channel< int16_t, 10, 1 > ignBlendParameter[IGN_BLEND_COUNT]
scaled_channel< uint8_t, 2, 1 > ignBlendBias[IGN_BLEND_COUNT]
scaled_channel< int16_t, 10, 1 > ignBlendYAxis[IGN_BLEND_COUNT]
blend_table_s ignBlends[IGN_BLEND_COUNT]
uint16_t alsIgnRetardLoadBins[ALS_SIZE]
float idleAdvance[IDLE_ADVANCE_CURVE_SIZE]
uint16_t alsIgnRetardrpmBins[ALS_SIZE]
scaled_channel< uint8_t, 1, 50 > idleAdvanceBins[IDLE_ADVANCE_CURVE_SIZE]
scaled_channel< int16_t, 10, 1 > ALSTimingRetardTable[ALS_SIZE][ALS_SIZE]
bool isFlatShiftConditionSatisfied