2015-07-10 06:01:56 -07:00
|
|
|
/*
|
|
|
|
* @file dodge_ram.cpp
|
|
|
|
*
|
2017-01-06 07:04:41 -08:00
|
|
|
* set engine_type 31
|
2015-07-10 06:01:56 -07:00
|
|
|
*
|
|
|
|
* @date Apr 22, 2015
|
2018-01-20 17:42:19 -08:00
|
|
|
* @author Andrey Belomutskiy, (c) 2012-2018
|
2015-07-10 06:01:56 -07:00
|
|
|
*/
|
|
|
|
|
2018-09-16 19:25:17 -07:00
|
|
|
#include "global.h"
|
2015-07-10 06:01:56 -07:00
|
|
|
#include "dodge_ram.h"
|
|
|
|
#include "custom_engine.h"
|
|
|
|
#include "allsensors.h"
|
2016-01-08 12:01:38 -08:00
|
|
|
#include "engine_math.h"
|
2015-07-10 06:01:56 -07:00
|
|
|
|
|
|
|
EXTERN_ENGINE
|
|
|
|
;
|
|
|
|
|
2017-05-15 20:28:49 -07:00
|
|
|
void setDodgeRam1996(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
|
|
|
|
setCustomEngineConfiguration(PASS_ENGINE_PARAMETER_SIGNATURE);
|
2015-07-10 06:01:56 -07:00
|
|
|
|
|
|
|
setOperationMode(engineConfiguration, FOUR_STROKE_CAM_SENSOR);
|
|
|
|
engineConfiguration->trigger.type = TT_DODGE_RAM;
|
|
|
|
engineConfiguration->injector.flow = 243.6; // 23.2lb/h
|
|
|
|
engineConfiguration->map.sensor.type = MT_DODGE_NEON_2003;
|
2019-01-10 16:25:07 -08:00
|
|
|
setAlgorithm(LM_SPEED_DENSITY PASS_CONFIG_PARAMETER_SUFFIX);
|
2015-07-10 06:01:56 -07:00
|
|
|
|
2017-01-06 06:03:33 -08:00
|
|
|
// set cranking_charge_angle 30
|
2015-07-10 06:01:56 -07:00
|
|
|
engineConfiguration->crankingChargeAngle = 30;
|
|
|
|
|
|
|
|
// set_whole_fuel_map 6
|
2019-01-10 14:07:29 -08:00
|
|
|
setWholeFuelMap(6 PASS_CONFIG_PARAMETER_SUFFIX);
|
2015-07-10 06:01:56 -07:00
|
|
|
|
|
|
|
//Base engine setting
|
|
|
|
engineConfiguration->specs.cylindersCount = 8;
|
|
|
|
engineConfiguration->specs.firingOrder = FO_1_8_4_3_6_5_7_2;
|
|
|
|
engineConfiguration->specs.displacement = 5.2;
|
|
|
|
|
2019-01-09 21:56:08 -08:00
|
|
|
boardConfiguration->triggerInputPins[0] = GPIOC_6;
|
|
|
|
boardConfiguration->triggerInputPins[1] = GPIOA_5;
|
2015-07-10 06:01:56 -07:00
|
|
|
|
2019-01-09 21:56:08 -08:00
|
|
|
boardConfiguration->injectionPins[0] = GPIOE_2;
|
|
|
|
boardConfiguration->injectionPins[1] = GPIOB_9;
|
|
|
|
boardConfiguration->injectionPins[2] = GPIOD_5;
|
|
|
|
boardConfiguration->injectionPins[3] = GPIOB_8;
|
2015-07-10 06:01:56 -07:00
|
|
|
|
2019-01-09 21:56:08 -08:00
|
|
|
boardConfiguration->injectionPins[4] = GPIOB_7;
|
|
|
|
boardConfiguration->injectionPins[5] = GPIOE_3;
|
|
|
|
boardConfiguration->injectionPins[6] = GPIOE_4;
|
|
|
|
boardConfiguration->injectionPins[7] = GPIOD_3;
|
2015-07-10 06:01:56 -07:00
|
|
|
|
2019-01-09 21:56:08 -08:00
|
|
|
boardConfiguration->ignitionPins[0] = GPIOC_9;
|
|
|
|
boardConfiguration->ignitionPins[1] = GPIO_UNASSIGNED;
|
|
|
|
boardConfiguration->ignitionPins[2] = GPIO_UNASSIGNED;
|
|
|
|
boardConfiguration->ignitionPins[3] = GPIO_UNASSIGNED;
|
2015-07-10 06:01:56 -07:00
|
|
|
|
2019-01-09 21:56:08 -08:00
|
|
|
boardConfiguration->mainRelayPin = GPIOE_5;
|
|
|
|
boardConfiguration->fuelPumpPin = GPIOE_6;
|
|
|
|
boardConfiguration->fanPin = GPIO_UNASSIGNED;
|
2015-07-10 06:01:56 -07:00
|
|
|
|
|
|
|
engineConfiguration->engineChartSize = 450;
|
|
|
|
|
|
|
|
|
2017-01-06 07:04:41 -08:00
|
|
|
// set global_trigger_offset_angle -50
|
2015-07-10 06:01:56 -07:00
|
|
|
engineConfiguration->globalTriggerAngleOffset = -50;
|
|
|
|
|
|
|
|
// set_global_fuel_correction 1
|
|
|
|
|
|
|
|
// set_whole_timing_map 10
|
2019-01-10 18:10:46 -08:00
|
|
|
setWholeTimingTable_d(10 PASS_CONFIG_PARAMETER_SUFFIX);
|
2015-07-10 06:01:56 -07:00
|
|
|
|
|
|
|
|
2019-01-09 21:56:08 -08:00
|
|
|
boardConfiguration->alternatorControlPin = GPIOD_7;
|
2015-11-11 20:01:18 -08:00
|
|
|
engineConfiguration->alternatorControl.pFactor = 22;
|
2015-07-10 06:01:56 -07:00
|
|
|
|
2019-01-09 21:56:08 -08:00
|
|
|
boardConfiguration->idle.solenoidPin = GPIOC_13;
|
|
|
|
boardConfiguration->idle.solenoidFrequency = 300;
|
2015-07-10 06:01:56 -07:00
|
|
|
|
|
|
|
engineConfiguration->vbattAdcChannel = EFI_ADC_14;
|
|
|
|
// engineConfiguration->vbattDividerCoeff = ((float) (8.93 + 41.27)) / 8.93 * 2;
|
|
|
|
engineConfiguration->vbattDividerCoeff = 9.6;
|
|
|
|
|
|
|
|
setDodgeSensor(&engineConfiguration->clt);
|
|
|
|
engineConfiguration->clt.config.bias_resistor = 2700;
|
|
|
|
|
|
|
|
setDodgeSensor(&engineConfiguration->iat);
|
|
|
|
engineConfiguration->iat.config.bias_resistor = 2700;
|
|
|
|
|
2019-01-09 21:56:08 -08:00
|
|
|
boardConfiguration->useStepperIdle = true;
|
2015-07-10 06:01:56 -07:00
|
|
|
}
|