87 lines
2.7 KiB
C++
87 lines
2.7 KiB
C++
/**
|
|
* @file mitsubishi.cpp
|
|
*
|
|
* MITSU_4G93 16
|
|
*
|
|
* @date Aug 5, 2014
|
|
* @author Andrey Belomutskiy, (c) 2012-2014
|
|
*/
|
|
|
|
#include "mitsubishi.h"
|
|
#include "allsensors.h"
|
|
|
|
void setMitsubishiConfiguration(engine_configuration_s *engineConfiguration, board_configuration_s *boardConfiguration) {
|
|
engineConfiguration->engineType = MITSU_4G93;
|
|
|
|
engineConfiguration->triggerConfig.triggerType = TT_MITSU;
|
|
|
|
engineConfiguration->cylindersCount = 4;
|
|
engineConfiguration->displacement = 1.800;
|
|
|
|
// set_ignition_mode 2
|
|
engineConfiguration->ignitionMode = IM_WASTED_SPARK;
|
|
engineConfiguration->firingOrder = FO_1_THEN_3_THEN_4_THEN2;
|
|
|
|
// set_global_trigger_offset_angle 671
|
|
engineConfiguration->globalTriggerAngleOffset = 671;
|
|
|
|
// set_cranking_rpm 550
|
|
engineConfiguration->crankingSettings.crankingRpm = 550;
|
|
// set_cranking_charge_angle 70
|
|
engineConfiguration->crankingChargeAngle = 70;
|
|
// set_cranking_timing_angle 715
|
|
engineConfiguration->crankingTimingAngle = 715;
|
|
|
|
// set_whole_fuel_map 3
|
|
setWholeFuelMap(engineConfiguration, 3);
|
|
|
|
// set_cranking_fuel 4
|
|
engineConfiguration->crankingSettings.baseCrankingFuel = 4;
|
|
|
|
// /**
|
|
// * 29150 Ohm @ 40C
|
|
// * 10160 Ohm @ 70C
|
|
// * 1270 Ohm @ 150C
|
|
// */
|
|
// setThermistorConfiguration(&engineConfiguration->cltThermistorConf, 40, 29150, 70, 10160, 150, 1270);
|
|
|
|
setCommonNTCSensor(&engineConfiguration->cltThermistorConf);
|
|
|
|
|
|
engineConfiguration->cltThermistorConf.bias_resistor = 2700;
|
|
|
|
// Frankenstein: low side - inj #1: PC14
|
|
// Frankenstein: low side - inj #2: PC15
|
|
// Frankenstein: low side - inj #3: PE6
|
|
// Frankenstein: low side - inj #4: PC13
|
|
// Frankenstein: low side - inj #5: PE4
|
|
// Frankenstein: low side - inj #6: PE5
|
|
// Frankenstein: low side - inj #7: PE2
|
|
// Frankenstein: low side - inj #8: PE3
|
|
// Frankenstein: low side - inj #9: PE0
|
|
// Frankenstein: low side - inj #10: PE1
|
|
// Frankenstein: low side - inj #11: PB8
|
|
// Frankenstein: low side - inj #12: PB9
|
|
|
|
boardConfiguration->injectionPins[0] = GPIOB_9; // Frankenstein: low side - inj #12
|
|
boardConfiguration->injectionPins[1] = GPIOB_8; // Frankenstein: low side - inj #11
|
|
boardConfiguration->injectionPins[2] = GPIOE_3; // Frankenstein: low side - inj #8
|
|
boardConfiguration->injectionPins[3] = GPIOE_5; // Frankenstein: low side - inj #6
|
|
|
|
|
|
// Frankenstein: high side #1: PE8
|
|
// Frankenstein: high side #2: PE10
|
|
|
|
boardConfiguration->ignitionPins[0] = GPIOE_8; // Frankenstein: high side #1
|
|
boardConfiguration->ignitionPins[1] = GPIO_NONE;
|
|
boardConfiguration->ignitionPins[2] = GPIOE_10; // // Frankenstein: high side #2
|
|
boardConfiguration->ignitionPins[3] = GPIO_NONE;
|
|
|
|
engineConfiguration->HD44780width = 20;
|
|
engineConfiguration->HD44780height = 4;
|
|
|
|
initEgoSensor(&engineConfiguration->afrSensor, ES_Innovate_MTX_L);
|
|
}
|
|
|
|
|