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
|
2018-01-20 17:42:19 -08:00
|
|
|
* @author Andrey Belomutskiy, (c) 2012-2018
|
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"
|
|
|
|
|
2015-10-16 12:02:24 -07:00
|
|
|
|
|
|
|
EXTERN_ENGINE
|
|
|
|
;
|
|
|
|
|
2017-05-15 20:28:49 -07:00
|
|
|
void setCamaro4(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
|
|
|
|
setCustomEngineConfiguration(PASS_ENGINE_PARAMETER_SIGNATURE);
|
2017-01-28 12:05:25 -08:00
|
|
|
|
|
|
|
|
2017-05-15 20:28:49 -07:00
|
|
|
setAlgorithm(LM_SPEED_DENSITY PASS_ENGINE_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;
|
|
|
|
|
2016-05-27 20:02:16 -07:00
|
|
|
engineConfiguration->specs.firingOrder = FO_1_8_7_2_6_5_4_3;
|
2019-01-09 20:38:59 -08:00
|
|
|
CONFIGB(triggerInputPins)[0] = GPIOA_5;
|
|
|
|
CONFIGB(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
|
|
|
|
2016-05-27 21:01:41 -07:00
|
|
|
engineConfiguration->tpsAdcChannel = EFI_ADC_2;
|
|
|
|
|
2016-06-09 18:02:10 -07:00
|
|
|
// todo: move this into trigger definition
|
2017-01-06 07:04:41 -08:00
|
|
|
// set global_trigger_offset_angle 230
|
2016-06-09 18:02:10 -07:00
|
|
|
engineConfiguration->globalTriggerAngleOffset = 230;
|
|
|
|
|
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-01-09 20:38:59 -08:00
|
|
|
CONFIGB(idle).solenoidPin = GPIO_UNASSIGNED;
|
|
|
|
CONFIGB(fuelPumpPin) = GPIO_UNASSIGNED;
|
2017-01-28 12:05:25 -08:00
|
|
|
|
2019-01-09 20:38:59 -08:00
|
|
|
CONFIGB(injectionPins)[0] = GPIOE_6;
|
|
|
|
CONFIGB(injectionPins)[1] = GPIOE_5;
|
|
|
|
CONFIGB(injectionPins)[2] = GPIOD_7;
|
|
|
|
CONFIGB(injectionPins)[3] = GPIOC_13;
|
|
|
|
CONFIGB(injectionPins)[4] = GPIOE_3;
|
|
|
|
CONFIGB(injectionPins)[5] = GPIOE_4;
|
|
|
|
CONFIGB(injectionPins)[6] = GPIOD_3;
|
|
|
|
CONFIGB(injectionPins)[7] = GPIOE_2;
|
2016-06-10 22:02:20 -07:00
|
|
|
|
|
|
|
|
2019-01-09 20:38:59 -08:00
|
|
|
CONFIGB(ignitionPins)[0] = GPIOC_9;
|
|
|
|
CONFIGB(ignitionPins)[1] = GPIOC_7;
|
|
|
|
CONFIGB(ignitionPins)[2] = GPIOE_14;
|
|
|
|
CONFIGB(ignitionPins)[3] = GPIOE_12;
|
|
|
|
CONFIGB(ignitionPins)[4] = GPIOE_10;
|
|
|
|
CONFIGB(ignitionPins)[5] = GPIOE_8;
|
|
|
|
CONFIGB(ignitionPins)[6] = GPIOD_9;
|
|
|
|
CONFIGB(ignitionPins)[7] = GPIOD_8;
|
2016-06-10 22:02:20 -07:00
|
|
|
|
2019-01-09 20:38:59 -08:00
|
|
|
CONFIGB(fuelPumpPin) = GPIOB_8;
|
|
|
|
CONFIGB(fanPin) = GPIO_UNASSIGNED;
|
|
|
|
CONFIGB(mainRelayPin) = GPIOD_5;
|
2015-10-16 12:02:24 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
|