auto-sync

This commit is contained in:
rusEfi 2016-02-06 17:01:38 -05:00
parent 5e88186f5c
commit eeec275bc6
6 changed files with 9 additions and 5 deletions

View File

@ -235,7 +235,7 @@ void setDodgeNeonNGCEngineConfiguration(DECLARE_ENGINE_PARAMETER_F) {
setFrankenso_01_LCD(boardConfiguration);
setFrankenso0_1_joystick(engineConfiguration);
// set_whole_timing_map 10
boardConfiguration->useWarmupPidAfr = true;
// set_global_trigger_offset_angle 38
engineConfiguration->globalTriggerAngleOffset = 38;

View File

@ -176,7 +176,7 @@ static void printSensors(Logging *log, bool fileFormat) {
reportSensorF(log, fileFormat, "baro", "kPa", getBaroPressure(), 2);
}
if (engineConfiguration->hasAfrSensor) {
reportSensorF(log, fileFormat, "afr", "AFR", getAfr(), 2);
reportSensorF(log, fileFormat, "afr", "AFR", getAfr(PASS_ENGINE_PARAMETER_F), 2);
}
#endif
@ -580,7 +580,7 @@ void updateTunerStudioState(TunerStudioOutputChannels *tsOutputChannels DECLARE_
tsOutputChannels->veValue = veMap.getValue(getMap(), rpm);
tsOutputChannels->currentTargetAfr = afrMap.getValue(getMap(), rpm);
tsOutputChannels->airFuelRatio = getAfr();
tsOutputChannels->airFuelRatio = getAfr(PASS_ENGINE_PARAMETER_F);
if (hasVBatt(PASS_ENGINE_PARAMETER_F)) {
tsOutputChannels->vBatt = getVBatt(PASS_ENGINE_PARAMETER_F);
}

View File

@ -140,6 +140,9 @@ void EngineState::periodicFastCallback(DECLARE_ENGINE_PARAMETER_F) {
iatFuelCorrection = getIatCorrection(iat PASS_ENGINE_PARAMETER);
if (boardConfiguration->useWarmupPidAfr && clt < 80) {
if (rpm < 200)
warmupAfrPid.reset();
cltFuelCorrection = 1 + warmupAfrPid.getValue(13, getAfr(PASS_ENGINE_PARAMETER_F), 1);
} else {
cltFuelCorrection = getCltCorrection(clt PASS_ENGINE_PARAMETER);

View File

@ -249,6 +249,7 @@ static void periodicSlowCallback(Engine *engine) {
engine->configurationListeners.invokeJustArgCallbacks();
// todo: convert to a callback?
updateAccelParameters();
engine->engineState.warmupAfrPid.reset();
}
engine->watchdog();

View File

@ -81,7 +81,7 @@ float baseFuel;;"ms", 1, 0, 0, 200, 1
int16_t rpm;This value controls what RPM values we consider 'cranking' (any RPM below 'crankingRpm')\nAnything above 'crankingRpm' would be 'running';"RPM", 1, 0, 0, 3000, 0
end_struct
#define debug_mode_e_enum "ALTERNATOR", "TPS_ACCEL", "mode2", "mode3"
#define debug_mode_e_enum "ALTERNATOR", "TPS_ACCEL", "WARMUP_PID", "mode3"
custom debug_mode_e 4 bits, U32, @OFFSET@, [0:1], @@debug_mode_e_enum@@

View File

@ -1404,7 +1404,7 @@ fileVersion = { 20160122 }
field = "wa I factor", warmupAfrPid_iFactor
field = "wa D factor", warmupAfrPid_dFactor
field = "useWarmupPidAfr", useWarmupPidAfr
field = "debugMode", debugMode
dialog = energySystems, "Battery and Alternator Settings", yAxis