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

38 lines
1.1 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
2017-01-03 03:05:22 -08:00
* @author Andrey Belomutskiy, (c) 2012-2017
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;
void setSubaru2003Wrx(DECLARE_ENGINE_PARAMETER_F) {
setFrankenso_01_LCD(boardConfiguration);
setFrankenso0_1_joystick(engineConfiguration);
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
boardConfiguration->useStepperIdle = true;
// todo: url
boardConfiguration->idle.stepperDirectionPin = GPIOD_1; // top stepper drive pin, white wire recommended
boardConfiguration->idle.stepperStepPin = GPIOD_6; // yellow wire recommended
engineConfiguration->stepperEnablePin = GPIOB_1; // bottom stepper driver board pin, blue wire recommended
boardConfiguration->triggerSimulatorPins[0] = GPIO_UNASSIGNED;
boardConfiguration->triggerSimulatorPins[1] = GPIO_UNASSIGNED;
boardConfiguration->triggerSimulatorPins[2] = GPIO_UNASSIGNED;
2015-07-10 06:01:56 -07:00
}