Speeduino
Loading...
Searching...
No Matches
Typedefs | Functions | Variables
corrections.cpp File Reference
#include "globals.h"
#include "corrections.h"
#include "timers.h"
#include "maths.h"
#include "sensors.h"
#include "unit_testing.h"
#include "preprocessor.h"
#include "src/PID_v1/PID_v1.h"
#include "units.h"
#include "fuel_calcs.h"

Typedefs

using aeTimeoutExpiredCallback_t = void(*)(void)
 
using shouldResetCurrentAeCallback_t = bool(*)(void)
 
using shouldStartAeCallback_t = bool(*)(void)
 
using computAeCallback_t = uint16_t(*)(void)
 

Functions

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 &current, 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 &current, const config2 &page2, const config6 &page6)
 
static uint8_t computeSimpleLeanCorrection (const statuses &current, const config6 &page6)
 
static uint8_t computeSimpleRichCorrection (const statuses &current, const config6 &page6)
 
static uint8_t computeSimpleCorrection (const statuses &current, const config6 &page6)
 
static uint8_t computePIDCorrection (const statuses &current, const config6 &page6)
 
static bool nextAfrCycleHasStarted (void)
 
static void setNextAfrCycle (void)
 
static bool isAfrClosedLoopOperational (const statuses &current, const config6 &page6, const config9 &page9)
 
static bool isValidEgoAlgorithm (const config6 &page6)
 
static bool isAfrCorrectionEnabled (const statuses &current, const config6 &page6)
 
static uint8_t computeAFRCorrection (const statuses &current, 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)
 

Variables

static long PID_O2
 
static long PID_output
 
static long PID_AFRTarget
 
static uint16_t aeActivatedReading
 
TESTABLE_STATIC uint16_t AFRnextCycle
 
static unsigned long knockStartTime
 
static uint8_t knockLastRecoveryStep
 
static uint8_t dfcoTaper
 
TESTABLE_STATIC table2D_u8_u8_4 taeTableconfigPage4
 
TESTABLE_STATIC table2D_u8_u8_4 ASETableconfigPage2
 
TESTABLE_STATIC table2D_u8_u8_4 crankingEnrichTableconfigPage10
 
TESTABLE_STATIC table2D_u8_u8_6 dwellVCorrectionTableconfigPage6
 
static constexpr uint8_t NO_FUEL_CORRECTION = ONE_HUNDRED_PCT
 
static constexpr uint8_t BASELINE_FUEL_CORRECTION = ONE_HUNDRED_PCT
 
static constexpr uint16_t IGN_IDLE_THRESHOLD = 200U
 

Detailed Description

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:

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:

Typedef Documentation

◆ aeTimeoutExpiredCallback_t

◆ computAeCallback_t

◆ shouldResetCurrentAeCallback_t

◆ shouldStartAeCallback_t

Function Documentation

◆ _calculateKnockRecovery()

static uint8_t _calculateKnockRecovery ( uint8_t  curKnockRetard)
inlinestatic
Here is the call graph for this function:
Here is the caller graph for this function:

◆ accelEnrichmentOff()

static void accelEnrichmentOff ( void  )
inlinestatic
Here is the caller graph for this function:

◆ aeTimeoutExpired()

static bool aeTimeoutExpired ( void  )
inlinestatic
Here is the call graph for this function:
Here is the caller graph for this function:

◆ applyAeCoolantTaper()

static uint16_t applyAeCoolantTaper ( uint16_t  accelCorrection)
inlinestatic
Here is the call graph for this function:
Here is the caller graph for this function:

◆ applyAeRpmTaper()

static uint8_t applyAeRpmTaper ( uint8_t  accelCorrection)
inlinestatic
Here is the call graph for this function:
Here is the caller graph for this function:

◆ applyIdleAdvanceAdjust()

static int8_t applyIdleAdvanceAdjust ( int8_t  advance,
int8_t  adjustment 
)
inlinestatic
Here is the call graph for this function:
Here is the caller graph for this function:

◆ calcAccelEnrichment()

static uint16_t calcAccelEnrichment ( const uint8_t  accelCorrection)
inlinestatic
Here is the call graph for this function:
Here is the caller graph for this function:

◆ calcDeccelEnrichment()

static uint16_t calcDeccelEnrichment ( void  )
inlinestatic
Here is the caller graph for this function:

◆ calculateAfrTarget()

