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
|
2018-01-20 17:42:19 -08:00
|
|
|
* @author Andrey Belomutskiy, (c) 2012-2018
|
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_ENGINE;
|
|
|
|
|
2017-05-15 20:33:22 -07:00
|
|
|
void setSubaru2003Wrx(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
|
2019-01-09 21:56:08 -08:00
|
|
|
setFrankenso_01_LCD(boardConfiguration);
|
|
|
|
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
|
|
|
|
2019-01-09 21:56:08 -08:00
|
|
|
boardConfiguration->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
|
2019-01-09 21:56:08 -08:00
|
|
|
boardConfiguration->idle.stepperDirectionPin = GPIOD_1; // top stepper drive pin, white wire recommended
|
|
|
|
boardConfiguration->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
|
|
|
|
|
2019-01-09 21:56:08 -08:00
|
|
|
boardConfiguration->triggerSimulatorPins[0] = GPIO_UNASSIGNED; // we want to avoid PD1 conflict
|
|
|
|
boardConfiguration->triggerSimulatorPins[1] = GPIO_UNASSIGNED;
|
|
|
|
boardConfiguration->triggerSimulatorPins[2] = GPIO_UNASSIGNED;
|
2017-01-28 22:04:16 -08:00
|
|
|
|
2015-07-10 06:01:56 -07:00
|
|
|
}
|