|
| void | initialiseCorrections (void) |
| |
| TESTABLE_INLINE_STATIC uint8_t | correctionWUE (void) |
| |
| static uint16_t | lookUpCrankingEnrichmentPct (void) |
| |
| static uint16_t | computeCrankingTaperStartPct (uint16_t crankingPercent) |
| |
| TESTABLE_INLINE_STATIC uint16_t | correctionCranking (void) |
| |
| TESTABLE_INLINE_STATIC uint8_t | correctionASE (void) |
| |
| static void | accelEnrichmentOff (void) |
| |
| static bool | isAccelEnrichmentOn (void) |
| |
| static uint8_t | applyAeRpmTaper (uint8_t accelCorrection) |
| |
| static uint16_t | applyAeCoolantTaper (uint16_t accelCorrection) |
| |
| static uint16_t | calcAccelEnrichment (const uint8_t accelCorrection) |
| |
| static uint16_t | calcDeccelEnrichment (void) |
| |
| static bool | aeTimeoutExpired (void) |
| |
| static void | updateAeTimeout (void) |
| |
| static uint16_t | correctionAccel (const aeTimeoutExpiredCallback_t onTimeoutExpired, const shouldResetCurrentAeCallback_t shouldResetCurrentAe, const shouldStartAeCallback_t shouldStartAe, const computAeCallback_t computeAe) |
| |
| static void | mapOnTimeoutExpired (void) |
| |
| static bool | mapShouldResetAe (void) |
| |
| static bool | mapShouldStartAe (void) |
| |
| static uint16_t | mapComputeAe (void) |
| |
| static int16_t | computeMapDot (void) |
| |
| static uint16_t | correctionAccelModeMap (void) |
| |
| static void | tpsOnTimeoutExpired (void) |
| |
| static bool | tpsShouldResetAe (void) |
| |
| static bool | tpsShouldStartAe (void) |
| |
| static uint16_t | tpsComputeAe (void) |
| |
| static int16_t | computeTPSDOT (void) |
| |
| static uint16_t | correctionAccelModeTps (void) |
| |
| TESTABLE_INLINE_STATIC uint16_t | correctionAccel (void) |
| |
| static bool | isFloodClearActive (const statuses ¤t, const config4 &page4) |
| |
| TESTABLE_INLINE_STATIC uint8_t | correctionFloodClear (void) |
| |
| TESTABLE_INLINE_STATIC byte | correctionBatVoltage (void) |
| |
| TESTABLE_INLINE_STATIC uint8_t | correctionIATDensity (void) |
| |
| TESTABLE_INLINE_STATIC uint8_t | correctionBaro (void) |
| |
| TESTABLE_INLINE_STATIC uint8_t | correctionLaunch (void) |
| |
| TESTABLE_INLINE_STATIC uint8_t | correctionDFCOfuel (void) |
| |
| TESTABLE_INLINE_STATIC bool | correctionDFCO (void) |
| |
| TESTABLE_INLINE_STATIC uint8_t | correctionFlex (void) |
| |
| TESTABLE_INLINE_STATIC uint8_t | correctionFuelTemp (void) |
| |
| uint8_t | calculateAfrTarget (table3d16RpmLoad &afrLookUpTable, const statuses ¤t, const config2 &page2, const config6 &page6) |
| |
| static uint8_t | computeSimpleLeanCorrection (const statuses ¤t, const config6 &page6) |
| |
| static uint8_t | computeSimpleRichCorrection (const statuses ¤t, const config6 &page6) |
| |
| static uint8_t | computeSimpleCorrection (const statuses ¤t, const config6 &page6) |
| |
| static uint8_t | computePIDCorrection (const statuses ¤t, const config6 &page6) |
| |
| static bool | nextAfrCycleHasStarted (void) |
| |
| static void | setNextAfrCycle (void) |
| |
| static bool | isAfrClosedLoopOperational (const statuses ¤t, const config6 &page6, const config9 &page9) |
| |
| static bool | isValidEgoAlgorithm (const config6 &page6) |
| |
| static bool | isAfrCorrectionEnabled (const statuses ¤t, const config6 &page6) |
| |
| static uint8_t | computeAFRCorrection (const statuses ¤t, const config6 &page6) |
| |
| TESTABLE_INLINE_STATIC uint8_t | correctionAFRClosedLoop (void) |
| |
| static uint32_t | combineCorrections (uint32_t sumCorrections, uint16_t correction) |
| |
| uint16_t | correctionsFuel (void) |
| |
| int8_t | correctionFixedTiming (int8_t advance) |
| |
| TESTABLE_INLINE_STATIC int8_t | correctionCLTadvance (int8_t advance) |
| |
| int8_t | correctionCrankingFixedTiming (int8_t advance) |
| |
| TESTABLE_INLINE_STATIC int8_t | correctionFlexTiming (int8_t advance) |
| |
| static bool | isWMIAdvanceEnabled (void) |
| |
| static bool | isWMIAdvanceOperational (void) |
| |
| TESTABLE_INLINE_STATIC int8_t | correctionWMITiming (int8_t advance) |
| |
| TESTABLE_INLINE_STATIC int8_t | correctionIATretard (int8_t advance) |
| |
| static uint8_t | computeIdleAdvanceRpmDelta (void) |
| |
| static int8_t | applyIdleAdvanceAdjust (int8_t advance, int8_t adjustment) |
| |
| static bool | isIdleAdvanceOn (void) |
| |
| static bool | isIdleAdvanceOperational (void) |
| |
| TESTABLE_INLINE_STATIC int8_t | correctionIdleAdvance (int8_t advance) |
| |
| static int8_t | calculateSoftRevLimitAdvance (int8_t advance) |
| |
| TESTABLE_INLINE_STATIC int8_t | correctionSoftRevLimit (int8_t advance) |
| |
| TESTABLE_INLINE_STATIC int8_t | correctionNitrous (int8_t advance) |
| |
| TESTABLE_INLINE_STATIC int8_t | correctionSoftLaunch (int8_t advance) |
| |
| TESTABLE_INLINE_STATIC int8_t | correctionSoftFlatShift (int8_t advance) |
| |
| static uint8_t | _calculateKnockRecovery (uint8_t curKnockRetard) |
| |
| static int8_t | correctionKnockTiming (int8_t advance) |
| |
| TESTABLE_INLINE_STATIC int8_t | correctionDFCOignition (int8_t advance) |
| |
| static uint8_t | getPulsesPerRev (void) |
| |
| TESTABLE_INLINE_STATIC uint16_t | correctDwellClosedLoop (uint16_t computedDwell, uint16_t actualDwell) |
| | Dwell error correction is a basic closed loop correction to keep the dwell time consistent even when adjusting its end time for the per tooth timing.
|
| |
| uint16_t | correctionsDwell (uint16_t dwell) |
| |
| int8_t | correctionsIgn (int8_t base_advance) |
| |
Corrections to injection pulsewidth. The corrections functions in this file affect the fuel pulsewidth (Either increasing or decreasing) based on factors other than the VE lookup.
These factors include:
- Temperature (Warmup Enrichment and After Start Enrichment)
- Acceleration/Deceleration
- Flood clear mode
- etc.
Most correction functions return value 100 (like 100% == 1) for no need for correction.
There are 2 top level functions that call more detailed corrections for Fuel and Ignition respectively:
Acceleration enrichment correction calculation.
Calculates the % change of the throttle over time (%/second) and performs a lookup based on this Coolant-based modifier is applied on the top of this. When the enrichment is turned on, it runs at that amount for a fixed period of time (taeTime)
- Returns
- uint16_t The Acceleration enrichment modifier as a %. 100% = No modification.
As the maximum enrichment amount is +255% and maximum cold adjustment for this is 255%, the overall return value from this function can be 100+(255*255/100)=750. Hence this function returns a uint16_t rather than uint8_t.
Lookup the AFR target table and perform either a simple or PID adjustment based on this.
Simple (Best suited to narrowband sensors): If the O2 sensor reports that the mixture is lean/rich compared to the desired AFR target, it will make a 1% adjustment It then waits egoDelta number of ignition events and compares O2 against the target table again. If it is still lean/rich then the adjustment is increased to 2%.
This continues until either:
- the O2 reading flips from lean to rich, at which point the adjustment cycle starts again at 1% or
- the adjustment amount increases to egoLimit at which point it stays at this level until the O2 state (rich/lean) changes
PID (Best suited to wideband sensors):