unit tests progress

This commit is contained in:
rusefi 2019-09-20 00:46:35 -04:00
parent 87875d8825
commit a72d2834fb
3 changed files with 6 additions and 5 deletions

View File

@ -311,6 +311,7 @@ static percent_t automaticIdleController(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
}
void IdleController::PeriodicTask() {
efiAssertVoid(OBD_PCM_Processor_Fault, engineConfiguration != NULL, "engineConfiguration pointer");
/*
* Here we have idle logic thread - actual stepper movement is implemented in a separate
* working thread,

View File

@ -90,6 +90,10 @@
// this method is used by real firmware and simulator and unit test
void mostCommonInitEngineController(Logging *sharedLogger DECLARE_ENGINE_PARAMETER_SUFFIX) {
#if EFI_IDLE_CONTROL
startIdleThread(sharedLogger PASS_ENGINE_PARAMETER_SUFFIX);
#endif /* EFI_IDLE_CONTROL */
initSensors(sharedLogger PASS_ENGINE_PARAMETER_SUFFIX);
initAccelEnrichment(sharedLogger PASS_ENGINE_PARAMETER_SUFFIX);
#if EFI_FSIO
@ -658,10 +662,6 @@ void commonInitEngineController(Logging *sharedLogger DECLARE_ENGINE_PARAMETER_S
initSensorChart();
#endif /* EFI_SENSOR_CHART */
#if EFI_IDLE_CONTROL
startIdleThread(sharedLogger PASS_ENGINE_PARAMETER_SUFFIX);
#endif /* EFI_IDLE_CONTROL */
#if EFI_PROD_CODE || EFI_SIMULATOR
// todo: this is a mess, remove code duplication with simulator
initSettings();

View File

@ -40,7 +40,7 @@ TEST(idle, fsioPidParameters) {
// timeNowUs = MS2US(700);
// idleControllerInstance.PeriodicTask();
idleControllerInstance.PeriodicTask();
// ASSERT_EQ(0, engine->acSwitchLastChangeTime);
// ASSERT_EQ(1, engine->acSwitchState);