more curves! also names for curves
This commit is contained in:
parent
221b3c52bc
commit
31a2218339
|
@ -549,6 +549,8 @@ static void setDefaultEngineConfiguration(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
|
||||||
|
|
||||||
setLinearCurve(engineConfiguration->scriptCurve3Bins, 0, 100, 1);
|
setLinearCurve(engineConfiguration->scriptCurve3Bins, 0, 100, 1);
|
||||||
setLinearCurve(engineConfiguration->scriptCurve4Bins, 0, 100, 1);
|
setLinearCurve(engineConfiguration->scriptCurve4Bins, 0, 100, 1);
|
||||||
|
setLinearCurve(engineConfiguration->scriptCurve5Bins, 0, 100, 1);
|
||||||
|
setLinearCurve(engineConfiguration->scriptCurve6Bins, 0, 100, 1);
|
||||||
|
|
||||||
#if EFI_ENGINE_CONTROL
|
#if EFI_ENGINE_CONTROL
|
||||||
setDefaultWarmupIdleCorrection(PASS_CONFIG_PARAMETER_SIGNATURE);
|
setDefaultWarmupIdleCorrection(PASS_CONFIG_PARAMETER_SIGNATURE);
|
||||||
|
|
|
@ -604,13 +604,21 @@ ValueProvider3D *getFSIOTable(int index) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
float getCurveValue(int index, float key) {
|
float getCurveValue(int index, float key DECLARE_ENGINE_PARAMETER_SUFFIX) {
|
||||||
// not great code at all :(
|
// not great code at all :(
|
||||||
switch (index) {
|
switch (index) {
|
||||||
default:
|
default:
|
||||||
return interpolate2d(key, engineConfiguration->scriptCurve1Bins, engineConfiguration->scriptCurve1);
|
return interpolate2d(key, engineConfiguration->scriptCurve1Bins, engineConfiguration->scriptCurve1);
|
||||||
case 5:
|
case 1:
|
||||||
|
return interpolate2d(key, engineConfiguration->scriptCurve2Bins, engineConfiguration->scriptCurve2);
|
||||||
|
case 2:
|
||||||
|
return interpolate2d(key, engineConfiguration->scriptCurve3Bins, engineConfiguration->scriptCurve3);
|
||||||
|
case 3:
|
||||||
|
return interpolate2d(key, engineConfiguration->scriptCurve4Bins, engineConfiguration->scriptCurve4);
|
||||||
|
case 4:
|
||||||
return interpolate2d(key, engineConfiguration->scriptCurve5Bins, engineConfiguration->scriptCurve5);
|
return interpolate2d(key, engineConfiguration->scriptCurve5Bins, engineConfiguration->scriptCurve5);
|
||||||
|
case 5:
|
||||||
|
return interpolate2d(key, engineConfiguration->scriptCurve6Bins, engineConfiguration->scriptCurve6);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -38,6 +38,6 @@ void applyFsioConfiguration(DECLARE_ENGINE_PARAMETER_SIGNATURE);
|
||||||
void onConfigurationChangeFsioCallback(engine_configuration_s *previousConfiguration DECLARE_ENGINE_PARAMETER_SUFFIX);
|
void onConfigurationChangeFsioCallback(engine_configuration_s *previousConfiguration DECLARE_ENGINE_PARAMETER_SUFFIX);
|
||||||
void runHardcodedFsio(DECLARE_ENGINE_PARAMETER_SIGNATURE);
|
void runHardcodedFsio(DECLARE_ENGINE_PARAMETER_SIGNATURE);
|
||||||
|
|
||||||
float getCurveValue(int index, float key);
|
float getCurveValue(int index, float key DECLARE_ENGINE_PARAMETER_SUFFIX);
|
||||||
ValueProvider3D *getFSIOTable(int index);
|
ValueProvider3D *getFSIOTable(int index);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue