2015-10-16 12:02:24 -07:00
|
|
|
/*
|
|
|
|
* @file chevrolet_camaro_4.cpp
|
|
|
|
*
|
2018-10-28 14:11:37 -07:00
|
|
|
* CAMARO_4
|
2017-01-06 07:04:41 -08:00
|
|
|
* set engine_type 35
|
2015-10-16 13:01:21 -07:00
|
|
|
*
|
2015-10-16 12:02:24 -07:00
|
|
|
* @date Oct 16, 2015
|
2020-01-13 18:57:43 -08:00
|
|
|
* @author Andrey Belomutskiy, (c) 2012-2020
|
2015-10-16 12:02:24 -07:00
|
|
|
*/
|
|
|
|
|
|
|
|
#include "chevrolet_camaro_4.h"
|
2016-06-10 22:02:20 -07:00
|
|
|
#include "engine_math.h"
|
2017-01-28 12:05:25 -08:00
|
|
|
#include "custom_engine.h"
|
|
|
|
|
2019-05-03 15:41:43 -07:00
|
|
|
EXTERN_CONFIG;
|
2015-10-16 12:02:24 -07:00
|
|
|
|
2019-05-03 15:41:43 -07:00
|
|
|
void setCamaro4(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
|
2019-08-06 14:12:15 -07:00
|
|
|
setFrankensoConfiguration(PASS_CONFIG_PARAMETER_SIGNATURE);
|
2017-01-28 12:05:25 -08:00
|
|
|
|
|
|
|
|
2019-01-10 16:25:07 -08:00
|
|
|
setAlgorithm(LM_SPEED_DENSITY PASS_CONFIG_PARAMETER_SUFFIX);
|
2015-10-16 12:02:24 -07:00
|
|
|
|
2015-10-16 13:01:21 -07:00
|
|
|
engineConfiguration->specs.displacement = 5.7;
|
|
|
|
engineConfiguration->specs.cylindersCount = 8;
|
2020-05-08 14:31:03 -07:00
|
|
|
strcpy(CONFIG(engineMake), ENGINE_MAKE_GM);
|
2015-10-16 13:01:21 -07:00
|
|
|
|
2016-05-27 20:02:16 -07:00
|
|
|
engineConfiguration->specs.firingOrder = FO_1_8_7_2_6_5_4_3;
|
2019-12-11 14:48:55 -08:00
|
|
|
engineConfiguration->triggerInputPins[0] = GPIOA_5;
|
|
|
|
engineConfiguration->triggerInputPins[1] = GPIOC_6;
|
2016-06-09 18:02:10 -07:00
|
|
|
|
2016-06-10 22:02:20 -07:00
|
|
|
engineConfiguration->injectionMode = IM_BATCH;
|
|
|
|
engineConfiguration->twoWireBatchInjection = true;
|
2017-01-06 06:03:33 -08:00
|
|
|
// set ignition_mode 2
|
2016-06-06 21:02:45 -07:00
|
|
|
engineConfiguration->ignitionMode = IM_WASTED_SPARK;
|
2016-05-27 20:02:16 -07:00
|
|
|
|
|
|
|
setOperationMode(engineConfiguration, FOUR_STROKE_CRANK_SENSOR);
|
|
|
|
engineConfiguration->trigger.type = TT_GM_LS_24;
|
|
|
|
|
2016-05-27 19:02:56 -07:00
|
|
|
engineConfiguration->map.sensor.hwChannel = EFI_ADC_0; // PA0
|
|
|
|
|
|
|
|
engineConfiguration->mafAdcChannel = EFI_ADC_NONE;
|
2016-12-17 06:02:59 -08:00
|
|
|
|
2016-05-27 19:02:56 -07:00
|
|
|
|
2019-06-30 11:28:47 -07:00
|
|
|
engineConfiguration->tps1_1AdcChannel = EFI_ADC_2;
|
2016-05-27 21:01:41 -07:00
|
|
|
|
2016-06-09 18:02:10 -07:00
|
|
|
// todo: move this into trigger definition
|
2019-10-05 05:27:30 -07:00
|
|
|
// set global_trigger_offset_angle 50
|
|
|
|
engineConfiguration->globalTriggerAngleOffset = 50;
|
2016-06-09 18:02:10 -07:00
|
|
|
|
2016-06-10 22:02:20 -07:00
|
|
|
engineConfiguration->iat.adcChannel = EFI_ADC_11;
|
|
|
|
|
|
|
|
engineConfiguration->clt.adcChannel = EFI_ADC_12;
|
|
|
|
engineConfiguration->clt.config.bias_resistor = 2700;
|
|
|
|
|
|
|
|
engineConfiguration->vbattAdcChannel = EFI_ADC_14;
|
|
|
|
|
|
|
|
engineConfiguration->afr.hwChannel = EFI_ADC_13;
|
2016-12-17 06:02:59 -08:00
|
|
|
|
2016-06-10 22:02:20 -07:00
|
|
|
|
2019-12-11 14:48:55 -08:00
|
|
|
engineConfiguration->idle.solenoidPin = GPIO_UNASSIGNED;
|
|
|
|
engineConfiguration->fuelPumpPin = GPIO_UNASSIGNED;
|
2017-01-28 12:05:25 -08:00
|
|
|
|
2019-12-11 14:48:55 -08:00
|
|
|
engineConfiguration->injectionPins[0] = GPIOE_6;
|
|
|
|
engineConfiguration->injectionPins[1] = GPIOE_5;
|
|
|
|
engineConfiguration->injectionPins[2] = GPIOD_7;
|
|
|
|
engineConfiguration->injectionPins[3] = GPIOC_13;
|
|
|
|
engineConfiguration->injectionPins[4] = GPIOE_3;
|
|
|
|
engineConfiguration->injectionPins[5] = GPIOE_4;
|
|
|
|
engineConfiguration->injectionPins[6] = GPIOD_3;
|
|
|
|
engineConfiguration->injectionPins[7] = GPIOE_2;
|
2016-06-10 22:02:20 -07:00
|
|
|
|
|
|
|
|
2019-12-11 14:48:55 -08:00
|
|
|
engineConfiguration->ignitionPins[0] = GPIOC_9;
|
|
|
|
engineConfiguration->ignitionPins[1] = GPIOC_7;
|
|
|
|
engineConfiguration->ignitionPins[2] = GPIOE_14;
|
|
|
|
engineConfiguration->ignitionPins[3] = GPIOE_12;
|
|
|
|
engineConfiguration->ignitionPins[4] = GPIOE_10;
|
|
|
|
engineConfiguration->ignitionPins[5] = GPIOE_8;
|
|
|
|
engineConfiguration->ignitionPins[6] = GPIOD_9;
|
|
|
|
engineConfiguration->ignitionPins[7] = GPIOD_8;
|
2016-06-10 22:02:20 -07:00
|
|
|
|
2019-12-11 14:48:55 -08:00
|
|
|
engineConfiguration->fuelPumpPin = GPIOB_8;
|
|
|
|
engineConfiguration->fanPin = GPIO_UNASSIGNED;
|
|
|
|
engineConfiguration->mainRelayPin = GPIOD_5;
|
2015-10-16 12:02:24 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
|