nicer defaults API

This commit is contained in:
rusefi 2022-11-04 13:27:40 -04:00
parent b2a5492d16
commit bf3357cc61
4 changed files with 11 additions and 7 deletions

View File

@ -164,9 +164,7 @@ void setBoardDefaultConfiguration() {
engineConfiguration->startUpFuelPumpDuration = 4;
engineConfiguration->postCrankingFactor = 1.05;
engineConfiguration->etb.pFactor = 6.1350;
engineConfiguration->etb.iFactor = 87.7182;
engineConfiguration->etb.dFactor = 0.0702;
setEtbPID(6.1350, 87.7182, 0.0702);
// this calibration reminds me of VAG just flipped?
engineConfiguration->tpsMin = 100;

View File

@ -194,9 +194,7 @@ void setBoardDefaultConfiguration() {
engineConfiguration->useOnlyRisingEdgeForTrigger = true;
setAlgorithm(LM_SPEED_DENSITY);
engineConfiguration->etb.pFactor = 8.8944;
engineConfiguration->etb.iFactor = 70.2307;
engineConfiguration->etb.dFactor = 0.1855;
setEtbPID(8.8944, 70.2307, 0.1855);
engineConfiguration->injectorCompensationMode = ICM_FixedRailPressure;

View File

@ -121,3 +121,9 @@ void setPPSCalibration(float primaryUp, float primaryDown, float secondaryUp, fl
engineConfiguration->throttlePedalSecondaryUpVoltage = secondaryUp;
engineConfiguration->throttlePedalSecondaryWOTVoltage = secondaryDown;
}
void setEtbPID(float p, float i, float d) {
engineConfiguration->etb.pFactor = p;
engineConfiguration->etb.iFactor = i;
engineConfiguration->etb.dFactor = d;
}

View File

@ -12,4 +12,6 @@ void setPPSInputs(adc_channel_e pps1, adc_channel_e pps2);
void setPPSCalibration(float primaryUp, float primaryDown, float secondaryUp, float secondaryDown);
void setTPS1Inputs(adc_channel_e tps1, adc_channel_e tps2);
void setTPS1Calibration(uint16_t tpsMin, uint16_t tpsMax, uint16_t tps1SecondaryMin, uint16_t tps1SecondaryMax);
void setTPS1Calibration(uint16_t tpsMin, uint16_t tpsMax, uint16_t tps1SecondaryMin, uint16_t tps1SecondaryMax);
void setEtbPID(float p, float i, float d);