#include <ignition_state.h>
|
| float | baseDwell = (float)0 |
| |
| floatms_t | sparkDwell = (floatms_t)0 |
| |
| angle_t | dwellDurationAngle = (angle_t)0 |
| |
| scaled_channel< int16_t, 100, 1 > | cltTimingCorrection = (int16_t)0 |
| |
| scaled_channel< int16_t, 100, 1 > | timingIatCorrection = (int16_t)0 |
| |
| scaled_channel< int16_t, 100, 1 > | timingPidCorrection = (int16_t)0 |
| |
| scaled_channel< int16_t, 100, 1 > | dfcoTimingRetard = (int16_t)0 |
| |
| scaled_channel< int16_t, 50, 1 > | baseIgnitionAdvance = (int16_t)0 |
| |
| scaled_channel< int16_t, 50, 1 > | correctedIgnitionAdvance = (int16_t)0 |
| |
| scaled_channel< int16_t, 50, 1 > | tractionAdvanceDrop = (int16_t)0 |
| |
| uint8_t | alignmentFill_at_26 [2] = {} |
| |
| float | dwellVoltageCorrection = (float)0 |
| |
| float | luaTimingAdd = (float)0 |
| |
| float | luaTimingMult = (float)0 |
| |
| bool | luaIgnitionSkip: 1 {} |
| |
| bool | unusedBit_15_1: 1 {} |
| |
| bool | unusedBit_15_2: 1 {} |
| |
| bool | unusedBit_15_3: 1 {} |
| |
| bool | unusedBit_15_4: 1 {} |
| |
| bool | unusedBit_15_5: 1 {} |
| |
| bool | unusedBit_15_6: 1 {} |
| |
| bool | unusedBit_15_7: 1 {} |
| |
| bool | unusedBit_15_8: 1 {} |
| |
| bool | unusedBit_15_9: 1 {} |
| |
| bool | unusedBit_15_10: 1 {} |
| |
| bool | unusedBit_15_11: 1 {} |
| |
| bool | unusedBit_15_12: 1 {} |
| |
| bool | unusedBit_15_13: 1 {} |
| |
| bool | unusedBit_15_14: 1 {} |
| |
| bool | unusedBit_15_15: 1 {} |
| |
| bool | unusedBit_15_16: 1 {} |
| |
| bool | unusedBit_15_17: 1 {} |
| |
| bool | unusedBit_15_18: 1 {} |
| |
| bool | unusedBit_15_19: 1 {} |
| |
| bool | unusedBit_15_20: 1 {} |
| |
| bool | unusedBit_15_21: 1 {} |
| |
| bool | unusedBit_15_22: 1 {} |
| |
| bool | unusedBit_15_23: 1 {} |
| |
| bool | unusedBit_15_24: 1 {} |
| |
| bool | unusedBit_15_25: 1 {} |
| |
| bool | unusedBit_15_26: 1 {} |
| |
| bool | unusedBit_15_27: 1 {} |
| |
| bool | unusedBit_15_28: 1 {} |
| |
| bool | unusedBit_15_29: 1 {} |
| |
| bool | unusedBit_15_30: 1 {} |
| |
| bool | unusedBit_15_31: 1 {} |
| |
| scaled_channel< int16_t, 100, 1 > | trailingSparkAngle = (int16_t)0 |
| |
| int16_t | rpmForIgnitionTableDot = (int16_t)0 |
| |
| int16_t | rpmForIgnitionIdleTableDot = (int16_t)0 |
| |
| uint8_t | alignmentFill_at_50 [2] = {} |
| |
| float | loadForIgnitionTableDot = (float)0 |
| |
Definition at line 5 of file ignition_state.h.
◆ getAdvance()
Definition at line 217 of file ignition_state.cpp.
217 {
218 if (std::isnan(engineLoad)) {
219 return 0;
220 }
222
224 }
225
227
229 if (isCranking) {
233 } else {
235
236 if (std::isnan(angle)) {
238 return 0;
239 }
240 }
241
242
243 bool allowCorrections = !isCranking ||
engineConfiguration->useAdvanceCorrectionsForCranking;
244
245 if (allowCorrections) {
247 if (!std::isnan(correction)) {
248 angle += correction;
249 }
250 }
251
253 return angle;
254}
angle_t getAdvanceCorrections(float engineLoad)
angle_t getCrankingAdvance(float rpm, float engineLoad)
angle_t getRunningAdvance(float rpm, float engineLoad)
RpmCalculator rpmCalculator
bool isCranking() const override
static EngineAccessor engine
static constexpr engine_configuration_s * engineConfiguration
bool warning(ObdCode code, const char *fmt,...)
Referenced by getWrappedAdvance().
◆ getDwell()
◆ getInterpolatedIgnitionAngle()
| angle_t IgnitionState::getInterpolatedIgnitionAngle |
( |
float |
rpm, |
|
|
float |
ignitionLoad |
|
) |
| |
|
static |
Definition at line 374 of file ignition_state.cpp.
374 {
375 return interpolate3d(
378 config->ignitionRpmBins, rpm
379 );
380}
static constexpr persistent_config_s * config
ignitionLoad("Ignition: load", SensorCategory.SENSOR_INPUTS, FieldType.INT, 1420, 1.0, -1.0, -1.0, "")
Referenced by getRunningAdvance().
◆ getInterpolatedIgnitionTrim()
◆ getSparkDwell()
- Returns
- Spark dwell time, in milliseconds. 0 if tables are not ready.
Definition at line 313 of file ignition_state.cpp.
313 {
314 float dwellMs;
315 if (isCranking) {
317 } else {
319
323 config->dwellVoltageCorrVoltBins,
324 config->dwellVoltageCorrValues
325 );
326
327
330 }
331
333 }
334
335 if (std::isnan(dwellMs) || dwellMs <= 0) {
336
338 return 0;
339 }
340 return dwellMs;
341}
static float getOrZero(SensorType type)
@ CUSTOM_ERR_DWELL_DURATION
float dwellVoltageCorrection
Referenced by updateDwell().
◆ getSparkHardwareLatencyCorrection()
| angle_t IgnitionState::getSparkHardwareLatencyCorrection |
( |
| ) |
|
◆ getTrailingSparkAngle()
| angle_t IgnitionState::getTrailingSparkAngle |
( |
const float |
rpm, |
|
|
const float |
engineLoad |
|
) |
| |
◆ getWrappedAdvance()
◆ updateAdvanceCorrections()
| void IgnitionState::updateAdvanceCorrections |
( |
float |
engineLoad | ) |
|
◆ updateDwell()
| void IgnitionState::updateDwell |
( |
float |
rpm, |
|
|
bool |
isCranking |
|
) |
| |
The documentation for this class was generated from the following files: