44 return 360 * getOneDegreeTimeMs(rpm);
59 for (
int i = 0; i < DWELL_CURVE_SIZE; i++) {
60 config->sparkDwellRpmBins[i] = (i + 1) * 50;
61 config->sparkDwellValues[i] = 4;
64 config->sparkDwellRpmBins[5] = 500;
65 config->sparkDwellValues[5] = 4;
67 config->sparkDwellRpmBins[6] = 4500;
68 config->sparkDwellValues[6] = 4;
70 config->sparkDwellRpmBins[7] = 12500;
71 config->sparkDwellValues[7] = 0;
80#if EFI_SHAFT_POSITION_INPUT
82 if (ignitionMode == IM_INDIVIDUAL_COILS) {
83 bool missingPhaseInfoForSequential =
87 ignitionMode = IM_WASTED_SPARK;
103 bool isOddFire =
false;
123#if EFI_SHAFT_POSITION_INPUT
139 auto result = firingOrderOffset + adjustment;
163 if (cfg.blendParameter == GPPWM_Zero) {
164 return { 0, 0, 0, 0 };
170 return { 0, 0, 0, 0 };
174 if (cfg.yAxisOverride != GPPWM_Zero) {
179 float tableValue = interpolate3d(
185 float blendFactor = interpolate2d(value.Value, cfg.blendBins, cfg.blendValues);
187 return { value.Value, blendFactor, 0.01f * blendFactor * tableValue, load };
const char * getIgnition_mode_e(ignition_mode_e value)
TriggerCentral triggerCentral
FuelSchedule injectionEvents
RpmCalculator rpmCalculator
virtual operation_mode_e getOperationMode() const =0
bool useOddFireWastedSpark
bool hasSynchronizedPhase() const
bool isSpinningUp() const
PrimaryTriggerDecoder triggerState
void prepareTriggerShape()
EngineRotationState * getEngineRotationState()
EngineState * getEngineState()
static EngineAccessor engine
static constexpr persistent_config_s * config
static constexpr engine_configuration_s * engineConfiguration
angle_t getPerCylinderFiringOrderOffset(uint8_t cylinderIndex, uint8_t cylinderNumber)
void setAlgorithm(engine_load_mode_e algo)
void setFlatInjectorLag(float value)
floatms_t getEngineCycleDuration(float rpm)
void setSingleCoilDwell()
void prepareOutputSignals()
void setTimingRpmBin(float from, float to)
floatms_t getCrankshaftRevolutionTimeMs(float rpm)
BlendResult calculateBlend(blend_table_s &cfg, float rpm, float load)
ignition_mode_e getCurrentIgnitionMode()
expected< float > readGppwmChannel(gppwm_channel_e channel)
void updateCylinders(void)
constexpr void setTable(TElement(&dest)[N][M], const VElement value)
void setRpmBin(kType array[], int size, float idleRpm, float topRpm)
angle_t getEngineCycle(operation_mode_e operationMode)