diff --git a/firmware/config/engines/dodge_neon.cpp b/firmware/config/engines/dodge_neon.cpp
index 20593d4974..d88f94539a 100644
--- a/firmware/config/engines/dodge_neon.cpp
+++ b/firmware/config/engines/dodge_neon.cpp
@@ -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
diff --git a/firmware/config/engines/sachs.cpp b/firmware/config/engines/sachs.cpp
index c413dfe466..a53dfb88a2 100644
--- a/firmware/config/engines/sachs.cpp
+++ b/firmware/config/engines/sachs.cpp
@@ -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
diff --git a/firmware/config/engines/test_engine.cpp b/firmware/config/engines/test_engine.cpp
index 42eb3aba0d..2f3f2a1290 100644
--- a/firmware/config/engines/test_engine.cpp
+++ b/firmware/config/engines/test_engine.cpp
@@ -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;
}
diff --git a/firmware/controllers/algo/engine_configuration.cpp b/firmware/controllers/algo/engine_configuration.cpp
index 95f0f4f66f..62a7a8ebb0 100644
--- a/firmware/controllers/algo/engine_configuration.cpp
+++ b/firmware/controllers/algo/engine_configuration.cpp
@@ -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;
diff --git a/firmware/controllers/sensors/thermistors.cpp b/firmware/controllers/sensors/thermistors.cpp
index 7e8805561e..b151429bfe 100644
--- a/firmware/controllers/sensors/thermistors.cpp
+++ b/firmware/controllers/sensors/thermistors.cpp
@@ -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;
diff --git a/firmware/controllers/trigger/trigger_decoder.cpp b/firmware/controllers/trigger/trigger_decoder.cpp
index 67cb9b9f7c..23bb1b561c 100644
--- a/firmware/controllers/trigger/trigger_decoder.cpp
+++ b/firmware/controllers/trigger/trigger_decoder.cpp
@@ -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],
diff --git a/firmware/iar/ch.ewp b/firmware/iar/ch.ewp
index 96162d8238..ec68db8674 100644
--- a/firmware/iar/ch.ewp
+++ b/firmware/iar/ch.ewp
@@ -2065,6 +2065,12 @@
$PROJ_DIR$\..\config\engines\mazda_miata_nb.h
+
+ $PROJ_DIR$\..\config\engines\mazda_miata_vvt.cpp
+
+
+ $PROJ_DIR$\..\config\engines\mazda_miata_vvt.h
+
$PROJ_DIR$\..\config\engines\MiniCooperR50.cpp
@@ -2494,6 +2500,12 @@
$PROJ_DIR$\..\controllers\trigger\rpm_calculator.h
+
+ $PROJ_DIR$\..\controllers\trigger\spark_logic.cpp
+
+
+ $PROJ_DIR$\..\controllers\trigger\spark_logic.h
+
$PROJ_DIR$\..\controllers\trigger\trigger_bmw.cpp
diff --git a/unit_tests/test_trigger_decoder.cpp b/unit_tests/test_trigger_decoder.cpp
index 985bfff78d..d0f5160218 100644
--- a/unit_tests/test_trigger_decoder.cpp
+++ b/unit_tests/test_trigger_decoder.cpp
@@ -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);
}