more curves! also names for curves
This commit is contained in:
parent
bcd2d866d7
commit
85984928ca
|
@ -541,14 +541,14 @@ static void setDefaultEngineConfiguration(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
|
|||
engineConfiguration->alternatorControl.minValue = 10;
|
||||
engineConfiguration->alternatorControl.maxValue = 90;
|
||||
|
||||
setLinearCurve(engineConfiguration->fsioCurve1Bins, 0, 100, 1);
|
||||
setLinearCurve(engineConfiguration->fsioCurve1, 0, 100, 1);
|
||||
setLinearCurve(engineConfiguration->scriptCurve1Bins, 0, 100, 1);
|
||||
setLinearCurve(engineConfiguration->scriptCurve1, 0, 100, 1);
|
||||
|
||||
setLinearCurve(engineConfiguration->fsioCurve2Bins, 0, 100, 1);
|
||||
setLinearCurve(engineConfiguration->fsioCurve2, 30, 170, 1);
|
||||
setLinearCurve(engineConfiguration->scriptCurve2Bins, 0, 100, 1);
|
||||
setLinearCurve(engineConfiguration->scriptCurve2, 30, 170, 1);
|
||||
|
||||
setLinearCurve(engineConfiguration->fsioCurve3Bins, 0, 100, 1);
|
||||
setLinearCurve(engineConfiguration->fsioCurve4Bins, 0, 100, 1);
|
||||
setLinearCurve(engineConfiguration->scriptCurve3Bins, 0, 100, 1);
|
||||
setLinearCurve(engineConfiguration->scriptCurve4Bins, 0, 100, 1);
|
||||
|
||||
#if EFI_ENGINE_CONTROL
|
||||
setDefaultWarmupIdleCorrection(PASS_CONFIG_PARAMETER_SIGNATURE);
|
||||
|
|
|
@ -38,5 +38,6 @@ void applyFsioConfiguration(DECLARE_ENGINE_PARAMETER_SIGNATURE);
|
|||
void onConfigurationChangeFsioCallback(engine_configuration_s *previousConfiguration DECLARE_ENGINE_PARAMETER_SUFFIX);
|
||||
void runHardcodedFsio(DECLARE_ENGINE_PARAMETER_SIGNATURE);
|
||||
|
||||
float getCurveValue(int index, float key);
|
||||
ValueProvider3D *getFSIOTable(int index);
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
* Here we have two auxilary digital on/off outputs which would open once per each 360 degrees of engine crank revolution.
|
||||
* The second valve is 180 degrees after the first one.
|
||||
*
|
||||
* Valve open and close angles are taken from fsioCurve1 and fsioCurve2 tables respectively, the position depend on TPS input.
|
||||
* Valve open and close angles are taken from scriptCurve1 and scriptCurve2 tables respectively, the position depend on TPS input.
|
||||
*
|
||||
* https://github.com/rusefi/rusefi/issues/490
|
||||
*
|
||||
|
@ -102,12 +102,12 @@ void recalculateAuxValveTiming(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
|
|||
}
|
||||
|
||||
engine->engineState.auxValveStart = interpolate2d(tps,
|
||||
engineConfiguration->fsioCurve1Bins,
|
||||
engineConfiguration->fsioCurve1);
|
||||
engineConfiguration->scriptCurve1Bins,
|
||||
engineConfiguration->scriptCurve1);
|
||||
|
||||
engine->engineState.auxValveEnd = interpolate2d(tps,
|
||||
engineConfiguration->fsioCurve2Bins,
|
||||
engineConfiguration->fsioCurve2);
|
||||
engineConfiguration->scriptCurve2Bins,
|
||||
engineConfiguration->scriptCurve2);
|
||||
|
||||
if (engine->engineState.auxValveStart >= engine->engineState.auxValveEnd) {
|
||||
// this is a fatal error to make this really visible
|
||||
|
|
|
@ -1003,12 +1003,12 @@ static void getValue(const char *paramStr) {
|
|||
}
|
||||
}
|
||||
|
||||
static void setFsioCurve1Value(float value) {
|
||||
setLinearCurve(engineConfiguration->fsioCurve1, value, value, 1);
|
||||
static void setScriptCurve1Value(float value) {
|
||||
setLinearCurve(engineConfiguration->scriptCurve1, value, value, 1);
|
||||
}
|
||||
|
||||
static void setFsioCurve2Value(float value) {
|
||||
setLinearCurve(engineConfiguration->fsioCurve2, value, value, 1);
|
||||
static void setScriptCurve2Value(float value) {
|
||||
setLinearCurve(engineConfiguration->scriptCurve2, value, value, 1);
|
||||
}
|
||||
|
||||
struct command_i_s {
|
||||
|
@ -1040,8 +1040,8 @@ const command_f_s commandsF[] = {
|
|||
{"cranking_priming_pulse", setCrankingPrimingPulse},
|
||||
{"flat_injector_lag", setFlatInjectorLag},
|
||||
#endif // EFI_ENGINE_CONTROL
|
||||
{"fsio_curve_1_value", setFsioCurve1Value},
|
||||
{"fsio_curve_2_value", setFsioCurve2Value},
|
||||
{"script_curve_1_value", setScriptCurve1Value},
|
||||
{"script_curve_2_value", setScriptCurve2Value},
|
||||
#if EFI_PROD_CODE
|
||||
#if EFI_IDLE_CONTROL
|
||||
{"idle_offset", setIdleOffset},
|
||||
|
|
|
@ -588,36 +588,36 @@ enable2ndByteCanID = false
|
|||
gauge = afr1Gauge
|
||||
#endif
|
||||
|
||||
curve = fsioCurve1, "Script Curve #1"
|
||||
curve = scriptCurve1, "Script Curve #1"
|
||||
columnLabel = "X", "Y"
|
||||
xAxis = 0, 128, 10
|
||||
yAxis = -155, 150, 10
|
||||
xBins = fsioCurve1Bins
|
||||
yBins = fsioCurve1
|
||||
xBins = scriptCurve1Bins
|
||||
yBins = scriptCurve1
|
||||
showTextValues = true
|
||||
|
||||
curve = fsioCurve2, "Script Curve #2"
|
||||
curve = scriptCurve2, "Script Curve #2"
|
||||
columnLabel = "X", "Y"
|
||||
xAxis = 0, 128, 10
|
||||
yAxis = -150, 150, 10
|
||||
xBins = fsioCurve2Bins
|
||||
yBins = fsioCurve2
|
||||
xBins = scriptCurve2Bins
|
||||
yBins = scriptCurve2
|
||||
showTextValues = true
|
||||
|
||||
curve = fsioCurve3, "Script Curve #3"
|
||||
curve = scriptCurve3, "Script Curve #3"
|
||||
columnLabel = "X", "Y"
|
||||
xAxis = 0, 128, 10
|
||||
yAxis = -5, 5, 10
|
||||
xBins = fsioCurve3Bins
|
||||
yBins = fsioCurve3
|
||||
xBins = scriptCurve3Bins
|
||||
yBins = scriptCurve3
|
||||
showTextValues = true
|
||||
|
||||
curve = fsioCurve4, "Script Curve #4"
|
||||
curve = scriptCurve4, "Script Curve #4"
|
||||
columnLabel = "X", "Y"
|
||||
xAxis = 0, 128, 10
|
||||
yAxis = -5, 5, 10
|
||||
xBins = fsioCurve4Bins
|
||||
yBins = fsioCurve4
|
||||
xBins = scriptCurve4Bins
|
||||
yBins = scriptCurve4
|
||||
showTextValues = true
|
||||
|
||||
curve = scriptCurve5, "Script Curve #5"
|
||||
|
@ -1874,19 +1874,19 @@ cmd_set_engine_type_default = "@@TS_IO_TEST_COMMAND_char@@\x00\x31\x00\x00"
|
|||
[UserDefined]
|
||||
dialog = scriptCurve1Settings, "", yAxis
|
||||
field = "Name", scriptCurveName4
|
||||
panel = fsioCurve1
|
||||
panel = scriptCurve1
|
||||
|
||||
dialog = scriptCurve2Settings, "", yAxis
|
||||
field = "Name", scriptCurveName4
|
||||
panel = fsioCurve2
|
||||
panel = scriptCurve2
|
||||
|
||||
dialog = scriptCurve3Settings, "", yAxis
|
||||
field = "Name", scriptCurveName4
|
||||
panel = fsioCurve3
|
||||
panel = scriptCurve3
|
||||
|
||||
dialog = scriptCurve4Settings, "", yAxis
|
||||
field = "Name", scriptCurveName4
|
||||
panel = fsioCurve4
|
||||
panel = scriptCurve4
|
||||
|
||||
dialog = scriptCurve5Settings, "", yAxis
|
||||
field = "Name", scriptCurveName5
|
||||
|
|
Loading…
Reference in New Issue