auto-sync

This commit is contained in:
rusEfi 2016-12-16 21:02:54 -05:00
parent bac97cb24e
commit 9531d384a1
8 changed files with 20 additions and 15 deletions

View File

@ -165,8 +165,6 @@ void setDodgeNeon1995EngineConfiguration(DECLARE_ENGINE_PARAMETER_F) {
boardConfiguration->is_enabled_spi_2 = true;
engineConfiguration->hasIatSensor = false;
// set_rpm_hard_limit 4000
engineConfiguration->rpmHardLimit = 4000; // yes, 4k. let's play it safe for now
// set_cranking_rpm 550

View File

@ -34,11 +34,9 @@ void setSachs(DECLARE_ENGINE_PARAMETER_F) {
engineConfiguration->trigger.customTotalToothCount = 50;
engineConfiguration->trigger.customSkippedToothCount = 2;
engineConfiguration->hasIatSensor = false;
engineConfiguration->hasMapSensor = false;
engineConfiguration->hasBaroSensor = false;
engineConfiguration->hasAfrSensor = false;
engineConfiguration->hasCltSensor = false;
boardConfiguration->useSerialPort = false;
// Frankenstein analog input #1: PA1 adc1 MAP

View File

@ -50,8 +50,6 @@ void setTestEngineConfiguration(DECLARE_ENGINE_PARAMETER_F) {
boardConfiguration->logicAnalyzerPins[2] = GPIO_UNASSIGNED;
boardConfiguration->logicAnalyzerPins[3] = GPIO_UNASSIGNED;
engineConfiguration->hasCltSensor = false;
engineConfiguration->hasIatSensor = false;
}

View File

@ -638,8 +638,6 @@ void setDefaultConfiguration(DECLARE_ENGINE_PARAMETER_F) {
engineConfiguration->hasMafSensor = true;
engineConfiguration->hasTpsSensor = true;
engineConfiguration->hasAfrSensor = true;
engineConfiguration->hasIatSensor = true;
engineConfiguration->hasCltSensor = true;
engineConfiguration->hasBaroSensor = false;
engineConfiguration->isEngineChartEnabled = true;

View File

@ -107,12 +107,13 @@ bool isValidIntakeAirTemperature(float temperature) {
* @return coolant temperature, in Celsius
*/
float getCoolantTemperature(DECLARE_ENGINE_PARAMETER_F) {
float temperature = getTemperatureC(&engineConfiguration->clt, &engine->engineState.cltCurve);
if (engineConfiguration->clt.adcChannel == EFI_ADC_NONE) {
return NO_CLT_SENSOR_TEMPERATURE;
}
float temperature = getTemperatureC(&engineConfiguration->clt, &engine->engineState.cltCurve);
if (!isValidCoolantTemperature(temperature)) {
efiAssert(engineConfiguration!=NULL, "NULL engineConfiguration", NAN);
if (engineConfiguration->hasCltSensor) {
warning(OBD_Engine_Coolant_Temperature_Circuit_Malfunction, "unrealistic CLT %f", temperature);
}
warning(OBD_Engine_Coolant_Temperature_Circuit_Malfunction, "unrealistic CLT %f", temperature);
return LIMPING_MODE_CLT_TEMPERATURE;
}
return temperature;

View File

@ -258,7 +258,7 @@ void TriggerState::decodeTriggerEvent(trigger_event_e const signal, efitime_t no
|| currentCycle.eventCount[2] != TRIGGER_SHAPE(expectedEventCount[2]);
enginePins.triggerDecoderErrorPin.setValue(isDecodingError);
if (isDecodingError) {
if (isDecodingError && !isInitializingTrigger) {
warning(CUSTOM_SYNC_ERROR_2, "trigger not happy current %d/%d/%d expected %d/%d/%d",
currentCycle.eventCount[0],
currentCycle.eventCount[1],

View File

@ -2065,6 +2065,12 @@
<file>
<name>$PROJ_DIR$\..\config\engines\mazda_miata_nb.h</name>
</file>
<file>
<name>$PROJ_DIR$\..\config\engines\mazda_miata_vvt.cpp</name>
</file>
<file>
<name>$PROJ_DIR$\..\config\engines\mazda_miata_vvt.h</name>
</file>
<file>
<name>$PROJ_DIR$\..\config\engines\MiniCooperR50.cpp</name>
</file>
@ -2494,6 +2500,12 @@
<file>
<name>$PROJ_DIR$\..\controllers\trigger\rpm_calculator.h</name>
</file>
<file>
<name>$PROJ_DIR$\..\controllers\trigger\spark_logic.cpp</name>
</file>
<file>
<name>$PROJ_DIR$\..\controllers\trigger\spark_logic.h</name>
</file>
<file>
<name>$PROJ_DIR$\..\controllers\trigger\trigger_bmw.cpp</name>
</file>

View File

@ -1231,7 +1231,7 @@ void testMissedSpark299(void) {
engineConfiguration->isIgnitionEnabled = true;
engineConfiguration->isInjectionEnabled = false;
assertEqualsM("warningCounter#0", 3, warningCounter);
assertEqualsM("warningCounter#0", 5, warningCounter);
timeNow += MS2US(20);
eth.firePrimaryTriggerRise();
@ -1302,5 +1302,5 @@ void testMissedSpark299(void) {
eth.firePrimaryTriggerFall();
schedulingQueue.executeAll(timeNow);
assertEqualsM("warningCounter#1", 4, warningCounter);
assertEqualsM("warningCounter#1", 6, warningCounter);
}