diff --git a/firmware/config/engines/chevrolet_c20_1973.cpp b/firmware/config/engines/chevrolet_c20_1973.cpp new file mode 100644 index 0000000000..a6484cfdaf --- /dev/null +++ b/firmware/config/engines/chevrolet_c20_1973.cpp @@ -0,0 +1,42 @@ +/* + * @file chevrolet_c20_1973.cpp + * + * 5.7L SBC + * 4 wire IAC + * 8 pin HEI module + * + * set_engine_type 37 + * + * + * @date Dec 20, 2015 + * @author Andrey Belomutskiy, (c) 2012-2015 + */ + +#include "chevrolet_c20_1973.h" + +EXTERN_ENGINE; + +void set1973c20(DECLARE_ENGINE_PARAMETER_F) { + + engineConfiguration->specs.displacement = 5.7; + engineConfiguration->specs.cylindersCount = 8; + + setOperationMode(engineConfiguration, FOUR_STROKE_CAM_SENSOR); + + engineConfiguration->ignitionMode = IM_ONE_COIL; + engineConfiguration->specs.firingOrder = FO_1_8_4_3_6_5_7_2; + engineConfiguration->crankingInjectionMode = IM_SIMULTANEOUS; + engineConfiguration->injectionMode = IM_SIMULTANEOUS; + + /** + * 8/0 toothed wheel + */ + engineConfiguration->trigger.type = TT_TOOTHED_WHEEL; + engineConfiguration->trigger.customTotalToothCount = 8; + engineConfiguration->trigger.customSkippedToothCount = 0; + + + +} + + diff --git a/firmware/config/engines/chevrolet_c20_1973.h b/firmware/config/engines/chevrolet_c20_1973.h new file mode 100644 index 0000000000..3d4544339d --- /dev/null +++ b/firmware/config/engines/chevrolet_c20_1973.h @@ -0,0 +1,15 @@ +/* + * @file chevrolet_c20_1973.h + * + * @date Dec 20, 2015 + * @author Andrey Belomutskiy, (c) 2012-2015 + */ + +#ifndef CONFIG_ENGINES_CHEVROLET_C20_1973_H_ +#define CONFIG_ENGINES_CHEVROLET_C20_1973_H_ + +#include "engine.h" + +void set1973c20(DECLARE_ENGINE_PARAMETER_F); + +#endif /* CONFIG_ENGINES_CHEVROLET_C20_1973_H_ */ diff --git a/firmware/config/engines/engines.mk b/firmware/config/engines/engines.mk index 3ab51898a1..84c1287d76 100644 --- a/firmware/config/engines/engines.mk +++ b/firmware/config/engines/engines.mk @@ -31,5 +31,6 @@ ENGINES_SRC_CPP = $(PROJECT_DIR)/config/engines/ford_aspire.cpp \ $(PROJECT_DIR)/config/engines/dodge_stratus.cpp \ $(PROJECT_DIR)/config/engines/chevrolet_camaro_4.cpp \ $(PROJECT_DIR)/config/engines/suzuki_vitara.cpp \ - $(PROJECT_DIR)/config/engines/daihatsu.cpp + $(PROJECT_DIR)/config/engines/daihatsu.cpp \ + $(PROJECT_DIR)/config/engines/chevrolet_c20_1973.cpp \ No newline at end of file diff --git a/firmware/controllers/algo/auto_generated_enums.cpp b/firmware/controllers/algo/auto_generated_enums.cpp index cc9931ddda..c736c9a7c1 100644 --- a/firmware/controllers/algo/auto_generated_enums.cpp +++ b/firmware/controllers/algo/auto_generated_enums.cpp @@ -34,6 +34,8 @@ case SUZUKI_VITARA: return "SUZUKI_VITARA"; case CAMARO_4: return "CAMARO_4"; +case CHEVY_C20_1973: + return "CHEVY C20"; case GM_2_2: return "GM_2_2"; case DODGE_RAM: diff --git a/firmware/controllers/algo/engine_configuration.cpp b/firmware/controllers/algo/engine_configuration.cpp index 528d4747a0..15cdca39e2 100644 --- a/firmware/controllers/algo/engine_configuration.cpp +++ b/firmware/controllers/algo/engine_configuration.cpp @@ -66,6 +66,7 @@ #include "daihatsu.h" #include "chevrolet_camaro_4.h" #include "suzuki_vitara.h" +#include "chevrolet_c20_1973.h" EXTERN_ENGINE; @@ -799,6 +800,10 @@ void resetConfigurationExt(Logging * logger, engine_type_e engineType DECLARE_EN case CAMARO_4: setCamaro4(PASS_ENGINE_PARAMETER_F); break; + case CHEVY_C20_1973: + set1973c20(PASS_ENGINE_PARAMETER_F); + break; + default: warning(OBD_PCM_Processor_Fault, "Unexpected engine type: %d", engineType); diff --git a/firmware/controllers/algo/rusefi_enums.h b/firmware/controllers/algo/rusefi_enums.h index f08f92ad69..37b2ff859b 100644 --- a/firmware/controllers/algo/rusefi_enums.h +++ b/firmware/controllers/algo/rusefi_enums.h @@ -109,7 +109,9 @@ typedef enum { SUZUKI_VITARA = 36, - ET_UNUSED = 37, + CHEVY_C20_1973 = 37, + + ET_UNUSED = 38, Force_4b_engine_type = ENUM_32_BITS, } engine_type_e; diff --git a/firmware/controllers/settings.cpp b/firmware/controllers/settings.cpp index 51be282361..ac2062251a 100644 --- a/firmware/controllers/settings.cpp +++ b/firmware/controllers/settings.cpp @@ -184,6 +184,8 @@ const char* getConfigurationName(engine_type_e engineType) { return "SUZUKI_VITARA"; case CAMARO_4: return "CAMARO_4"; + case CHEVY_C20_1973: + return "CHEVY C20"; case GM_2_2: return "GM_2_2"; case DODGE_RAM: diff --git a/firmware/iar/ch.ewp b/firmware/iar/ch.ewp index 33ee82132b..517a53ec7f 100644 --- a/firmware/iar/ch.ewp +++ b/firmware/iar/ch.ewp @@ -1922,6 +1922,12 @@ $PROJ_DIR$\..\config\engines\bmw_e34.h + + $PROJ_DIR$\..\config\engines\chevrolet_c20_1973.cpp + + + $PROJ_DIR$\..\config\engines\chevrolet_c20_1973.h + $PROJ_DIR$\..\config\engines\chevrolet_camaro_4.cpp