2021-10-02 10:25:40 -07:00
|
|
|
/*
|
|
|
|
* honda_k_dbc.cpp
|
|
|
|
*
|
|
|
|
* @date Oct 2, 2021
|
|
|
|
* @author Andrey Belomutskiy, (c) 2012-2021
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include "honda_k_dbc.h"
|
|
|
|
|
2021-10-12 15:24:45 -07:00
|
|
|
#if HW_PROTEUS & EFI_PROD_CODE
|
|
|
|
#include "proteus_meta.h"
|
2021-10-23 13:19:28 -07:00
|
|
|
#endif // HW_PROTEUS
|
2021-10-12 15:24:45 -07:00
|
|
|
|
2021-10-23 12:49:02 -07:00
|
|
|
/**
|
2021-10-26 12:19:09 -07:00
|
|
|
* K24A4 engine
|
2021-10-23 12:49:02 -07:00
|
|
|
* PROTEUS_HONDA_ELEMENT_2003
|
|
|
|
*/
|
2021-10-02 10:25:40 -07:00
|
|
|
void setProteusHondaElement2003(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
|
2021-10-12 15:24:45 -07:00
|
|
|
engineConfiguration->specs.cylindersCount = 4;
|
2021-10-26 14:15:24 -07:00
|
|
|
engineConfiguration->specs.firingOrder = FO_1_3_4_2;
|
2021-10-12 15:24:45 -07:00
|
|
|
engineConfiguration->specs.displacement = 2.4;
|
2021-10-26 09:04:35 -07:00
|
|
|
// engineConfiguration->trigger.type = TT_TOOTHED_WHEEL;
|
|
|
|
// engineConfiguration->trigger.customTotalToothCount = 12;
|
|
|
|
// engineConfiguration->trigger.customSkippedToothCount = 0;
|
|
|
|
|
|
|
|
engineConfiguration->trigger.type = TT_HONDA_K_4_1;
|
2021-10-24 11:44:37 -07:00
|
|
|
|
2021-10-28 19:18:41 -07:00
|
|
|
engineConfiguration->vvtMode[0] = VVT_HONDA_K;
|
2021-10-24 11:44:37 -07:00
|
|
|
engineConfiguration->vvtMode[1] = VVT_FIRST_HALF;
|
2021-10-23 12:49:02 -07:00
|
|
|
|
2021-10-26 12:19:09 -07:00
|
|
|
engineConfiguration->map.sensor.type = MT_DENSO183;
|
|
|
|
engineConfiguration->injector.flow = 270;
|
2021-10-26 14:15:24 -07:00
|
|
|
engineConfiguration->injectorCompensationMode = ICM_FixedRailPressure;
|
|
|
|
engineConfiguration->fuelReferencePressure = 350; // TODO: what is real value?!
|
2021-10-26 12:19:09 -07:00
|
|
|
|
2021-10-23 12:49:02 -07:00
|
|
|
strcpy(CONFIG(engineMake), ENGINE_MAKE_HONDA);
|
|
|
|
strcpy(CONFIG(engineCode), "K24");
|
|
|
|
strcpy(CONFIG(vehicleName), "test");
|
|
|
|
|
2021-10-26 08:52:52 -07:00
|
|
|
engineConfiguration->tpsMin = 100;
|
|
|
|
engineConfiguration->tpsMax = 830;
|
|
|
|
|
2021-10-26 09:04:35 -07:00
|
|
|
engineConfiguration->displayLogicLevelsInEngineSniffer = true;
|
|
|
|
|
2021-10-26 08:52:52 -07:00
|
|
|
|
2021-10-23 12:49:02 -07:00
|
|
|
#if HW_PROTEUS & EFI_PROD_CODE
|
2021-10-26 09:04:35 -07:00
|
|
|
// engineConfiguration->triggerInputPins[0] = PROTEUS_DIGITAL_2; // crank
|
|
|
|
// engineConfiguration->camInputs[0] = PROTEUS_DIGITAL_4; // intake
|
|
|
|
// engineConfiguration->camInputs[1 * CAMS_PER_BANK] = PROTEUS_DIGITAL_1; // exhaust
|
|
|
|
|
|
|
|
engineConfiguration->triggerInputPins[0] = PROTEUS_DIGITAL_1; // exhaust
|
2021-10-23 13:19:28 -07:00
|
|
|
|
|
|
|
engineConfiguration->injectionPins[0] = PROTEUS_LS_8;
|
|
|
|
engineConfiguration->injectionPins[1] = PROTEUS_LS_7;
|
|
|
|
engineConfiguration->injectionPins[2] = PROTEUS_LS_6;
|
|
|
|
engineConfiguration->injectionPins[3] = PROTEUS_LS_5;
|
|
|
|
|
2021-10-28 19:18:41 -07:00
|
|
|
engineConfiguration->auxPidPins[0] = PROTEUS_HS_2;
|
|
|
|
|
2021-10-23 13:19:28 -07:00
|
|
|
engineConfiguration->malfunctionIndicatorPin = PROTEUS_LS_10;
|
2021-10-27 20:55:31 -07:00
|
|
|
engineConfiguration->idle.solenoidPin = PROTEUS_LS_15;
|
2021-10-23 13:19:28 -07:00
|
|
|
|
2021-10-26 08:52:52 -07:00
|
|
|
engineConfiguration->iat.adcChannel = PROTEUS_IN_ANALOG_TEMP_1;
|
|
|
|
engineConfiguration->clt.adcChannel = PROTEUS_IN_ANALOG_TEMP_2;
|
|
|
|
engineConfiguration->tps1_1AdcChannel = PROTEUS_IN_ANALOG_VOLT_3;
|
|
|
|
engineConfiguration->map.sensor.hwChannel = PROTEUS_IN_ANALOG_VOLT_6;
|
2021-10-28 12:57:35 -07:00
|
|
|
CONFIG(fanPin) = GPIO_UNASSIGNED;
|
2021-10-26 08:52:52 -07:00
|
|
|
|
|
|
|
|
2021-10-23 13:19:28 -07:00
|
|
|
CONFIG(mainRelayPin) = PROTEUS_LS_9;
|
|
|
|
CONFIG(fuelPumpPin) = PROTEUS_LS_11;
|
|
|
|
// CONFIG(fanPin) = PROTEUS_LS_15;
|
|
|
|
|
|
|
|
#endif // HW_PROTEUS
|
2021-10-12 15:24:45 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
void setProteusHondaOBD2A(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
|
2021-10-02 10:25:40 -07:00
|
|
|
|
|
|
|
}
|