diff --git a/firmware/config/engines/custom_engine.cpp b/firmware/config/engines/custom_engine.cpp index 984e848cee..e6ad72cdbf 100644 --- a/firmware/config/engines/custom_engine.cpp +++ b/firmware/config/engines/custom_engine.cpp @@ -586,7 +586,7 @@ void mreBoardNewTest(DECLARE_CONFIG_PARAMETER_SIGNATURE) { // TLE8888_PIN_24: "43 - GP Out 4" engineConfiguration->ignitionPins[12 - 1] = TLE8888_PIN_24; - engineConfiguration->afr.hwChannel = EFI_ADC_NONE; + engineConfiguration->afr.hwChannel = EFI_ADC_6; engineConfiguration->throttlePedalPositionAdcChannel = EFI_ADC_NONE; diff --git a/firmware/controllers/algo/engine.cpp b/firmware/controllers/algo/engine.cpp index 072f0cdf77..0a6717a070 100644 --- a/firmware/controllers/algo/engine.cpp +++ b/firmware/controllers/algo/engine.cpp @@ -207,6 +207,12 @@ void Engine::periodicSlowCallback(DECLARE_ENGINE_PARAMETER_SIGNATURE) { #if HW_CHECK_MODE efiAssertVoid(OBD_PCM_Processor_Fault, CONFIG(clt).adcChannel != EFI_ADC_NONE, "No CLT setting"); + efitimesec_t secondsNow = getTimeNowSeconds(); + if (secondsNow > 2 && secondsNow < 180) { +// assertCloseTo("RPM", Sensor::get(SensorType::Rpm).Value, HW_CHECK_RPM); + } else if (secondsNow > 180) { + CONFIG(triggerSimulatorFrequency) = 5 * HW_CHECK_RPM; + } assertCloseTo("clt", Sensor::get(SensorType::Clt).Value, 49.3); assertCloseTo("iat", Sensor::get(SensorType::Iat).Value, 73.2); assertCloseTo("aut1", Sensor::get(SensorType::AuxTemp1).Value, 13.8); diff --git a/firmware/controllers/algo/engine.h b/firmware/controllers/algo/engine.h index d5d71aa651..6deb8f88e9 100644 --- a/firmware/controllers/algo/engine.h +++ b/firmware/controllers/algo/engine.h @@ -402,3 +402,7 @@ void prepareOutputSignals(DECLARE_ENGINE_PARAMETER_SIGNATURE); void validateConfiguration(DECLARE_ENGINE_PARAMETER_SIGNATURE); void doScheduleStopEngine(DECLARE_ENGINE_PARAMETER_SIGNATURE); + +#define HW_CHECK_RPM 200 + + diff --git a/firmware/integration/rusefi_config.txt b/firmware/integration/rusefi_config.txt index aa99932edf..047ecd1203 100644 --- a/firmware/integration/rusefi_config.txt +++ b/firmware/integration/rusefi_config.txt @@ -656,7 +656,7 @@ float mapFrequency0Kpa;;"Hz", 1, 0, 0, 100000, 2 float mapFrequency100Kpa;;"Hz", 1, 0, 0, 100000, 2 ! todo: rename to triggerSimulatorRpm - int triggerSimulatorFrequency;+Same RPM is used for two ways of producing simulated RPM. See also triggerSimulatorPins (with wires)\nSee also directSelfStimulation (no wires, bypassing input hardware)\nrpm X;"Rpm", 1, 0, 0,30000, 0 + int triggerSimulatorFrequency;+Same RPM is used for two ways of producing simulated RPM. See also triggerSimulatorPins (with wires)\nSee also directSelfStimulation (no wires, bypassing input hardware)\nrpm X\nTODO: rename to triggerSimulatorRpm;"Rpm", 1, 0, 0,30000, 0 output_pin_e[INJECTION_PIN_COUNT iterate] injectionPins; output_pin_e[IGNITION_PIN_COUNT iterate] ignitionPins; diff --git a/firmware/rusefi.cpp b/firmware/rusefi.cpp index 688a227efa..c931c2bfeb 100644 --- a/firmware/rusefi.cpp +++ b/firmware/rusefi.cpp @@ -195,7 +195,7 @@ void runRusEfi(void) { // we need a special binary for final assembly check. We cannot afford to require too much software or too many steps // to be executed at the place of assembly - CONFIG(triggerSimulatorFrequency) = 180; + CONFIG(triggerSimulatorFrequency) = HW_CHECK_RPM; engine->directSelfStimulation = true; #endif // HW_CHECK_MODE