From b3b5dfc398a8c178e4f75fd72fca2d11e13e0ec5 Mon Sep 17 00:00:00 2001 From: rusefi Date: Sun, 13 Dec 2020 19:23:26 -0500 Subject: [PATCH 1/3] fail fast! --- .../controllers/actuators/idle_hardware.cpp | 25 ++++++++++++------- 1 file changed, 16 insertions(+), 9 deletions(-) diff --git a/firmware/controllers/actuators/idle_hardware.cpp b/firmware/controllers/actuators/idle_hardware.cpp index 9f1cbb024f..4d851e75c4 100644 --- a/firmware/controllers/actuators/idle_hardware.cpp +++ b/firmware/controllers/actuators/idle_hardware.cpp @@ -159,21 +159,28 @@ void initIdleHardware(Logging* sharedLogger DECLARE_ENGINE_PARAMETER_SUFFIX) { // This greatly improves PID accuracy for steppers with a small number of steps idlePositionSensitivityThreshold = 1.0f / engineConfiguration->idleStepperTotalSteps; - } else if (!engineConfiguration->useETBforIdleControl) { + } else if (engineConfiguration->useETBforIdleControl || CONFIG(idle).solenoidPin == GPIO_UNASSIGNED) { + // here we do nothing for ETB idle and for no idle + } else { + // we are here for single or double solenoid idle + /** * Start PWM for idleValvePin */ // todo: even for double-solenoid mode we can probably use same single SimplePWM // todo: open question why do we pass 'OutputPin' into 'startSimplePwmExt' if we have custom applyIdleSolenoidPinState listener anyway? - if (CONFIG(idle).solenoidPin != GPIO_UNASSIGNED) { - startSimplePwm(&idleSolenoidOpen, "Idle Valve Open", - &engine->executor, - &enginePins.idleSolenoidPin, - CONFIG(idle).solenoidFrequency, PERCENT_TO_DUTY(CONFIG(manIdlePosition)), - (pwm_gen_callback*)applyIdleSolenoidPinState); - } + startSimplePwm(&idleSolenoidOpen, "Idle Valve Open", + &engine->executor, + &enginePins.idleSolenoidPin, + CONFIG(idle).solenoidFrequency, PERCENT_TO_DUTY(CONFIG(manIdlePosition)), + (pwm_gen_callback*)applyIdleSolenoidPinState); + + if (CONFIG(isDoubleSolenoidIdle)) { + if (CONFIG(secondSolenoidPin) == GPIO_UNASSIGNED) { + firmwareError(OBD_PCM_Processor_Fault, "Second idle pin should be configured for double solenoid mode."); + return; + } - if (CONFIG(isDoubleSolenoidIdle) && CONFIG(secondSolenoidPin) != GPIO_UNASSIGNED) { startSimplePwm(&idleSolenoidClose, "Idle Valve Close", &engine->executor, &enginePins.secondIdleSolenoidPin, From 34bd9642d0e4316972d99738d819410b22dddfe3 Mon Sep 17 00:00:00 2001 From: GitHub build-unit-tests Action Date: Mon, 14 Dec 2020 00:34:22 +0000 Subject: [PATCH 2/3] Trigger wheel definitions --- unit_tests/triggers.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/unit_tests/triggers.txt b/unit_tests/triggers.txt index ccab8a020c..636acf54e8 100644 --- a/unit_tests/triggers.txt +++ b/unit_tests/triggers.txt @@ -2701,7 +2701,7 @@ event 30 1 1 651.50 event 31 1 0 674.00 event 32 1 1 696.50 event 33 1 0 719.00 -TRIGGERTYPE 51 14 TT_51 192.00 +TRIGGERTYPE 51 14 TT_SUBARU_7_WITHOUT_6 192.00 # duty 0.95 0.00 event 0 0 1 0.00 event 1 0 0 5.00 From 958a3464303c28db00457c0854f37c967efc0d89 Mon Sep 17 00:00:00 2001 From: GitHub set-date Action Date: Mon, 14 Dec 2020 00:51:09 +0000 Subject: [PATCH 3/3] Update date --- firmware/controllers/date_stamp.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/firmware/controllers/date_stamp.h b/firmware/controllers/date_stamp.h index 7cde1b77de..297df74560 100644 --- a/firmware/controllers/date_stamp.h +++ b/firmware/controllers/date_stamp.h @@ -1,2 +1,2 @@ #pragma once -#define VCS_DATE 20201213 +#define VCS_DATE 20201214