mirror of https://github.com/rusefi/rusefi.git
better EFI_ENGINE_CONTROL
This commit is contained in:
parent
2a4476e62b
commit
b3e97fdf2f
|
@ -243,12 +243,14 @@ void setWholeTimingTable_d(angle_t value) {
|
|||
setTable(config->ignitionTable, value);
|
||||
}
|
||||
|
||||
#if EFI_ENGINE_CONTROL
|
||||
static void initTemperatureCurve(float *bins, float *values, int size, float defaultValue) {
|
||||
for (int i = 0; i < size; i++) {
|
||||
bins[i] = -40 + i * 10;
|
||||
values[i] = defaultValue; // this correction is a multiplier
|
||||
}
|
||||
}
|
||||
#endif // EFI_ENGINE_CONTROL
|
||||
|
||||
void prepareVoidConfiguration(engine_configuration_s *p_engineConfiguration) {
|
||||
criticalAssertVoid(p_engineConfiguration != NULL, "ec NULL");
|
||||
|
@ -283,6 +285,7 @@ void setDefaultSdCardParameters() {
|
|||
engineConfiguration->isSdCardEnabled = true;
|
||||
}
|
||||
|
||||
#if EFI_ENGINE_CONTROL
|
||||
static void setDefaultWarmupIdleCorrection() {
|
||||
initTemperatureCurve(CLT_MANUAL_IDLE_CORRECTION, 1.0);
|
||||
|
||||
|
@ -309,6 +312,7 @@ static void setDefaultIdleSpeedTarget() {
|
|||
copyArray(config->cltIdleRpmBins, { -30, - 20, -10, 0, 10, 20, 30, 40, 50, 60, 70, 80, 90, 100 , 110, 120 });
|
||||
copyArray(config->cltIdleRpm, { 1350, 1350, 1300, 1200, 1150, 1100, 1050, 1000, 1000, 950, 950, 930, 900, 900, 1000, 1100 });
|
||||
}
|
||||
#endif // EFI_ENGINE_CONTROL
|
||||
|
||||
/**
|
||||
* see also setDefaultIdleSpeedTarget()
|
||||
|
@ -351,6 +355,7 @@ void setDefaultGppwmParameters() {
|
|||
}
|
||||
}
|
||||
|
||||
#if EFI_ENGINE_CONTROL
|
||||
static void setDefaultEngineNoiseTable() {
|
||||
setRpmTableBin(engineConfiguration->knockNoiseRpmBins);
|
||||
|
||||
|
@ -358,6 +363,7 @@ static void setDefaultEngineNoiseTable() {
|
|||
|
||||
setArrayValues(engineConfiguration->knockBaseNoise, -20);
|
||||
}
|
||||
#endif // EFI_ENGINE_CONTROL
|
||||
|
||||
/**
|
||||
* @brief Global default engine configuration
|
||||
|
|
|
@ -66,6 +66,7 @@ operation_mode_e lookupOperationMode() {
|
|||
}
|
||||
}
|
||||
|
||||
#if EFI_SHAFT_POSITION_INPUT
|
||||
// see also in TunerStudio project '[doesTriggerImplyOperationMode] tag
|
||||
// this is related to 'knownOperationMode' flag
|
||||
static bool doesTriggerImplyOperationMode(trigger_type_e type) {
|
||||
|
@ -82,6 +83,7 @@ static bool doesTriggerImplyOperationMode(trigger_type_e type) {
|
|||
return true;
|
||||
}
|
||||
}
|
||||
#endif // EFI_SHAFT_POSITION_INPUT
|
||||
|
||||
// todo: move to triggerCentral/triggerShape since has nothing to do with rotation state!
|
||||
operation_mode_e RpmCalculator::getOperationMode() const {
|
||||
|
|
|
@ -122,6 +122,7 @@ static void check(SensorType type) {
|
|||
}
|
||||
|
||||
#if BOARD_EXT_GPIOCHIPS > 0 && EFI_PROD_CODE
|
||||
#if EFI_ENGINE_CONTROL
|
||||
static ObdCode getCodeForInjector(int idx, brain_pin_diag_e diag) {
|
||||
if (idx < 0 || idx >= 12) {
|
||||
return ObdCode::None;
|
||||
|
@ -132,6 +133,7 @@ static ObdCode getCodeForInjector(int idx, brain_pin_diag_e diag) {
|
|||
|
||||
return (ObdCode)((int)ObdCode::OBD_Injector_Circuit_1 + idx);
|
||||
}
|
||||
#endif // EFI_ENGINE_CONTROL
|
||||
|
||||
static ObdCode getCodeForIgnition(int idx, brain_pin_diag_e diag) {
|
||||
if (idx < 0 || idx >= 12) {
|
||||
|
|
Loading…
Reference in New Issue