uint8_t calculateAfrTarget ( table3d16RpmLoad afrLookUpTable,
const statuses current,
const config2 page2,
const config6 page6 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ calculateSoftRevLimitAdvance()

static int8_t calculateSoftRevLimitAdvance ( int8_t  advance)
inlinestatic

Ignition soft revlimit correction.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ combineCorrections()

static uint32_t combineCorrections ( uint32_t  sumCorrections,
uint16_t  correction 
)
inlinestatic
Here is the call graph for this function:
Here is the caller graph for this function:

◆ computeAFRCorrection()

static uint8_t computeAFRCorrection ( const statuses current,
const config6 page6 
)
inlinestatic
Here is the call graph for this function:
Here is the caller graph for this function:

◆ computeCrankingTaperStartPct()

static uint16_t computeCrankingTaperStartPct ( uint16_t  crankingPercent)
inlinestatic
Here is the call graph for this function:
Here is the caller graph for this function:

◆ computeIdleAdvanceRpmDelta()

static uint8_t computeIdleAdvanceRpmDelta ( void  )
inlinestatic
Here is the call graph for this function:
Here is the caller graph for this function:

◆ computeMapDot()

static int16_t computeMapDot ( void  )
inlinestatic
Here is the call graph for this function:
Here is the caller graph for this function:

◆ computePIDCorrection()

static uint8_t computePIDCorrection ( const statuses current,
const config6 page6 
)
inlinestatic
Here is the call graph for this function:
Here is the caller graph for this function:

◆ computeSimpleCorrection()

static uint8_t computeSimpleCorrection ( const statuses current,
const config6 page6 
)
inlinestatic
Here is the call graph for this function:
Here is the caller graph for this function:

◆ computeSimpleLeanCorrection()

static uint8_t computeSimpleLeanCorrection ( const statuses current,
const config6 page6 
)
inlinestatic
Here is the call graph for this function:
Here is the caller graph for this function:

◆ computeSimpleRichCorrection()

static uint8_t computeSimpleRichCorrection ( const statuses current,
const config6 page6 
)
inlinestatic
Here is the call graph for this function:
Here is the caller graph for this function:

◆ computeTPSDOT()

static int16_t computeTPSDOT ( void  )
inlinestatic
Here is the call graph for this function:
Here is the caller graph for this function:

◆ correctDwellClosedLoop()

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.

This is mostly of benefit to low resolution triggers at low rpm (<1500)

Parameters
computedDwellA computed dwell time in microseconds
actualDwellThe most recently measured actual dwell time in microseconds
Returns
computedDwell, with correction applied if needed
Here is the call graph for this function:
Here is the caller graph for this function:

◆ correctionAccel() [1/2]

static uint16_t correctionAccel ( const aeTimeoutExpiredCallback_t  onTimeoutExpired,
const shouldResetCurrentAeCallback_t  shouldResetCurrentAe,
const shouldStartAeCallback_t  shouldStartAe,
const computAeCallback_t  computeAe 
)
inlinestatic
Here is the call graph for this function:

◆ correctionAccel() [2/2]

TESTABLE_INLINE_STATIC uint16_t correctionAccel ( void  )

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.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ correctionAccelModeMap()

static uint16_t correctionAccelModeMap ( void  )
inlinestatic
Here is the call graph for this function:
Here is the caller graph for this function:

◆ correctionAccelModeTps()

static uint16_t correctionAccelModeTps ( void  )
inlinestatic
Here is the call graph for this function:
Here is the caller graph for this function:

◆ correctionAFRClosedLoop()

TESTABLE_INLINE_STATIC uint8_t correctionAFRClosedLoop ( void  )

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):

Here is the call graph for this function:
Here is the caller graph for this function:

◆ correctionASE()

TESTABLE_INLINE_STATIC uint8_t correctionASE ( void  )

After Start Enrichment calculation. This is a short period (Usually <20 seconds) immediately after the engine first fires (But not when cranking) where an additional amount of fuel is added (Over and above the WUE amount).

Returns
uint8_t The After Start Enrichment modifier as a %. 100% = No modification.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ correctionBaro()

TESTABLE_INLINE_STATIC uint8_t correctionBaro ( void  )

Correction for current barometric / ambient pressure.

Returns
A percentage value indicating the amount the fuelling should be changed based on the barometric reading. 100 = No change. 110 = 10% increase. 90 = 10% decrease
Here is the call graph for this function:
Here is the caller graph for this function:

◆ correctionBatVoltage()

TESTABLE_INLINE_STATIC byte correctionBatVoltage ( void  )

Battery Voltage correction. Uses a 2D enrichment table (WUETable) where the X axis is engine temp and the Y axis is the amount of extra fuel to add.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ correctionCLTadvance()

TESTABLE_INLINE_STATIC int8_t correctionCLTadvance ( int8_t  advance)

Ignition correction for coolant temperature (CLT).

Here is the call graph for this function:
Here is the caller graph for this function:

◆ correctionCranking()

TESTABLE_INLINE_STATIC uint16_t correctionCranking ( void  )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ correctionCrankingFixedTiming()

int8_t correctionCrankingFixedTiming ( int8_t  advance)

Correct ignition timing to configured fixed value to use during craning. Must be called near end to override all other corrections.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ correctionDFCO()

TESTABLE_INLINE_STATIC bool correctionDFCO ( void  )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ correctionDFCOfuel()

TESTABLE_INLINE_STATIC uint8_t correctionDFCOfuel ( void  )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ correctionDFCOignition()

TESTABLE_INLINE_STATIC int8_t correctionDFCOignition ( int8_t  advance)

Ignition DFCO taper correction.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ correctionFixedTiming()

int8_t correctionFixedTiming ( int8_t  advance)

Correct ignition timing to configured fixed value. Must be called near end to override all other corrections.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ correctionFlex()

TESTABLE_INLINE_STATIC uint8_t correctionFlex ( void  )

Flex fuel adjustment to vary fuel based on ethanol content. The amount of extra fuel required is a linear relationship based on the % of ethanol.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ correctionFlexTiming()

TESTABLE_INLINE_STATIC int8_t correctionFlexTiming ( int8_t  advance)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ correctionFloodClear()

TESTABLE_INLINE_STATIC uint8_t correctionFloodClear ( void  )

Simple check to see whether we are cranking with the TPS above the flood clear threshold.

Returns
100 (not cranking and thus no need for flood-clear) or 0 (Engine cranking and TPS above config4::floodClear limit).
Here is the call graph for this function:
Here is the caller graph for this function:

◆ correctionFuelTemp()

TESTABLE_INLINE_STATIC uint8_t correctionFuelTemp ( void  )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ correctionIATDensity()

TESTABLE_INLINE_STATIC uint8_t correctionIATDensity ( void  )

Simple temperature based corrections lookup based on the inlet air temperature (IAT). This corrects for changes in air density from movement of the temperature.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ correctionIATretard()

TESTABLE_INLINE_STATIC int8_t correctionIATretard ( int8_t  advance)

Ignition correction for inlet air temperature (IAT).

Here is the call graph for this function:
Here is the caller graph for this function:

◆ correctionIdleAdvance()

TESTABLE_INLINE_STATIC int8_t correctionIdleAdvance ( int8_t  advance)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ correctionKnockTiming()

static int8_t correctionKnockTiming ( int8_t  advance)
inlinestatic

Ignition knock (retard) correction.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ correctionLaunch()

TESTABLE_INLINE_STATIC uint8_t correctionLaunch ( void  )

Launch control has a setting to increase the fuel load to assist in bringing up boost. This simple check applies the extra fuel if we're currently launching

Here is the call graph for this function:
Here is the caller graph for this function:

◆ correctionNitrous()

TESTABLE_INLINE_STATIC int8_t correctionNitrous ( int8_t  advance)

Ignition Nitrous oxide correction.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ correctionsDwell()

uint16_t correctionsDwell ( uint16_t  dwell)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ correctionsFuel()

uint16_t correctionsFuel ( void  )

Dispatch calculations for all fuel related corrections. Calls all the other corrections functions and combines their results. This is the only function that should be called from anywhere outside the file

Here is the call graph for this function:
Here is the caller graph for this function:

◆ correctionsIgn()

int8_t correctionsIgn ( int8_t  base_advance)

Dispatch calculations for all ignition related corrections.

Parameters
base_advance- Base ignition advance (deg. ?)
Returns
Advance considering all (~12) individual corrections
Here is the call graph for this function:
Here is the caller graph for this function:

◆ correctionSoftFlatShift()

TESTABLE_INLINE_STATIC int8_t correctionSoftFlatShift ( int8_t  advance)

Ignition correction for soft flat shift.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ correctionSoftLaunch()

TESTABLE_INLINE_STATIC int8_t correctionSoftLaunch ( int8_t  advance)

Ignition soft launch correction.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ correctionSoftRevLimit()

TESTABLE_INLINE_STATIC int8_t correctionSoftRevLimit ( int8_t  advance)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ correctionWMITiming()

TESTABLE_INLINE_STATIC int8_t correctionWMITiming ( int8_t  advance)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ correctionWUE()

TESTABLE_INLINE_STATIC uint8_t correctionWUE ( void  )

Warm Up Enrichment (WUE) corrections. Uses a 2D enrichment table (WUETable) where the X axis is engine temp and the Y axis is the amount of extra fuel to add

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getPulsesPerRev()

static uint8_t getPulsesPerRev ( void  )
inlinestatic

Ignition Dwell Correction.

Here is the caller graph for this function:

◆ initialiseCorrections()

void initialiseCorrections ( void  )

Initialise instances and vars related to corrections (at ECU boot-up).

Here is the call graph for this function:
Here is the caller graph for this function:

◆ isAccelEnrichmentOn()

static bool isAccelEnrichmentOn ( void  )
inlinestatic
Here is the caller graph for this function:

