From ee7c0895bfcdef810912327f4e06775157387748 Mon Sep 17 00:00:00 2001 From: rusefi Date: Wed, 25 Mar 2020 01:28:37 -0400 Subject: [PATCH] start/stop progress --- firmware/controllers/algo/launch_control.cpp | 2 +- firmware/controllers/system/efi_gpio.cpp | 5 ++++- firmware/controllers/system/efi_gpio.h | 5 +++++ 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/firmware/controllers/algo/launch_control.cpp b/firmware/controllers/algo/launch_control.cpp index 4528c8cbef..a9a9bff6a7 100644 --- a/firmware/controllers/algo/launch_control.cpp +++ b/firmware/controllers/algo/launch_control.cpp @@ -135,7 +135,7 @@ void setDefaultLaunchParameters(DECLARE_CONFIG_PARAMETER_SIGNATURE) { engineConfiguration->enableLaunchRetard = true; engineConfiguration->enableLaunchBoost = true; engineConfiguration->launchSmoothRetard = true; //interpolates the advance linear from launchrpm to fully retarded at launchtimingrpmrange - engineConfiguration->antilagTimeout = 3; + engineConfiguration->unusedAntilagTimeout = 3; engineConfiguration->antiLagRpmTreshold = 3000; } diff --git a/firmware/controllers/system/efi_gpio.cpp b/firmware/controllers/system/efi_gpio.cpp index 94eb0229b5..5b7c534673 100644 --- a/firmware/controllers/system/efi_gpio.cpp +++ b/firmware/controllers/system/efi_gpio.cpp @@ -148,6 +148,8 @@ void EnginePins::unregisterPins() { unregisterOutputIfPinOrModeChanged(mainRelay, mainRelayPin, mainRelayPinMode); unregisterOutputIfPinOrModeChanged(starterRelayDisable, starterRelayDisablePin, starterRelayDisableMode); + unregisterOutputIfPinChanged(starterControl, starterControlPin, starterRelayDisableMode); + #endif /* EFI_PROD_CODE */ } @@ -375,7 +377,8 @@ void initOutputPins(DECLARE_ENGINE_PARAMETER_SIGNATURE) { enginePins.fuelPumpRelay.initPin("fuel pump relay", CONFIG(fuelPumpPin), &CONFIG(fuelPumpPinMode)); enginePins.mainRelay.initPin("main relay", CONFIG(mainRelayPin), &CONFIG(mainRelayPinMode)); - enginePins.starterRelayDisable.initPin("starter relay", CONFIG(starterRelayDisablePin), &CONFIG(starterRelayDisableMode)); + enginePins.starterRelayDisable.initPin("starter disable", CONFIG(starterRelayDisablePin), &CONFIG(starterRelayDisableMode)); + enginePins.starterControl.initPin("starter control", CONFIG(starterControlPin)); enginePins.fanRelay.initPin("fan relay", CONFIG(fanPin), &CONFIG(fanPinMode)); enginePins.o2heater.initPin("o2 heater", CONFIG(o2heaterPin)); diff --git a/firmware/controllers/system/efi_gpio.h b/firmware/controllers/system/efi_gpio.h index 13fadc4138..e641650a17 100644 --- a/firmware/controllers/system/efi_gpio.h +++ b/firmware/controllers/system/efi_gpio.h @@ -122,7 +122,12 @@ public: void stopInjectionPins(); void stopIgnitionPins(); OutputPin mainRelay; + + // this one cranks engine + OutputPin starterControl; + // this one prevents driver from cranknig engine OutputPin starterRelayDisable; + OutputPin fanRelay; // see acRelayPin OutputPin acRelay;