auto-sync
This commit is contained in:
parent
760ac7850f
commit
cb07c7d50b
|
@ -2,6 +2,7 @@
|
|||
* @file citroenBerlingoTU3JP.cpp
|
||||
*
|
||||
* CITROEN_TU3JP: engine_type 15
|
||||
* Board pin out for Frankenstein
|
||||
*
|
||||
* This config overrides some values of the default configuration which is set by setDefaultConfiguration() method
|
||||
*
|
||||
|
@ -10,22 +11,73 @@
|
|||
* @author Andrey Belomutskiy, (c) 2012-2014
|
||||
*/
|
||||
|
||||
#include "thermistors.h"
|
||||
#include "citroenBerlingoTU3JP.h"
|
||||
|
||||
void setCitroenBerlingoTU3JPConfiguration(engine_configuration_s *engineConfiguration, board_configuration_s *boardConfiguration) {
|
||||
engineConfiguration->engineType = CITROEN_TU3JP;
|
||||
|
||||
// base engine setting
|
||||
engineConfiguration->triggerConfig.triggerType = TT_TOOTHED_WHEEL_60_2;
|
||||
|
||||
// set_cranking_injection_mode 0
|
||||
engineConfiguration->crankingInjectionMode = IM_SIMULTANEOUS;
|
||||
// set_injection_mode 2
|
||||
engineConfiguration->injectionMode = IM_BATCH;
|
||||
// set_ignition_mode 2
|
||||
engineConfiguration->ignitionMode = IM_WASTED_SPARK;
|
||||
// set_firing_order 2
|
||||
engineConfiguration->cylindersCount = 4;
|
||||
engineConfiguration->displacement = 1.390;
|
||||
engineConfiguration->firingOrder = FO_1_THEN_3_THEN_4_THEN2;
|
||||
engineConfiguration->ignitionMode = IM_WASTED_SPARK;
|
||||
engineConfiguration->injectionMode = IM_BATCH;
|
||||
engineConfiguration->crankingInjectionMode = IM_SIMULTANEOUS;
|
||||
|
||||
// rpm limiter
|
||||
engineConfiguration->rpmHardLimit = 5000;
|
||||
|
||||
// set thermistor
|
||||
setThermistorConfiguration(&engineConfiguration->cltThermistorConf, -40.0, 100700.0, 25.0, 2796.0, 100.0, 177.0);
|
||||
engineConfiguration->cltThermistorConf.bias_resistor = 2700; // eah winter is hard, sensor as LADA Samara :)
|
||||
|
||||
setThermistorConfiguration(&engineConfiguration->iatThermistorConf, -20.0, 15600.0, 23.0, 2250.0, 92.0, 240.0);
|
||||
engineConfiguration->iatThermistorConf.bias_resistor = 2700; // same as OEM ECU
|
||||
|
||||
/**
|
||||
* Outputs
|
||||
*/
|
||||
// Frankenstain low out #3: PE6 injector 1-4
|
||||
// Frankenstain low out #4: PC13 injector 2-3
|
||||
|
||||
// boardConfiguration->o2heaterPin = GPIOC_13;
|
||||
|
||||
boardConfiguration->injectionPins[0] = GPIOE_6;
|
||||
boardConfiguration->injectionPins[1] = GPIOC_13;
|
||||
boardConfiguration->injectionPins[2] = GPIO_NONE;
|
||||
boardConfiguration->injectionPins[3] = GPIO_NONE;
|
||||
|
||||
// boardConfiguration->ignitionPins[0] = GPIOE_NONE;
|
||||
// boardConfiguration->ignitionPins[1] = GPIO_NONE;
|
||||
// boardConfiguration->ignitionPins[2] = GPIO_NONE;
|
||||
// boardConfiguration->ignitionPins[3] = GPIO_NONE;
|
||||
|
||||
boardConfiguration->fuelPumpPin = GPIOE_3; // temporary value pin
|
||||
boardConfiguration->fuelPumpPinMode = OM_DEFAULT;
|
||||
|
||||
// boardConfiguration->logicAnalyzerPins[1] = GPIO_NONE;
|
||||
|
||||
// Frankenstein analog input #1: adc1
|
||||
// Frankenstein analog input #2: adc3
|
||||
// Frankenstein analog input #3: adc13
|
||||
// Frankenstein analog input #4: adc11
|
||||
// todo: see https://docs.google.com/spreadsheet/ccc?key=0Arl1FeMZcfisdEdGdUlHdWh6cVBoSzFIbkxqa1QtZ3c
|
||||
// Frankenstein analog input #5: adc
|
||||
// Frankenstein analog input #6: adc
|
||||
// Frankenstein analog input #7: adc
|
||||
// Frankenstein analog input #8: adc
|
||||
// Frankenstein analog input #9: adc
|
||||
// Frankenstein analog input #10: adc
|
||||
// Frankenstein analog input #11: adc
|
||||
// Frankenstein analog input #12: adc
|
||||
engineConfiguration->mafAdcChannel = EFI_ADC_1;
|
||||
engineConfiguration->tpsAdcChannel = EFI_ADC_3;
|
||||
engineConfiguration->cltAdcChannel = EFI_ADC_11;
|
||||
|
||||
engineConfiguration->map.sensor.sensorType = MT_CUSTOM;
|
||||
engineConfiguration->map.sensor.customValueAt0 = 20;
|
||||
engineConfiguration->map.sensor.customValueAt5 = 200;
|
||||
}
|
||||
|
||||
|
|
|
@ -71,6 +71,7 @@ static void common079721_2351(engine_configuration_s *engineConfiguration, board
|
|||
// Frankenstein analog input #2: adc3
|
||||
// Frankenstein analog input #3: adc13
|
||||
// Frankenstein analog input #4: adc11
|
||||
// todo: see https://docs.google.com/spreadsheet/ccc?key=0Arl1FeMZcfisdEdGdUlHdWh6cVBoSzFIbkxqa1QtZ3c
|
||||
// Frankenstein analog input #5: adc
|
||||
// Frankenstein analog input #6: adc
|
||||
// Frankenstein analog input #7: adc
|
||||
|
|
|
@ -232,8 +232,8 @@ void setDefaultConfiguration(engine_configuration_s *engineConfiguration, board_
|
|||
engineConfiguration->map.sensor.sensorType = MT_MPX4250;
|
||||
|
||||
engineConfiguration->baroSensor.sensorType = MT_CUSTOM;
|
||||
engineConfiguration->baroSensor.Min = 0;
|
||||
engineConfiguration->baroSensor.Max = 500;
|
||||
engineConfiguration->baroSensor.customValueAt0 = 0;
|
||||
engineConfiguration->baroSensor.customValueAt5 = 500;
|
||||
|
||||
engineConfiguration->diffLoadEnrichmentCoef = 1;
|
||||
|
||||
|
|
|
@ -30,7 +30,7 @@ float decodePressure(float voltage, air_pressure_sensor_config_s * config) {
|
|||
switch (config->sensorType) {
|
||||
case MT_CUSTOM:
|
||||
// todo: introduce 'FastInterpolation customMap'
|
||||
return interpolate(0, config->Min, 5, config->Max, voltage);
|
||||
return interpolate(0, config->customValueAt0, 5, config->customValueAt5, voltage);
|
||||
case MT_DENSO183:
|
||||
return denso183.getValue(voltage);
|
||||
case MT_MPX4250:
|
||||
|
|
|
@ -17,8 +17,11 @@ typedef struct {
|
|||
/**
|
||||
* kPa value at zero volts
|
||||
*/
|
||||
float Min;
|
||||
float Max;
|
||||
float customValueAt0;
|
||||
/**
|
||||
* kPa value at 5 volts
|
||||
*/
|
||||
float customValueAt5;
|
||||
air_pressure_sensor_type_e sensorType;
|
||||
adc_channel_e hwChannel;
|
||||
} air_pressure_sensor_config_s;
|
||||
|
|
|
@ -314,12 +314,12 @@ static void printMAPInfo(void) {
|
|||
scheduleMsg(&logger, "map type=%d raw=%f MAP=%f", engineConfiguration->map.sensor.sensorType, getRawMap(),
|
||||
getMap());
|
||||
if (engineConfiguration->map.sensor.sensorType == MT_CUSTOM) {
|
||||
scheduleMsg(&logger, "min=%f max=%f", engineConfiguration->map.sensor.Min, engineConfiguration->map.sensor.Max);
|
||||
scheduleMsg(&logger, "at0=%f at5=%f", engineConfiguration->map.sensor.customValueAt0, engineConfiguration->map.sensor.customValueAt5);
|
||||
}
|
||||
|
||||
scheduleMsg(&logger, "baro type=%d value=%f", engineConfiguration->baroSensor.sensorType, getBaroPressure());
|
||||
if (engineConfiguration->baroSensor.sensorType == MT_CUSTOM) {
|
||||
scheduleMsg(&logger, "min=%f max=%f", engineConfiguration->baroSensor.Min, engineConfiguration->baroSensor.Max);
|
||||
scheduleMsg(&logger, "min=%f max=%f", engineConfiguration->baroSensor.customValueAt0, engineConfiguration->baroSensor.customValueAt5);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
|
|
@ -229,5 +229,5 @@ void firmwareError(const char *fmt, ...) {
|
|||
}
|
||||
|
||||
int getRusEfiVersion(void) {
|
||||
return 20140901;
|
||||
return 20140903;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue