From 1f6088e56ba59a7471d8680f93055fd6fcd1fea3 Mon Sep 17 00:00:00 2001 From: rusefillc Date: Tue, 25 Oct 2022 23:18:41 -0400 Subject: [PATCH] E38 --- .../hellen-gm-e67/board_configuration.cpp | 17 ++---------- firmware/config/engines/engines.mk | 1 + firmware/config/engines/gm_ls_4.cpp | 26 +++++++++++++++++++ firmware/config/engines/gm_ls_4.h | 12 +++++++++ 4 files changed, 41 insertions(+), 15 deletions(-) create mode 100644 firmware/config/engines/gm_ls_4.cpp create mode 100644 firmware/config/engines/gm_ls_4.h diff --git a/firmware/config/boards/hellen/hellen-gm-e67/board_configuration.cpp b/firmware/config/boards/hellen/hellen-gm-e67/board_configuration.cpp index 7ca6dbf462..8707eb65a3 100644 --- a/firmware/config/boards/hellen/hellen-gm-e67/board_configuration.cpp +++ b/firmware/config/boards/hellen/hellen-gm-e67/board_configuration.cpp @@ -13,7 +13,7 @@ #include "pch.h" #include "custom_engine.h" #include "hellen_meta.h" -#include "defaults.h" +#include "gm_ls_4.h" static void setInjectorPins() { engineConfiguration->injectionPins[0] = H144_LS_1; @@ -142,11 +142,7 @@ void setBoardDefaultConfiguration() { engineConfiguration->useOnlyRisingEdgeForTrigger = true; engineConfiguration->invertPrimaryTriggerSignal = true; - engineConfiguration->globalTriggerAngleOffset = 86; - engineConfiguration->fuelReferencePressure = 400; // 400 kPa, 58 psi - engineConfiguration->injectorCompensationMode = ICM_FixedRailPressure; - engineConfiguration->injector.flow = 440; engineConfiguration->boostControlPin = H144_OUT_PWM5; engineConfiguration->brakePedalPin = H144_IN_RES2; @@ -162,13 +158,7 @@ void setBoardDefaultConfiguration() { // "required" hardware is done - set some reasonable defaults setupDefaultSensorInputs(); - engineConfiguration->specs.cylindersCount = 8; - setLeftRightBanksNeedBetterName(); - engineConfiguration->specs.firingOrder = FO_1_8_7_2_6_5_4_3; - engineConfiguration->specs.displacement = 6.2; - - engineConfiguration->tChargeAirIncrLimit = 5; - engineConfiguration->tChargeAirDecrLimit = 15; + setGmLs4(); engineConfiguration->enableSoftwareKnock = true; @@ -185,9 +175,6 @@ void setBoardDefaultConfiguration() { engineConfiguration->throttlePedalSecondaryUpVoltage = 5.0; engineConfiguration->throttlePedalSecondaryWOTVoltage = 0.0; - engineConfiguration->useETBforIdleControl = true; - engineConfiguration->etbIdleThrottleRange = 15; - engineConfiguration->ignitionMode = IM_INDIVIDUAL_COILS; // would not hurt just in case no cam engineConfiguration->twoWireBatchInjection = true; diff --git a/firmware/config/engines/engines.mk b/firmware/config/engines/engines.mk index 2c22fd8f71..022a280889 100644 --- a/firmware/config/engines/engines.mk +++ b/firmware/config/engines/engines.mk @@ -13,6 +13,7 @@ ENGINES_SRC_CPP = $(PROJECT_DIR)/config/engines/ford_aspire.cpp \ $(PROJECT_DIR)/config/engines/citroenBerlingoTU3JP.cpp \ $(PROJECT_DIR)/config/engines/dodge_neon.cpp \ $(PROJECT_DIR)/config/engines/ford_1995_inline_6.cpp \ + $(PROJECT_DIR)/config/engines/gm_ls_4.cpp \ $(PROJECT_DIR)/config/engines/nissan_primera.cpp \ $(PROJECT_DIR)/config/engines/nissan_vq.cpp \ $(PROJECT_DIR)/config/engines/harley.cpp \ diff --git a/firmware/config/engines/gm_ls_4.cpp b/firmware/config/engines/gm_ls_4.cpp new file mode 100644 index 0000000000..dc4705c6fd --- /dev/null +++ b/firmware/config/engines/gm_ls_4.cpp @@ -0,0 +1,26 @@ +/* + * gm_ls_4.cpp + * + */ + +#include "gm_ls_4.h" +#include "defaults.h" + +void setGmLs4() { + engineConfiguration->globalTriggerAngleOffset = 86; + + engineConfiguration->fuelReferencePressure = 400; // 400 kPa, 58 psi + engineConfiguration->injectorCompensationMode = ICM_FixedRailPressure; + engineConfiguration->injector.flow = 440; + + engineConfiguration->specs.cylindersCount = 8; + setLeftRightBanksNeedBetterName(); + engineConfiguration->specs.firingOrder = FO_1_8_7_2_6_5_4_3; + engineConfiguration->specs.displacement = 6.2; + + engineConfiguration->useETBforIdleControl = true; + engineConfiguration->etbIdleThrottleRange = 15; + + engineConfiguration->tChargeAirIncrLimit = 5; + engineConfiguration->tChargeAirDecrLimit = 15; +} diff --git a/firmware/config/engines/gm_ls_4.h b/firmware/config/engines/gm_ls_4.h new file mode 100644 index 0000000000..0033b3c8b8 --- /dev/null +++ b/firmware/config/engines/gm_ls_4.h @@ -0,0 +1,12 @@ +/* + * gm_ls_4.h + * + * Created on: 25 окт. 2022 г. + * Author: Huge + */ + +#pragma once + +#include "engine_configuration.h" + +void setGmLs4();