◆ isAfrClosedLoopOperational()

static bool isAfrClosedLoopOperational ( const statuses current,
const config6 page6,
const config9 page9 
)
inlinestatic
Here is the call graph for this function:
Here is the caller graph for this function:

◆ isAfrCorrectionEnabled()

static bool isAfrCorrectionEnabled ( const statuses current,
const config6 page6 
)
inlinestatic
Here is the call graph for this function:
Here is the caller graph for this function:

◆ isFloodClearActive()

static bool isFloodClearActive ( const statuses current,
const config4 page4 
)
inlinestatic
Here is the call graph for this function:
Here is the caller graph for this function:

◆ isIdleAdvanceOn()

static bool isIdleAdvanceOn ( void  )
inlinestatic
Here is the caller graph for this function:

◆ isIdleAdvanceOperational()

static bool isIdleAdvanceOperational ( void  )
inlinestatic
Here is the caller graph for this function:

◆ isValidEgoAlgorithm()

static bool isValidEgoAlgorithm ( const config6 page6)
inlinestatic
Here is the call graph for this function:
Here is the caller graph for this function:

◆ isWMIAdvanceEnabled()

static bool isWMIAdvanceEnabled ( void  )
inlinestatic
Here is the caller graph for this function:

◆ isWMIAdvanceOperational()

static bool isWMIAdvanceOperational ( void  )
inlinestatic
Here is the call graph for this function:
Here is the caller graph for this function:

◆ lookUpCrankingEnrichmentPct()

static uint16_t lookUpCrankingEnrichmentPct ( void  )
inlinestatic

Cranking Enrichment corrections. Additional fuel % to be added when the engine is cranking

Here is the call graph for this function:
Here is the caller graph for this function:

◆ mapComputeAe()

static uint16_t mapComputeAe ( void  )
inlinestatic
Here is the call graph for this function:
Here is the caller graph for this function:

◆ mapOnTimeoutExpired()

static void mapOnTimeoutExpired ( void  )
inlinestatic
Here is the caller graph for this function:

◆ mapShouldResetAe()

static bool mapShouldResetAe ( void  )
inlinestatic
Here is the call graph for this function:
Here is the caller graph for this function:

◆ mapShouldStartAe()

static bool mapShouldStartAe ( void  )
inlinestatic
Here is the call graph for this function:
Here is the caller graph for this function:

◆ nextAfrCycleHasStarted()

static bool nextAfrCycleHasStarted ( void  )
inlinestatic
Here is the call graph for this function:
Here is the caller graph for this function:

◆ setNextAfrCycle()

static void setNextAfrCycle ( void  )
inlinestatic
Here is the caller graph for this function:

◆ tpsComputeAe()

static uint16_t tpsComputeAe ( void  )
inlinestatic
Here is the call graph for this function:
Here is the caller graph for this function:

◆ tpsOnTimeoutExpired()

static void tpsOnTimeoutExpired ( void  )
inlinestatic
Here is the caller graph for this function:

◆ tpsShouldResetAe()

static bool tpsShouldResetAe ( void  )
inlinestatic
Here is the call graph for this function:
Here is the caller graph for this function:

◆ tpsShouldStartAe()

static bool tpsShouldStartAe ( void  )
inlinestatic
Here is the call graph for this function:
Here is the caller graph for this function:

◆ updateAeTimeout()

static void updateAeTimeout ( void  )
inlinestatic
Here is the call graph for this function:
Here is the caller graph for this function:

Variable Documentation

◆ aeActivatedReading

uint16_t aeActivatedReading
static

◆ AFRnextCycle

TESTABLE_STATIC uint16_t AFRnextCycle

◆ BASELINE_FUEL_CORRECTION

constexpr uint8_t BASELINE_FUEL_CORRECTION = ONE_HUNDRED_PCT
staticconstexpr

◆ configPage10

◆ configPage2

◆ configPage4

◆ configPage6

◆ dfcoTaper

uint8_t dfcoTaper
static

◆ IGN_IDLE_THRESHOLD

constexpr uint16_t IGN_IDLE_THRESHOLD = 200U
staticconstexpr

Ignition Idle advance correction.

◆ knockLastRecoveryStep

uint8_t knockLastRecoveryStep
static

◆ knockStartTime

unsigned long knockStartTime
static

◆ NO_FUEL_CORRECTION

constexpr uint8_t NO_FUEL_CORRECTION = ONE_HUNDRED_PCT
staticconstexpr

◆ PID_AFRTarget

long PID_AFRTarget
static

◆ PID_O2

static PID egoPID & PID_O2
static

Instance of the PID object in case that algorithm is used (Always instantiated). Needs to be global as it maintains state outside of each function call. Comes from Arduino (?) PID library.

◆ PID_output

long PID_output
static