2015-07-10 06:01:56 -07:00
|
|
|
/*
|
|
|
|
* @file vw.cpp
|
|
|
|
*
|
2017-01-06 07:04:41 -08:00
|
|
|
* set engine_type 32
|
2015-07-10 06:01:56 -07:00
|
|
|
*
|
|
|
|
* @date May 24, 2015
|
2020-01-07 21:02:40 -08:00
|
|
|
* @author Andrey Belomutskiy, (c) 2012-2020
|
2015-07-10 06:01:56 -07:00
|
|
|
*/
|
|
|
|
|
2018-09-16 19:25:17 -07:00
|
|
|
#include "global.h"
|
2015-07-10 06:01:56 -07:00
|
|
|
#include "vw.h"
|
|
|
|
#include "custom_engine.h"
|
|
|
|
#include "ego.h"
|
2015-09-01 15:01:24 -07:00
|
|
|
#include "engine_math.h"
|
2015-07-10 06:01:56 -07:00
|
|
|
|
2019-05-03 15:41:43 -07:00
|
|
|
EXTERN_CONFIG;
|
2015-07-10 06:01:56 -07:00
|
|
|
|
2020-04-22 22:26:30 -07:00
|
|
|
// VW_ABA
|
2019-05-03 15:41:43 -07:00
|
|
|
void setVwAba(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
|
2019-08-06 14:12:15 -07:00
|
|
|
setFrankensoConfiguration(PASS_CONFIG_PARAMETER_SIGNATURE);
|
2015-07-10 06:01:56 -07:00
|
|
|
|
2019-01-10 18:10:46 -08:00
|
|
|
setWholeTimingTable_d(20 PASS_CONFIG_PARAMETER_SUFFIX);
|
2017-01-06 06:03:33 -08:00
|
|
|
// set cranking_timing_angle 10
|
2016-06-13 07:03:46 -07:00
|
|
|
engineConfiguration->crankingTimingAngle = 10;
|
2015-07-10 06:01:56 -07:00
|
|
|
|
2016-07-05 08:03:11 -07:00
|
|
|
engineConfiguration->isCylinderCleanupEnabled = true;
|
|
|
|
|
2015-07-10 06:01:56 -07:00
|
|
|
// set_whole_fuel_map 12
|
2019-01-10 14:07:29 -08:00
|
|
|
setWholeFuelMap(12 PASS_CONFIG_PARAMETER_SUFFIX);
|
2015-07-10 06:01:56 -07:00
|
|
|
|
2017-01-06 07:04:41 -08:00
|
|
|
// set global_trigger_offset_angle 93
|
2016-06-13 07:03:46 -07:00
|
|
|
engineConfiguration->globalTriggerAngleOffset = 93;
|
2015-07-10 06:01:56 -07:00
|
|
|
|
|
|
|
|
|
|
|
setOperationMode(engineConfiguration, FOUR_STROKE_CRANK_SENSOR);
|
|
|
|
// engineConfiguration->trigger.type = TT_TOOTHED_WHEEL_60_2;
|
|
|
|
engineConfiguration->trigger.type = TT_60_2_VW;
|
|
|
|
|
|
|
|
engineConfiguration->mafAdcChannel = EFI_ADC_1;
|
|
|
|
|
|
|
|
|
|
|
|
//Base engine setting
|
|
|
|
engineConfiguration->specs.cylindersCount = 4;
|
2016-06-12 20:03:12 -07:00
|
|
|
engineConfiguration->specs.displacement = 2.0;
|
2015-07-10 06:01:56 -07:00
|
|
|
engineConfiguration->injector.flow = 320; // 30lb/h
|
2017-01-06 07:04:41 -08:00
|
|
|
// set algorithm 3
|
2019-01-10 16:25:07 -08:00
|
|
|
setAlgorithm(LM_SPEED_DENSITY PASS_CONFIG_PARAMETER_SUFFIX);
|
2015-07-10 06:01:56 -07:00
|
|
|
engineConfiguration->map.sensor.type = MT_GM_3_BAR;
|
|
|
|
|
|
|
|
engineConfiguration->ignitionMode = IM_ONE_COIL;
|
|
|
|
|
2019-12-11 14:48:55 -08:00
|
|
|
engineConfiguration->ignitionPins[0] = GPIOE_14; // Frankenso high side - pin 1G
|
|
|
|
engineConfiguration->ignitionPins[1] = GPIO_UNASSIGNED;
|
|
|
|
engineConfiguration->ignitionPins[2] = GPIO_UNASSIGNED;
|
|
|
|
engineConfiguration->ignitionPins[3] = GPIO_UNASSIGNED;
|
|
|
|
engineConfiguration->ignitionPinMode = OM_DEFAULT;
|
2015-07-10 06:01:56 -07:00
|
|
|
|
2016-05-29 13:01:43 -07:00
|
|
|
float mapRange = 110;
|
|
|
|
|
2019-05-03 15:41:43 -07:00
|
|
|
setEgoSensor(ES_PLX PASS_CONFIG_PARAMETER_SUFFIX);
|
2019-01-10 16:25:07 -08:00
|
|
|
setFuelTablesLoadBin(20, mapRange PASS_CONFIG_PARAMETER_SUFFIX);
|
|
|
|
setTimingLoadBin(20, mapRange PASS_CONFIG_PARAMETER_SUFFIX);
|
2016-06-12 20:03:12 -07:00
|
|
|
|
2020-02-25 18:35:21 -08:00
|
|
|
CONFIG(isSdCardEnabled) = false;
|
2016-06-12 20:03:12 -07:00
|
|
|
engineConfiguration->tpsMin = 740;
|
|
|
|
engineConfiguration->tpsMax = 135;
|
2015-07-10 06:01:56 -07:00
|
|
|
}
|