fome-fw/firmware/config/engines/subaru.cpp

56 lines
1.5 KiB
C++
Raw Normal View History

2015-07-10 06:01:56 -07:00
/**
* @file subaru.cpp
*
* SUBARU_2003_WRX
2017-01-06 07:04:41 -08:00
* set engine_type 22
2015-07-10 06:01:56 -07:00
*
* @date Sep 14, 2014
2020-01-13 18:57:43 -08:00
* @author Andrey Belomutskiy, (c) 2012-2020
2015-07-10 06:01:56 -07:00
*/
#include "subaru.h"
2016-04-03 16:01:59 -07:00
#include "custom_engine.h"
2015-07-10 06:01:56 -07:00
EXTERN_CONFIG;
2015-07-10 06:01:56 -07:00
void setSubaru2003Wrx(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
setFrankenso_01_LCD(engineConfiguration);
setFrankenso0_1_joystick(engineConfiguration);
2015-07-10 06:01:56 -07:00
engineConfiguration->trigger.type = TT_TOOTHED_WHEEL;
engineConfiguration->trigger.customTotalToothCount = 5;
engineConfiguration->trigger.customSkippedToothCount = 1;
engineConfiguration->sensorChartFrequency = 2;
2017-01-28 22:04:16 -08:00
engineConfiguration->useStepperIdle = true;
2017-01-28 22:04:16 -08:00
2017-01-29 07:04:26 -08:00
// See http://rusefi.com/forum/viewtopic.php?f=4&t=1161
engineConfiguration->idle.stepperDirectionPin = GPIOD_1; // top stepper drive pin, white wire recommended
engineConfiguration->idle.stepperStepPin = GPIOD_6; // yellow wire recommended
2017-01-28 22:04:16 -08:00
engineConfiguration->stepperEnablePin = GPIOB_1; // bottom stepper driver board pin, blue wire recommended
engineConfiguration->triggerSimulatorPins[0] = GPIO_UNASSIGNED; // we want to avoid PD1 conflict
engineConfiguration->triggerSimulatorPins[1] = GPIO_UNASSIGNED;
engineConfiguration->triggerSimulatorPins[2] = GPIO_UNASSIGNED;
}
/*
* Subaru WRX <=1996 Turbo.
*/
2017-01-28 22:04:16 -08:00
void setSubaruEJ20GDefaults(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
engineConfiguration->trigger.type = TT_SUBARU_7_6;
2015-07-10 06:01:56 -07:00
}
2020-12-06 11:16:40 -08:00
/**
* MRE_SUBARU_EJ18
* set engine_type 37
*/
void setSubaruEJ18_MRE(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
engineConfiguration->trigger.type = TT_SUBARU_7_6;
CONFIG(isDoubleSolenoidIdle) = true;
}