rusEFI
The most advanced open source ECU
Loading...
Searching...
No Matches
Functions
honda_k_dbc.cpp File Reference

Functions

void setHondaK ()
 
void setProteusHondaOBD2A ()
 

Function Documentation

◆ setHondaK()

void setHondaK ( )

K24A4 engine HONDA_K

Definition at line 15 of file honda_k_dbc.cpp.

15 {
18 engineConfiguration->firingOrder = FO_1_3_4_2;
19 engineConfiguration->engineSyncCam = SC_Exhaust_First;
22 int magic = 0; // note that offset and VVT are related
24
25 // VVT is here just single tooth? and we do not even use it!?
26 engineConfiguration->vvtMode[0] = VVT_HONDA_K_INTAKE;
27 // also known as 'CAM sync'? i am pretty confused at this point
28 engineConfiguration->vvtMode[1] = VVT_HONDA_K_EXHAUST;
30 engineConfiguration->vvtOffsets[1] = 183 + magic;
31
32 // set cranking_fuel 15
34
35 engineConfiguration->map.sensor.type = MT_DENSO183;
36// todo: quote some source?
39 engineConfiguration->injectorCompensationMode = ICM_FixedRailPressure;
40 engineConfiguration->fuelReferencePressure = 350; // TODO: what is real value?!
41
42 engineConfiguration->ignitionMode = IM_INDIVIDUAL_COILS;
44 engineConfiguration->injectionMode = IM_SEQUENTIAL;
45
47 static const uint16_t defaultPostCrankinDurationBins[] = {
48 0, 65, 100, 125, 150, 250
49 };
50 copyArray(config->postCrankingDurationBins, defaultPostCrankinDurationBins);
53
54 strcpy(engineConfiguration->engineMake, ENGINE_MAKE_HONDA);
55 strcpy(engineConfiguration->engineCode, "K24");
56
59
61
62 gppwm_channel *vtsControl = &engineConfiguration->gppwm[0];
63 vtsControl->pwmFrequency = 0;
64#if EFI_SIMULATOR
65 // simulator canned config XML toolset cares to see perfect empty memory region
66 memset(engineConfiguration->gpPwmNote[0], 0, sizeof(gppwm_note_t));
67#endif
68 strcpy(engineConfiguration->gpPwmNote[0], "VTS");
69
70/**
71 * K24A4 engine
72 * HONDA_K
73 */
74
75#if HW_PROTEUS & EFI_PROD_CODE
76 strcpy(engineConfiguration->vehicleName, "test");
77// engineConfiguration->triggerInputPins[0] = PROTEUS_DIGITAL_2; // crank
78// engineConfiguration->camInputs[0] = PROTEUS_DIGITAL_4; // intake
79// engineConfiguration->camInputs[1 * CAMS_PER_BANK] = PROTEUS_DIGITAL_1; // exhaust
80
81 engineConfiguration->triggerInputPins[0] = PROTEUS_DIGITAL_1; // exhaust
82 engineConfiguration->camInputs[0] = PROTEUS_DIGITAL_4; // intake
83// inverted
84 // offset -41
85
86
87 engineConfiguration->injectionPins[0] = Gpio::PROTEUS_LS_8;
88 engineConfiguration->injectionPins[1] = Gpio::PROTEUS_LS_7;
89 engineConfiguration->injectionPins[2] = Gpio::PROTEUS_LS_6;
90 engineConfiguration->injectionPins[3] = Gpio::PROTEUS_LS_5;
91
92 vtsControl->pin = Gpio::PROTEUS_HS_1;
93 engineConfiguration->vvtPins[0] = Gpio::PROTEUS_HS_2;
94
95 engineConfiguration->malfunctionIndicatorPin = Gpio::PROTEUS_LS_10;
96 engineConfiguration->idle.solenoidPin = Gpio::PROTEUS_LS_15;
97 engineConfiguration->fanPin = Gpio::PROTEUS_LS_1;
98
99 engineConfiguration->iat.adcChannel = PROTEUS_IN_ANALOG_TEMP_1;
100 engineConfiguration->clt.adcChannel = PROTEUS_IN_ANALOG_TEMP_2;
101 engineConfiguration->tps1_1AdcChannel = PROTEUS_IN_ANALOG_VOLT_3;
102 engineConfiguration->map.sensor.hwChannel = PROTEUS_IN_ANALOG_VOLT_6;
104
105 engineConfiguration->mainRelayPin = Gpio::PROTEUS_LS_9;
106 engineConfiguration->fuelPumpPin = Gpio::PROTEUS_LS_11;
107
108#endif // HW_PROTEUS
109}
@ Unassigned
static constexpr persistent_config_s * config
static constexpr engine_configuration_s * engineConfiguration
char[GPPWM_NOTE_SIZE] gppwm_note_t
brain_input_pin_e triggerInputPins[TRIGGER_INPUT_PIN_COUNT]
float crankingCycleBaseFuel[CRANKING_CYCLE_CLT_SIZE][CRANKING_CURVE_SIZE]
float postCrankingFactor[CRANKING_ENRICH_CLT_COUNT][CRANKING_ENRICH_COUNT]
constexpr void setTable(TElement(&dest)[N][M], const VElement value)
void setArrayValues(TValue(&array)[TSize], float value)

Referenced by applyEngineType(), and hellen_honda_k_boardDefaultConfiguration().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ setProteusHondaOBD2A()

void setProteusHondaOBD2A ( )

Definition at line 111 of file honda_k_dbc.cpp.

111 {
112
113}

Referenced by applyEngineType().

Here is the caller graph for this function:

Go to the source code of this file.