18 float afr = stoich * lambda;
34 criticalError(
"Please set stoichRatioPrimary");
47 criticalError(
"Please set stoichRatioSecondary");
61 float target = interpolate3d(
76 target += result.Value;
87 switch(overrideMode) {
88 case AFR_None:
return defaultLoad;
TunerStudioOutputChannels outputChannels
virtual float getTargetLambda(float rpm, float load) const =0
mass_t getCycleFuel(mass_t airmass, float rpm, float load) override
virtual float getStoichiometricRatio() const =0
virtual float getTargetLambdaLoadAxis(float defaultLoad) const =0
float getTargetLambdaLoadAxis(float defaultLoad) const override
float getTargetLambda(float rpm, float load) const override
float getStoichiometricRatio() const override
virtual bool hasSensor() const
virtual SensorResult get() const =0
float interpolateClamped(float x1, float y1, float x2, float y2, float x)
static EngineAccessor engine
Main engine configuration data structure.
static constexpr persistent_config_s * config
static constexpr engine_configuration_s * engineConfiguration
BlendResult calculateBlend(blend_table_s &cfg, float rpm, float load)
Base class for sensors. Inherit this class to implement a new type of sensor.
float getLoadOverride(float defaultLoad, load_override_e overrideMode) const
load_override_e afrOverrideMode
scaled_channel< uint8_t, 10, 1 > stoichRatioSecondary
scaled_channel< uint8_t, 10, 1 > stoichRatioPrimary
scaled_channel< uint16_t, 1000, 1 > targetAFR
float normalizedCylinderFilling
scaled_channel< uint16_t, 1000, 1 > stoichiometricRatio
scaled_channel< uint16_t, 10000, 1 > targetLambda
scaled_channel< uint16_t, 100, 1 > afrTableYAxis
scaled_channel< uint8_t, 2, 1 > targetAfrBlendBias[TARGET_AFR_BLEND_COUNT]
scaled_channel< int16_t, 10, 1 > targetAfrBlendYAxis[TARGET_AFR_BLEND_COUNT]
scaled_channel< int16_t, 10, 1 > targetAfrBlendParameter[TARGET_AFR_BLEND_COUNT]
scaled_channel< int16_t, 10, 1 > targetAfrBlendOutput[TARGET_AFR_BLEND_COUNT]
uint16_t lambdaRpmBins[FUEL_RPM_COUNT]
blend_table_s targetAfrBlends[TARGET_AFR_BLEND_COUNT]
scaled_channel< uint8_t, 147, 1 > lambdaTable[FUEL_LOAD_COUNT][FUEL_RPM_COUNT]
uint16_t lambdaLoadBins[FUEL_LOAD_COUNT]