fine-grained check modes
This commit is contained in:
parent
ba2c675ffa
commit
f28f1e0f90
|
@ -2,7 +2,7 @@
|
|||
|
||||
export PROJECT_BOARD=microrusefi
|
||||
export PROJECT_CPU=ARCH_STM32F4
|
||||
export EXTRA_PARAMS="-DHW_CHECK_MODE=TRUE -DSHORT_BOARD_NAME=mre_f4"
|
||||
export EXTRA_PARAMS="-DHW_CHECK_MODE=TRUE -DANALOG_HW_CHECK_MODE=TRUE -DHW_CHECK_ALAWAYS_STIMULATE=TRUE -DSHORT_BOARD_NAME=mre_f4"
|
||||
|
||||
export DEFAULT_ENGINE_TYPE=-DDEFAULT_ENGINE_TYPE=MRE_BOARD_NEW_TEST
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
export PROJECT_BOARD=proteus
|
||||
export PROJECT_CPU=ARCH_STM32F4
|
||||
export EXTRA_PARAMS="-DVR_HW_CHECK_MODE=TRUE -DHW_CHECK_SPARK_FSIO=TRUE -DSHORT_BOARD_NAME=proteus_f4"
|
||||
export EXTRA_PARAMS="-DVR_HW_CHECK_MODE=TRUE -DHW_CHECK_ALWAYS_STIMULATE=TRUE -DHW_CHECK_SPARK_FSIO=TRUE -DSHORT_BOARD_NAME=proteus_f4"
|
||||
|
||||
export DEFAULT_ENGINE_TYPE=-DDEFAULT_ENGINE_TYPE=PROTEUS_QC_TEST_BOARD
|
||||
|
||||
|
|
|
@ -163,13 +163,13 @@ static void cylinderCleanupControl(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
|
|||
#endif
|
||||
}
|
||||
|
||||
#if HW_CHECK_MODE
|
||||
#if ANALOG_HW_CHECK_MODE
|
||||
static void assertCloseTo(const char * msg, float actual, float expected) {
|
||||
if (actual < 0.75 * expected || actual > 1.25 * expected) {
|
||||
firmwareError(OBD_PCM_Processor_Fault, "%s analog input validation failed %f vs %f", msg, actual, expected);
|
||||
}
|
||||
}
|
||||
#endif // HW_CHECK_MODE
|
||||
#endif // ANALOG_HW_CHECK_MODE
|
||||
|
||||
void Engine::periodicSlowCallback(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
|
||||
ScopePerf perf(PE::EnginePeriodicSlowCallback);
|
||||
|
@ -216,7 +216,7 @@ void Engine::periodicSlowCallback(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
|
|||
|
||||
slowCallBackWasInvoked = true;
|
||||
|
||||
#if HW_CHECK_MODE
|
||||
#if ANALOG_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) {
|
||||
|
@ -233,7 +233,7 @@ void Engine::periodicSlowCallback(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
|
|||
assertCloseTo("iat", Sensor::get(SensorType::Iat).Value, 73.2);
|
||||
assertCloseTo("aut1", Sensor::get(SensorType::AuxTemp1).Value, 13.8);
|
||||
assertCloseTo("aut2", Sensor::get(SensorType::AuxTemp2).Value, 6.2);
|
||||
#endif // HW_CHECK_MODE
|
||||
#endif // ANALOG_HW_CHECK_MODE
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -190,11 +190,11 @@ void runRusEfi(void) {
|
|||
readConfiguration(&sharedLogger);
|
||||
#endif /* EFI_INTERNAL_FLASH */
|
||||
|
||||
#if HW_CHECK_MODE
|
||||
#if HW_CHECK_ALWAYS_STIMULATE
|
||||
// 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
|
||||
engine->directSelfStimulation = true;
|
||||
#endif // HW_CHECK_MODE
|
||||
#endif // HW_CHECK_ALWAYS_STIMULATE
|
||||
|
||||
|
||||
#if ! EFI_ACTIVE_CONFIGURATION_IN_FLASH
|
||||
|
|
Loading…
Reference in New Issue