smarter template
This commit is contained in:
parent
7b3423a7b5
commit
40738fad12
|
@ -78,10 +78,10 @@ static void setDefaultWarmupFuelEnrichment() {
|
|||
}
|
||||
|
||||
static void setDefaultVETable() {
|
||||
setRpmTableBin(config->veRpmBins, FUEL_RPM_COUNT);
|
||||
setRpmTableBin(config->veRpmBins);
|
||||
setTable(config->veTable, 80);
|
||||
|
||||
setRpmTableBin(config->baroCorrRpmBins, BARO_CORR_SIZE);
|
||||
setRpmTableBin(config->baroCorrRpmBins);
|
||||
setLinearCurve(config->baroCorrPressureBins, 75, 105, 1);
|
||||
|
||||
// Default baro table is all 1.0, we can't recommend a reasonable default here
|
||||
|
@ -159,7 +159,7 @@ static void setDefaultLambdaTable() {
|
|||
};
|
||||
copyArray(config->lambdaLoadBins, mapBins);
|
||||
|
||||
setRpmTableBin(config->lambdaRpmBins, FUEL_RPM_COUNT);
|
||||
setRpmTableBin(config->lambdaRpmBins);
|
||||
|
||||
static constexpr float rowValues[] = {
|
||||
1, 1, 1, 1, // 30, 40, 50, 60 kpa
|
||||
|
@ -229,9 +229,9 @@ void setDefaultFuel() {
|
|||
|
||||
// Tables
|
||||
setFuelTablesLoadBin(10, 160);
|
||||
setRpmTableBin(config->injPhaseRpmBins, FUEL_RPM_COUNT);
|
||||
setRpmTableBin(config->injPhaseRpmBins);
|
||||
|
||||
setRpmTableBin(engineConfiguration->tpsTspCorrValuesBins, TPS_TPS_ACCEL_CLT_CORR_TABLE);
|
||||
setRpmTableBin(engineConfiguration->tpsTspCorrValuesBins);
|
||||
setLinearCurve(engineConfiguration->tpsTspCorrValuesBins, 1, 1);
|
||||
|
||||
setDefaultVETable();
|
||||
|
|
|
@ -371,7 +371,7 @@ void setDefaultGppwmParameters() {
|
|||
}
|
||||
|
||||
static void setDefaultEngineNoiseTable() {
|
||||
setRpmTableBin(engineConfiguration->knockNoiseRpmBins, ENGINE_NOISE_CURVE_SIZE);
|
||||
setRpmTableBin(engineConfiguration->knockNoiseRpmBins);
|
||||
|
||||
engineConfiguration->knockSamplingDuration = 45;
|
||||
|
||||
|
@ -520,17 +520,17 @@ static void setDefaultEngineConfiguration() {
|
|||
setLinearCurve(engineConfiguration->map.samplingWindow, 50, 50, 1);
|
||||
|
||||
setLinearCurve(config->vvtTable1LoadBins, 20, 120, 10);
|
||||
setRpmTableBin(config->vvtTable1RpmBins, SCRIPT_TABLE_8);
|
||||
setRpmTableBin(config->vvtTable1RpmBins);
|
||||
setLinearCurve(config->vvtTable2LoadBins, 20, 120, 10);
|
||||
setRpmTableBin(config->vvtTable2RpmBins, SCRIPT_TABLE_8);
|
||||
setRpmTableBin(config->vvtTable2RpmBins);
|
||||
setLinearCurve(config->scriptTable1LoadBins, 20, 120, 10);
|
||||
setRpmTableBin(config->scriptTable1RpmBins, SCRIPT_TABLE_8);
|
||||
setRpmTableBin(config->scriptTable1RpmBins);
|
||||
setLinearCurve(config->scriptTable2LoadBins, 20, 120, 10);
|
||||
setRpmTableBin(config->scriptTable2RpmBins, SCRIPT_TABLE_8);
|
||||
setRpmTableBin(config->scriptTable2RpmBins);
|
||||
setLinearCurve(config->scriptTable3LoadBins, 20, 120, 10);
|
||||
setRpmTableBin(config->scriptTable3RpmBins, SCRIPT_TABLE_8);
|
||||
setRpmTableBin(config->scriptTable3RpmBins);
|
||||
setLinearCurve(config->scriptTable4LoadBins, 20, 120, 10);
|
||||
setRpmTableBin(config->scriptTable4RpmBins, SCRIPT_TABLE_8);
|
||||
setRpmTableBin(config->scriptTable4RpmBins);
|
||||
|
||||
setDefaultEngineNoiseTable();
|
||||
|
||||
|
|
|
@ -190,7 +190,7 @@ void setRpmBin(kType array[], int size, float idleRpm, float topRpm) {
|
|||
/**
|
||||
* initialize RPM table axis using default RPM range
|
||||
*/
|
||||
template<typename kType>
|
||||
void setRpmTableBin(kType array[], int size) {
|
||||
setRpmBin(array, size, 800, 7000);
|
||||
template<typename TValue, int TSize>
|
||||
void setRpmTableBin(TValue (&array)[TSize]) {
|
||||
setRpmBin(array, TSize, 800, 7000);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue