diff --git a/firmware/config/boards/kinetis/rusefi_hw_enums.h b/firmware/config/boards/kinetis/rusefi_hw_enums.h index ec3e18997b..c2740d9cc8 100644 --- a/firmware/config/boards/kinetis/rusefi_hw_enums.h +++ b/firmware/config/boards/kinetis/rusefi_hw_enums.h @@ -185,8 +185,6 @@ typedef enum __attribute__ ((__packed__)) { * and TunerStudio would need these ordinals to fit into field size */ TEST_MAF_CHANNEL = 18, - TEST_CLT_CHANNEL = 19, - TEST_IAT_CHANNEL = 20, #endif /* EFI_UNIT_TEST */ } adc_channel_e; diff --git a/firmware/controllers/algo/auto_generated_enums.cpp b/firmware/controllers/algo/auto_generated_enums.cpp index 5d622c287c..866c609be8 100644 --- a/firmware/controllers/algo/auto_generated_enums.cpp +++ b/firmware/controllers/algo/auto_generated_enums.cpp @@ -79,8 +79,6 @@ case EFI_ADC_NONE: return "EFI_ADC_NONE"; #if EFI_UNIT_TEST case TEST_MAF_CHANNEL: -case TEST_CLT_CHANNEL: -case TEST_IAT_CHANNEL: return "EFI_TEST"; #endif /* EFI_UNIT_TEST */ } diff --git a/firmware/controllers/algo/rusefi_hw_enums.h b/firmware/controllers/algo/rusefi_hw_enums.h index c175c2f372..2cc31d7e29 100644 --- a/firmware/controllers/algo/rusefi_hw_enums.h +++ b/firmware/controllers/algo/rusefi_hw_enums.h @@ -272,8 +272,6 @@ typedef enum __attribute__ ((__packed__)) { * and TunerStudio would need these ordinals to fit into field size */ TEST_MAF_CHANNEL = 18, - TEST_CLT_CHANNEL = 19, - TEST_IAT_CHANNEL = 20, #endif /* EFI_UNIT_TEST */ } adc_channel_e; diff --git a/firmware/controllers/sensors/thermistors.cpp b/firmware/controllers/sensors/thermistors.cpp index e102ce05c7..b4c88b583a 100644 --- a/firmware/controllers/sensors/thermistors.cpp +++ b/firmware/controllers/sensors/thermistors.cpp @@ -120,7 +120,6 @@ temperature_t getCoolantTemperatureM(DECLARE_ENGINE_PARAMETER_SIGNATURE) { engineConfiguration->useLinearCltSensor PASS_ENGINE_PARAMETER_SUFFIX); if (!isValidCoolantTemperature(temperature)) { efiAssert(CUSTOM_ERR_ASSERT, engineConfiguration!=NULL, "NULL engineConfiguration", NAN); - warning(OBD_Engine_Coolant_Temperature_Circuit_Malfunction, "unrealistic CLT %.2f", temperature); engine->isCltBroken = true; return LIMPING_MODE_CLT_TEMPERATURE; } @@ -197,9 +196,6 @@ temperature_t getIntakeAirTemperatureM(DECLARE_ENGINE_PARAMETER_SIGNATURE) { engineConfiguration->useLinearIatSensor PASS_ENGINE_PARAMETER_SUFFIX); if (!isValidIntakeAirTemperature(temperature)) { efiAssert(CUSTOM_ERR_ASSERT, engineConfiguration!=NULL, "NULL engineConfiguration", NAN); -#if EFI_PROD_CODE || EFI_UNIT_TEST - warning(OBD_Intake_Air_Temperature_Circuit_Malfunction, "unrealistic IAT %.2f", temperature); -#endif /* EFI_PROD_CODE */ return LIMPING_MODE_IAT_TEMPERATURE; } return temperature; diff --git a/unit_tests/boards.cpp b/unit_tests/boards.cpp index 45744588ed..320ae7ab39 100644 --- a/unit_tests/boards.cpp +++ b/unit_tests/boards.cpp @@ -10,20 +10,12 @@ // todo: migrate to engine->engineState.mockAdcState float testMafValue = 0; -float testCltValue = 0; -float testIatValue = 0; // see setMockVoltage float getVoltageDivided(const char *msg, adc_channel_e hwChannel DECLARE_ENGINE_PARAMETER_SUFFIX) { switch(hwChannel) { case TEST_MAF_CHANNEL: return testMafValue; - case TEST_CLT_CHANNEL: - return testCltValue; - //return adcToVolts(engine->engineState.mockAdcState.getMockAdcValue(hwChannel)); - case TEST_IAT_CHANNEL: - return testIatValue; - //return adcToVolts(engine->engineState.mockAdcState.getMockAdcValue(hwChannel)); default: return adcToVolts(engine->engineState.mockAdcState.getMockAdcValue(hwChannel));; } diff --git a/unit_tests/engine_test_helper.cpp b/unit_tests/engine_test_helper.cpp index 17edd9567d..0fd727cbab 100644 --- a/unit_tests/engine_test_helper.cpp +++ b/unit_tests/engine_test_helper.cpp @@ -19,8 +19,6 @@ extern int timeNowUs; extern WarningCodeState unitTestWarningCodeState; extern float testMafValue; -extern float testCltValue; -extern float testIatValue; extern engine_configuration_s & activeConfiguration; EngineTestHelperBase::EngineTestHelperBase() { @@ -61,13 +59,8 @@ EngineTestHelper::EngineTestHelper(engine_type_e engineType, configuration_callb commonInitEngineController(NULL PASS_ENGINE_PARAMETER_SUFFIX); engine->engineConfigurationPtr->mafAdcChannel = TEST_MAF_CHANNEL; - engine->engineConfigurationPtr->clt.adcChannel = TEST_CLT_CHANNEL; - engine->engineConfigurationPtr->iat.adcChannel = TEST_IAT_CHANNEL; - // magic voltage to get nice CLT - testCltValue = 1.492964; + Sensor::setMockValue(SensorType::Clt, 70); - // magic voltage to get nice IAT - testIatValue = 4.03646; Sensor::setMockValue(SensorType::Iat, 30); // this is needed to have valid CLT and IAT.