Line |
Branch |
Decision |
Exec |
Source |
1 |
|
|
|
#include "pch.h" |
2 |
|
|
|
#include "defaults.h" |
3 |
|
|
|
#include "honda_obd1_canned_tables.cpp" |
4 |
|
|
|
|
5 |
|
|
|
#ifdef HW_HELLEN_UAEFI |
6 |
|
|
|
#include "hellen_meta.h" |
7 |
|
|
|
#endif // HW_HELLEN_UAEFI |
8 |
|
|
|
|
9 |
|
|
✗ |
void setHondaObd1() { |
10 |
|
|
✗ |
strcpy(engineConfiguration->engineMake, ENGINE_MAKE_HONDA); |
11 |
|
|
|
|
12 |
|
|
✗ |
engineConfiguration->trigger.type = trigger_type_e::TT_12_TOOTH_CRANK; // 12 crank same as 24 cam |
13 |
|
|
✗ |
engineConfiguration->vvtMode[0] = VVT_SINGLE_TOOTH; |
14 |
|
|
|
|
15 |
|
|
✗ |
engineConfiguration->map.sensor.type = MT_DENSO183; |
16 |
|
|
✗ |
engineConfiguration->ignitionMode = IM_ONE_COIL; |
17 |
|
|
|
|
18 |
|
|
✗ |
engineConfiguration->injectorCompensationMode = ICM_FixedRailPressure; |
19 |
|
|
✗ |
engineConfiguration->fuelReferencePressure = 294; |
20 |
|
|
|
|
21 |
|
|
✗ |
engineConfiguration->tpsMin = 124; |
22 |
|
|
✗ |
engineConfiguration->tpsMax = 919; |
23 |
|
|
✗ |
engineConfiguration->fan1ExtraIdle = 10; |
24 |
|
|
✗ |
engineConfiguration->injector.flow = 240; |
25 |
|
|
✗ |
engineConfiguration->mapErrorDetectionTooHigh = 250; |
26 |
|
|
|
|
27 |
|
|
|
// we expect end users to use timing light to validate specific vehicle! |
28 |
|
|
✗ |
engineConfiguration->globalTriggerAngleOffset = 80; |
29 |
|
|
|
|
30 |
|
|
|
// what's average displacement for Honda OBD1? :) |
31 |
|
|
✗ |
engineConfiguration->displacement = 1.645; |
32 |
|
|
|
|
33 |
|
|
|
// Keihin 06164-P0A-A00 |
34 |
|
|
✗ |
engineConfiguration->injector.flow = 248; |
35 |
|
|
|
|
36 |
|
|
|
// Disable ETBs |
37 |
|
|
✗ |
engineConfiguration->etbFunctions[0] = dc_function_e::DC_None; |
38 |
|
|
✗ |
engineConfiguration->etbFunctions[1] = dc_function_e::DC_None; |
39 |
|
|
|
|
40 |
|
|
|
// ECU does not control main relay |
41 |
|
|
✗ |
engineConfiguration->mainRelayPin = Gpio::Unassigned; |
42 |
|
|
|
|
43 |
|
|
|
#ifdef HW_HELLEN_UAEFI |
44 |
|
|
|
#if (IGN_LOAD_COUNT == 16) && (IGN_RPM_COUNT == 16) && (FUEL_LOAD_COUNT == 16) && (FUEL_RPM_COUNT == 16) |
45 |
|
|
|
cannedignitionTable(); |
46 |
|
|
|
#endif |
47 |
|
|
|
#endif // HW_HELLEN_UAEFI |
48 |
|
|
|
|
49 |
|
|
✗ |
strcpy(engineConfiguration->gpPwmNote[0], "VTC"); |
50 |
|
|
✗ |
gppwm_channel *vtcControl = &engineConfiguration->gppwm[0]; |
51 |
|
|
✗ |
vtcControl->loadAxis = GPPWM_Map; |
52 |
|
|
✗ |
vtcControl->pwmFrequency = 0; |
53 |
|
|
|
#ifdef HW_HELLEN_UAEFI |
54 |
|
|
|
// Honda ICM is weird it fires spark on RAISING edge and has internal pull-up |
55 |
|
|
|
// thus we use a low side output to drive OEM ignition |
56 |
|
|
|
engineConfiguration->ignitionPins[0] = Gpio::MM100_IGN7; // low side! |
57 |
|
|
|
|
58 |
|
|
|
engineConfiguration->idle.solenoidPin = Gpio::MM100_INJ8; |
59 |
|
|
|
engineConfiguration->malfunctionIndicatorPin = Gpio::MM100_INJ7; |
60 |
|
|
|
engineConfiguration->acRelayPin = Gpio::MM100_OUT_PWM1; |
61 |
|
|
|
|
62 |
|
|
|
engineConfiguration->camInputs[0] = Gpio::MM100_UART8_RX; // "C18 VR1+ Discrete" |
63 |
|
|
|
engineConfiguration->camInputs[1] = Gpio::Unassigned; |
64 |
|
|
|
|
65 |
|
|
|
engineConfiguration->tps1_2AdcChannel = EFI_ADC_NONE; |
66 |
|
|
|
setPPSInputs(EFI_ADC_NONE, EFI_ADC_NONE); |
67 |
|
|
|
vtcControl->pin = Gpio::MM100_IGN6; |
68 |
|
|
|
#endif // HW_HELLEN_UAEFI |
69 |
|
|
✗ |
} |
70 |
|
|
|
|