rusefi-1/firmware/config/engines/honda_k_dbc.cpp

96 lines
3.0 KiB
C++
Raw Normal View History

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
*/
void setProteusHondaElement2003() {
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-29 09:16:19 -07:00
engineConfiguration->globalTriggerAngleOffset = 570;
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-31 12:27:26 -07:00
engineConfiguration->vvtOffsets[0] = -41;
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
strcpy(engineConfiguration->engineMake, ENGINE_MAKE_HONDA);
strcpy(engineConfiguration->engineCode, "K24");
strcpy(engineConfiguration->vehicleName, "test");
2021-10-23 12:49:02 -07:00
2021-11-02 14:00:08 -07:00
gppwm_channel *vtsControl = &engineConfiguration->gppwm[0];
vtsControl->pwmFrequency = 0;
strcpy(engineConfiguration->gpPwmNote[0], "VTS");
2021-11-02 14:00:08 -07:00
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-29 09:16:19 -07:00
// set cranking_fuel 15
2021-11-02 14:11:34 -07:00
engineConfiguration->cranking.baseFuel = 75;
2021-10-29 09:16:19 -07:00
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-29 09:16:19 -07:00
engineConfiguration->camInputs[0] = PROTEUS_DIGITAL_4; // intake
2021-11-02 14:11:34 -07:00
// inverted
// offset -41
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-11-02 14:00:08 -07:00
vtsControl->pin = PROTEUS_HS_1;
2021-10-28 20:51:46 -07:00
engineConfiguration->vvtPins[0] = PROTEUS_HS_2;
2021-10-28 19:18:41 -07:00
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-11-02 14:11:34 -07:00
engineConfiguration->fanPin = PROTEUS_LS_1;
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;
engineConfiguration->fanPin = Gpio::Unassigned;
2021-10-26 08:52:52 -07:00
engineConfiguration->mainRelayPin = PROTEUS_LS_9;
engineConfiguration->fuelPumpPin = PROTEUS_LS_11;
// engineConfiguration->fanPin = PROTEUS_LS_15;
2021-10-23 13:19:28 -07:00
#endif // HW_PROTEUS
2021-10-12 15:24:45 -07:00
}
void setProteusHondaOBD2A() {
2021-10-02 10:25:40 -07:00
}