remove engine pointer passing (#3556)
* some * more * more * the last?!
This commit is contained in:
parent
344c9073e2
commit
8cdac4cac0
|
@ -36,10 +36,10 @@ int main(void) {
|
|||
halInit();
|
||||
chSysInit();
|
||||
// set base pin configuration based on the board
|
||||
setDefaultBasePins(PASS_CONFIG_PARAMETER_SIGNATURE);
|
||||
setDefaultBasePins();
|
||||
/* at the moment SD card is not needed by bootloader
|
||||
// set SD card configuration also
|
||||
setDefaultSdCardParameters(PASS_ENGINE_PARAMETER_SIGNATURE);
|
||||
setDefaultSdCardParameters();
|
||||
*/
|
||||
|
||||
// start UART
|
||||
|
|
|
@ -21,7 +21,7 @@ void setBoardDefaultConfiguration(void) {
|
|||
|
||||
engineConfiguration->isEngineChartEnabled = false;
|
||||
|
||||
setAlgorithm(LM_SPEED_DENSITY PASS_CONFIG_PARAMETER_SUFFIX);
|
||||
setAlgorithm(LM_SPEED_DENSITY);
|
||||
|
||||
engineConfiguration->specs.cylindersCount = 4;
|
||||
engineConfiguration->specs.firingOrder = FO_1_3_4_2;
|
||||
|
|
|
@ -142,7 +142,7 @@ void setBoardDefaultConfiguration(void) {
|
|||
setOperationMode(engineConfiguration, FOUR_STROKE_CRANK_SENSOR);
|
||||
engineConfiguration->trigger.type = TT_TOOTHED_WHEEL_60_2;
|
||||
engineConfiguration->useOnlyRisingEdgeForTrigger = true;
|
||||
setAlgorithm(LM_SPEED_DENSITY PASS_CONFIG_PARAMETER_SUFFIX);
|
||||
setAlgorithm(LM_SPEED_DENSITY);
|
||||
|
||||
engineConfiguration->specs.cylindersCount = 4;
|
||||
engineConfiguration->specs.firingOrder = FO_1_3_4_2;
|
||||
|
|
|
@ -153,7 +153,7 @@ void setBoardDefaultConfiguration(void) {
|
|||
|
||||
engineConfiguration->vvtCamSensorUseRise = true;
|
||||
engineConfiguration->useOnlyRisingEdgeForTrigger = true;
|
||||
setAlgorithm(LM_SPEED_DENSITY PASS_CONFIG_PARAMETER_SUFFIX);
|
||||
setAlgorithm(LM_SPEED_DENSITY);
|
||||
|
||||
|
||||
// Bosch VQ40 VR56 VK56 0280158007
|
||||
|
|
|
@ -141,7 +141,7 @@ void setBoardDefaultConfiguration(void) {
|
|||
engineConfiguration->etbIo[0].controlPin = GPIOA_8; // ETB_EN out_io12
|
||||
CONFIG(etb_use_two_wires) = true;
|
||||
|
||||
setBoschVAGETB(PASS_CONFIG_PARAMETER_SIGNATURE);
|
||||
setBoschVAGETB();
|
||||
|
||||
engineConfiguration->isSdCardEnabled = true;
|
||||
|
||||
|
@ -170,7 +170,7 @@ void setBoardDefaultConfiguration(void) {
|
|||
setOperationMode(engineConfiguration, FOUR_STROKE_CRANK_SENSOR);
|
||||
engineConfiguration->trigger.type = TT_TOOTHED_WHEEL_60_2;
|
||||
engineConfiguration->useOnlyRisingEdgeForTrigger = true;
|
||||
setAlgorithm(LM_SPEED_DENSITY PASS_CONFIG_PARAMETER_SUFFIX);
|
||||
setAlgorithm(LM_SPEED_DENSITY);
|
||||
|
||||
strcpy(CONFIG(engineMake), ENGINE_MAKE_VAG);
|
||||
strcpy(CONFIG(engineCode), "base");
|
||||
|
@ -182,7 +182,7 @@ void setBoardDefaultConfiguration(void) {
|
|||
engineConfiguration->crankingInjectionMode = IM_SIMULTANEOUS;
|
||||
engineConfiguration->injectionMode = IM_SIMULTANEOUS;//IM_BATCH;// IM_SEQUENTIAL;
|
||||
|
||||
setHellenDefaultVrThresholds(PASS_CONFIG_PARAMETER_SIGNATURE);
|
||||
setHellenDefaultVrThresholds();
|
||||
engineConfiguration->vrThreshold[0].pin = H144_OUT_PWM6;
|
||||
hellenWbo();
|
||||
}
|
||||
|
|
|
@ -150,7 +150,7 @@ void setBoardDefaultConfiguration(void) {
|
|||
setOperationMode(engineConfiguration, FOUR_STROKE_CRANK_SENSOR);
|
||||
engineConfiguration->trigger.type = TT_TOOTHED_WHEEL_60_2;
|
||||
engineConfiguration->useOnlyRisingEdgeForTrigger = true;
|
||||
setAlgorithm(LM_SPEED_DENSITY PASS_CONFIG_PARAMETER_SUFFIX);
|
||||
setAlgorithm(LM_SPEED_DENSITY);
|
||||
|
||||
engineConfiguration->specs.cylindersCount = 4;
|
||||
engineConfiguration->specs.firingOrder = FO_1_3_4_2;
|
||||
|
|
|
@ -164,7 +164,7 @@ void setBoardDefaultConfiguration(void) {
|
|||
|
||||
engineConfiguration->vvtCamSensorUseRise = true;
|
||||
engineConfiguration->useOnlyRisingEdgeForTrigger = true;
|
||||
setAlgorithm(LM_SPEED_DENSITY PASS_CONFIG_PARAMETER_SUFFIX);
|
||||
setAlgorithm(LM_SPEED_DENSITY);
|
||||
|
||||
|
||||
engineConfiguration->injectorCompensationMode = ICM_FixedRailPressure;
|
||||
|
|
|
@ -147,7 +147,7 @@ void setBoardDefaultConfiguration(void) {
|
|||
setOperationMode(engineConfiguration, FOUR_STROKE_CRANK_SENSOR);
|
||||
engineConfiguration->trigger.type = TT_TOOTHED_WHEEL_60_2;
|
||||
engineConfiguration->useOnlyRisingEdgeForTrigger = true;
|
||||
setAlgorithm(LM_SPEED_DENSITY PASS_CONFIG_PARAMETER_SUFFIX);
|
||||
setAlgorithm(LM_SPEED_DENSITY);
|
||||
|
||||
engineConfiguration->specs.cylindersCount = 4;
|
||||
engineConfiguration->specs.firingOrder = FO_1_3_4_2;
|
||||
|
|
|
@ -156,7 +156,7 @@ void setBoardDefaultConfiguration(void) {
|
|||
setOperationMode(engineConfiguration, FOUR_STROKE_CRANK_SENSOR);
|
||||
engineConfiguration->trigger.type = TT_TOOTHED_WHEEL_60_2;
|
||||
engineConfiguration->useOnlyRisingEdgeForTrigger = true;
|
||||
setAlgorithm(LM_SPEED_DENSITY PASS_CONFIG_PARAMETER_SUFFIX);
|
||||
setAlgorithm(LM_SPEED_DENSITY);
|
||||
|
||||
engineConfiguration->specs.cylindersCount = 4;
|
||||
engineConfiguration->specs.firingOrder = FO_1_3_4_2;
|
||||
|
|
|
@ -158,7 +158,7 @@ void setBoardDefaultConfiguration(void) {
|
|||
setOperationMode(engineConfiguration, FOUR_STROKE_CRANK_SENSOR);
|
||||
engineConfiguration->trigger.type = TT_TOOTHED_WHEEL_60_2;
|
||||
engineConfiguration->useOnlyRisingEdgeForTrigger = true;
|
||||
setAlgorithm(LM_SPEED_DENSITY PASS_CONFIG_PARAMETER_SUFFIX);
|
||||
setAlgorithm(LM_SPEED_DENSITY);
|
||||
|
||||
engineConfiguration->specs.cylindersCount = 4;
|
||||
engineConfiguration->specs.firingOrder = FO_1_3_4_2;
|
||||
|
|
|
@ -151,7 +151,7 @@ void setBoardDefaultConfiguration(void) {
|
|||
|
||||
engineConfiguration->vvtCamSensorUseRise = true;
|
||||
engineConfiguration->useOnlyRisingEdgeForTrigger = true;
|
||||
setAlgorithm(LM_SPEED_DENSITY PASS_CONFIG_PARAMETER_SUFFIX);
|
||||
setAlgorithm(LM_SPEED_DENSITY);
|
||||
|
||||
|
||||
// Bosch VQ40 VR56 VK56 0280158007
|
||||
|
|
|
@ -22,7 +22,7 @@ void setBoardDefaultConfiguration(void) {
|
|||
engineConfiguration->isFasterEngineSpinUpEnabled = true;
|
||||
engineConfiguration->useNoiselessTriggerDecoder = true;
|
||||
|
||||
setAlgorithm(LM_SPEED_DENSITY PASS_CONFIG_PARAMETER_SUFFIX);
|
||||
setAlgorithm(LM_SPEED_DENSITY);
|
||||
|
||||
engineConfiguration->specs.cylindersCount = 4;
|
||||
engineConfiguration->specs.firingOrder = FO_1_3_4_2;
|
||||
|
|
|
@ -226,7 +226,7 @@ void setBoardDefaultConfiguration(void) {
|
|||
setOperationMode(engineConfiguration, FOUR_STROKE_CRANK_SENSOR);
|
||||
engineConfiguration->trigger.type = TT_TOOTHED_WHEEL_60_2;
|
||||
engineConfiguration->useOnlyRisingEdgeForTrigger = true;
|
||||
setAlgorithm(LM_SPEED_DENSITY PASS_CONFIG_PARAMETER_SUFFIX);
|
||||
setAlgorithm(LM_SPEED_DENSITY);
|
||||
|
||||
engineConfiguration->specs.cylindersCount = 4;
|
||||
engineConfiguration->specs.firingOrder = FO_1_3_4_2;
|
||||
|
|
|
@ -17,11 +17,11 @@ static bool is469 = false;
|
|||
#endif
|
||||
|
||||
|
||||
static void setPrometheusDefaults(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
|
||||
static void setPrometheusDefaults() {
|
||||
setOperationMode(engineConfiguration, FOUR_STROKE_CRANK_SENSOR/*FOUR_STROKE_CAM_SENSOR*/);
|
||||
engineConfiguration->trigger.type = TT_TOOTHED_WHEEL_60_2;
|
||||
//engineConfiguration->useOnlyRisingEdgeForTrigger = true;
|
||||
setAlgorithm(LM_SPEED_DENSITY PASS_CONFIG_PARAMETER_SUFFIX);
|
||||
setAlgorithm(LM_SPEED_DENSITY);
|
||||
|
||||
CONFIG(useCicPidForIdle) = true;
|
||||
|
||||
|
@ -250,7 +250,7 @@ void setBoardDefaultConfiguration(void) {
|
|||
|
||||
//!!!!!!!!!!!!!!!
|
||||
#if 1
|
||||
setPrometheusDefaults(PASS_ENGINE_PARAMETER_SIGNATURE);
|
||||
setPrometheusDefaults();
|
||||
#endif
|
||||
|
||||
//!!!!!!!!!!!!!!!!!!!
|
||||
|
|
|
@ -188,7 +188,7 @@ void setBoardDefaultConfiguration(void) {
|
|||
setOperationMode(engineConfiguration, FOUR_STROKE_CRANK_SENSOR);
|
||||
engineConfiguration->trigger.type = TT_TOOTHED_WHEEL_60_2;
|
||||
engineConfiguration->useOnlyRisingEdgeForTrigger = true;
|
||||
setAlgorithm(LM_SPEED_DENSITY PASS_CONFIG_PARAMETER_SUFFIX);
|
||||
setAlgorithm(LM_SPEED_DENSITY);
|
||||
|
||||
engineConfiguration->specs.cylindersCount = 8;
|
||||
engineConfiguration->specs.firingOrder = FO_1_8_7_2_6_5_4_3;
|
||||
|
|
|
@ -207,7 +207,7 @@ void setBoardDefaultConfiguration(void) {
|
|||
setOperationMode(engineConfiguration, FOUR_STROKE_CRANK_SENSOR);
|
||||
engineConfiguration->trigger.type = TT_TOOTHED_WHEEL_60_2;
|
||||
engineConfiguration->useOnlyRisingEdgeForTrigger = true;
|
||||
setAlgorithm(LM_SPEED_DENSITY PASS_CONFIG_PARAMETER_SUFFIX);
|
||||
setAlgorithm(LM_SPEED_DENSITY);
|
||||
|
||||
engineConfiguration->specs.cylindersCount = 4;
|
||||
engineConfiguration->specs.firingOrder = FO_1_3_4_2;
|
||||
|
|
|
@ -254,9 +254,9 @@ void setBoardDefaultConfiguration(void) {
|
|||
//engineConfiguration->isEngineChartEnabled = false;
|
||||
|
||||
if (engineConfiguration->fuelAlgorithm == LM_REAL_MAF)
|
||||
setAlgorithm(LM_SPEED_DENSITY PASS_CONFIG_PARAMETER_SUFFIX);
|
||||
setAlgorithm(LM_SPEED_DENSITY);
|
||||
if (engineConfiguration->fuelAlgorithm == LM_ALPHA_N)
|
||||
setAlgorithm(LM_ALPHA_N PASS_CONFIG_PARAMETER_SUFFIX);
|
||||
setAlgorithm(LM_ALPHA_N);
|
||||
}
|
||||
|
||||
/* Schematic RefDef DA3 */
|
||||
|
|
|
@ -16,19 +16,19 @@
|
|||
#include "GY6_139QMB.h"
|
||||
#include "advance_map.h"
|
||||
|
||||
static void setDefault139qmbMaps(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
|
||||
setTimingLoadBin(1.2, 4.4 PASS_CONFIG_PARAMETER_SUFFIX);
|
||||
setTimingRpmBin(1000, 11000 PASS_CONFIG_PARAMETER_SUFFIX);
|
||||
static void setDefault139qmbMaps() {
|
||||
setTimingLoadBin(1.2, 4.4);
|
||||
setTimingRpmBin(1000, 11000);
|
||||
}
|
||||
|
||||
void setGy6139qmbDefaultEngineConfiguration(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
|
||||
setDefault139qmbMaps(PASS_CONFIG_PARAMETER_SIGNATURE);
|
||||
void setGy6139qmbDefaultEngineConfiguration() {
|
||||
setDefault139qmbMaps();
|
||||
// engineConfiguration->map.sensor.type = MT_3V_SENSOR;
|
||||
setEgoSensor(ES_NarrowBand PASS_CONFIG_PARAMETER_SUFFIX);
|
||||
setEgoSensor(ES_NarrowBand);
|
||||
|
||||
engineConfiguration->rpmHardLimit = 9000;
|
||||
engineConfiguration->cranking.rpm = 1100;
|
||||
setTargetRpmCurve(2000 PASS_CONFIG_PARAMETER_SUFFIX);
|
||||
setTargetRpmCurve(2000);
|
||||
engineConfiguration->analogInputDividerCoefficient = 1;
|
||||
engineConfiguration->globalTriggerAngleOffset = 45;
|
||||
engineConfiguration->sensorChartMode = SC_MAP;
|
||||
|
|
|
@ -9,5 +9,5 @@
|
|||
#pragma once
|
||||
#include "engine_configuration.h"
|
||||
|
||||
void setGy6139qmbDefaultEngineConfiguration(DECLARE_CONFIG_PARAMETER_SIGNATURE);
|
||||
void setGy6139qmbDefaultEngineConfiguration();
|
||||
|
||||
|
|
|
@ -84,7 +84,7 @@
|
|||
#include "proteus_meta.h"
|
||||
#endif
|
||||
|
||||
void m73engine(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
|
||||
void m73engine() {
|
||||
// 13641435991 injector
|
||||
engineConfiguration->injector.flow = 180; // cc/min, who knows if this number is real - no good source of info
|
||||
|
||||
|
@ -116,15 +116,15 @@ void m73engine(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
|
|||
|
||||
|
||||
// BMW_M73_F
|
||||
void setBMW_M73_TwoCoilUnitTest(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
|
||||
void setBMW_M73_TwoCoilUnitTest() {
|
||||
// twoCoil configuration without unit tests ETB setup drama
|
||||
m73engine(PASS_CONFIG_PARAMETER_SIGNATURE);
|
||||
m73engine();
|
||||
}
|
||||
|
||||
// BMW_M73_M
|
||||
// set engine_type 24
|
||||
void setEngineBMW_M73_Manhattan(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
|
||||
m73engine(PASS_CONFIG_PARAMETER_SIGNATURE);
|
||||
void setEngineBMW_M73_Manhattan() {
|
||||
m73engine();
|
||||
|
||||
/**
|
||||
Nucleo boards - first step is to confirm that I can blink via each pin
|
||||
|
@ -242,8 +242,8 @@ GPIOA_6
|
|||
*
|
||||
*/
|
||||
#if HW_PROTEUS
|
||||
void setEngineBMW_M73_Proteus(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
|
||||
m73engine(PASS_CONFIG_PARAMETER_SIGNATURE);
|
||||
void setEngineBMW_M73_Proteus() {
|
||||
m73engine();
|
||||
|
||||
// 12 injectors defined in boards/proteus/board_configuration.cpp
|
||||
// set_analog_input_pin pps pa4
|
||||
|
@ -274,7 +274,7 @@ void setEngineBMW_M73_Proteus(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
|
|||
CONFIG(startStopButtonPin) = GPIOE_12;
|
||||
CONFIG(startStopButtonMode) = PI_PULLUP;
|
||||
|
||||
setProteusHitachiEtbDefaults(PASS_CONFIG_PARAMETER_SIGNATURE);
|
||||
setProteusHitachiEtbDefaults();
|
||||
|
||||
CONFIG(useETBforIdleControl) = true;
|
||||
}
|
||||
|
|
|
@ -9,12 +9,12 @@
|
|||
|
||||
#include "engine_configuration.h"
|
||||
|
||||
void m73engine(DECLARE_CONFIG_PARAMETER_SIGNATURE);
|
||||
void m73engine();
|
||||
|
||||
void setBMW_M73_TwoCoilUnitTest(DECLARE_CONFIG_PARAMETER_SIGNATURE);
|
||||
void setBMW_M73_TwoCoilUnitTest();
|
||||
// set engine_type 24
|
||||
void setEngineBMW_M73_Manhattan(DECLARE_CONFIG_PARAMETER_SIGNATURE);
|
||||
void setEngineBMW_M73_Manhattan();
|
||||
// set engine_type 63
|
||||
void setEngineBMW_M73_Proteus(DECLARE_CONFIG_PARAMETER_SIGNATURE);
|
||||
void setEngineBMW_M73_Proteus();
|
||||
|
||||
void setEngineBMW_M73_microRusEfi(DECLARE_CONFIG_PARAMETER_SIGNATURE);
|
||||
void setEngineBMW_M73_microRusEfi();
|
||||
|
|
|
@ -65,7 +65,7 @@
|
|||
#include "bmw_m73.h"
|
||||
#include "fsio_impl.h"
|
||||
|
||||
void setEngineBMW_M73_microRusEfi(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
|
||||
void setEngineBMW_M73_microRusEfi() {
|
||||
// 13641435991 injector
|
||||
engineConfiguration->injector.flow = 180; // cc/min, who knows if this number is real - no good source of info
|
||||
|
||||
|
@ -84,7 +84,7 @@ void setEngineBMW_M73_microRusEfi(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
|
|||
|
||||
// enable ETB
|
||||
// set_rpn_expression 8 "0"
|
||||
// TODO LUA setFsio(7, GPIOC_8, "0" PASS_CONFIG_PARAMETER_SUFFIX);
|
||||
// TODO LUA setFsio(7, GPIOC_8, "0");
|
||||
|
||||
|
||||
CONFIG(debugMode) = DBG_ELECTRONIC_THROTTLE_PID;
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
|
||||
#include "bmw_n73.h"
|
||||
|
||||
void setEngineProteusBMW_N73_GDI(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
|
||||
void setEngineProteusBMW_N73_GDI() {
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -9,4 +9,4 @@
|
|||
|
||||
#include "engine_configuration.h"
|
||||
|
||||
void setEngineProteusBMW_N73_GDI(DECLARE_CONFIG_PARAMETER_SIGNATURE);
|
||||
void setEngineProteusBMW_N73_GDI();
|
||||
|
|
|
@ -13,11 +13,11 @@
|
|||
#include "chevrolet_camaro_4.h"
|
||||
#include "custom_engine.h"
|
||||
|
||||
void setCamaro4(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
|
||||
setFrankensoConfiguration(PASS_CONFIG_PARAMETER_SIGNATURE);
|
||||
void setCamaro4() {
|
||||
setFrankensoConfiguration();
|
||||
|
||||
|
||||
setAlgorithm(LM_SPEED_DENSITY PASS_CONFIG_PARAMETER_SUFFIX);
|
||||
setAlgorithm(LM_SPEED_DENSITY);
|
||||
|
||||
engineConfiguration->specs.displacement = 5.7;
|
||||
engineConfiguration->specs.cylindersCount = 8;
|
||||
|
|
|
@ -8,5 +8,5 @@
|
|||
#pragma once
|
||||
#include "engine_configuration.h"
|
||||
|
||||
void setCamaro4(DECLARE_CONFIG_PARAMETER_SIGNATURE);
|
||||
void setCamaro4();
|
||||
|
||||
|
|
|
@ -14,8 +14,8 @@
|
|||
#include "citroenBerlingoTU3JP.h"
|
||||
#include "custom_engine.h"
|
||||
|
||||
void setCitroenBerlingoTU3JPConfiguration(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
|
||||
setDefaultFrankensoConfiguration(PASS_CONFIG_PARAMETER_SIGNATURE);
|
||||
void setCitroenBerlingoTU3JPConfiguration() {
|
||||
setDefaultFrankensoConfiguration();
|
||||
|
||||
/**
|
||||
* Base engine setting
|
||||
|
@ -37,8 +37,8 @@ void setCitroenBerlingoTU3JPConfiguration(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
|
|||
/**
|
||||
* Algorithm Alpha-N setting
|
||||
*/
|
||||
setAlgorithm(LM_ALPHA_N PASS_CONFIG_PARAMETER_SUFFIX);
|
||||
setTimingRpmBin(800, 7000 PASS_CONFIG_PARAMETER_SUFFIX);
|
||||
setAlgorithm(LM_ALPHA_N);
|
||||
setTimingRpmBin(800, 7000);
|
||||
|
||||
/**
|
||||
* Outputs
|
||||
|
|
|
@ -8,5 +8,5 @@
|
|||
#pragma once
|
||||
#include "engine_configuration.h"
|
||||
|
||||
void setCitroenBerlingoTU3JPConfiguration(DECLARE_CONFIG_PARAMETER_SIGNATURE);
|
||||
void setCitroenBerlingoTU3JPConfiguration();
|
||||
|
||||
|
|
|
@ -83,8 +83,8 @@ void disableLCD(engine_configuration_s *engineConfiguration) {
|
|||
}
|
||||
|
||||
// todo: should this be part of more default configurations?
|
||||
void setFrankensoConfiguration(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
|
||||
setDefaultFrankensoConfiguration(PASS_CONFIG_PARAMETER_SIGNATURE);
|
||||
void setFrankensoConfiguration() {
|
||||
setDefaultFrankensoConfiguration();
|
||||
engineConfiguration->trigger.type = TT_ONE_PLUS_ONE;
|
||||
|
||||
setFrankenso_01_LCD(engineConfiguration);
|
||||
|
@ -149,7 +149,7 @@ void setFrankensoConfiguration(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
|
|||
engineConfiguration->injectionPins[3] = EFI_INJECTOR_PIN3; // #4
|
||||
#endif /* EFI_INJECTOR_PIN3 */
|
||||
|
||||
setAlgorithm(LM_SPEED_DENSITY PASS_CONFIG_PARAMETER_SUFFIX);
|
||||
setAlgorithm(LM_SPEED_DENSITY);
|
||||
|
||||
#if EFI_PWM_TESTER
|
||||
engineConfiguration->injectionPins[4] = GPIOC_8; // #5
|
||||
|
@ -195,8 +195,8 @@ void setFrankensoConfiguration(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
|
|||
/**
|
||||
* set engine_type 49
|
||||
*/
|
||||
void setFrankensoBoardTestConfiguration(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
|
||||
setFrankensoConfiguration(PASS_CONFIG_PARAMETER_SIGNATURE);
|
||||
void setFrankensoBoardTestConfiguration() {
|
||||
setFrankensoConfiguration();
|
||||
|
||||
engineConfiguration->triggerSimulatorFrequency = 300;
|
||||
engineConfiguration->cranking.rpm = 100;
|
||||
|
@ -244,8 +244,8 @@ void setFrankensoBoardTestConfiguration(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
|
|||
|
||||
// ETB_BENCH_ENGINE
|
||||
// set engine_type 58
|
||||
void setEtbTestConfiguration(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
|
||||
setDefaultFrankensoConfiguration(PASS_CONFIG_PARAMETER_SIGNATURE);
|
||||
void setEtbTestConfiguration() {
|
||||
setDefaultFrankensoConfiguration();
|
||||
// VAG test ETB
|
||||
// set tps_min 54
|
||||
engineConfiguration->tpsMin = 54;
|
||||
|
@ -272,8 +272,8 @@ void setEtbTestConfiguration(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
|
|||
CONFIG(etbIo[0].controlPin) = GPIOE_14;
|
||||
|
||||
#if EFI_ELECTRONIC_THROTTLE_BODY
|
||||
setBoschVNH2SP30Curve(PASS_CONFIG_PARAMETER_SIGNATURE);
|
||||
// setDefaultEtbParameters(PASS_CONFIG_PARAMETER_SIGNATURE);
|
||||
setBoschVNH2SP30Curve();
|
||||
// setDefaultEtbParameters();
|
||||
#endif /* EFI_ELECTRONIC_THROTTLE_BODY */
|
||||
|
||||
engineConfiguration->tps1_1AdcChannel = EFI_ADC_2; // PA2
|
||||
|
@ -299,7 +299,7 @@ void setEtbTestConfiguration(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
|
|||
}
|
||||
|
||||
#if EFI_UNIT_TEST
|
||||
void setIssue898(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
|
||||
void setIssue898() {
|
||||
engineConfiguration->trigger.type = TT_MAZDA_MIATA_NA;
|
||||
}
|
||||
#endif /* EFI_UNIT_TEST */
|
||||
|
@ -307,7 +307,7 @@ void setIssue898(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
|
|||
// TLE8888_BENCH_ENGINE
|
||||
// todo: remove this? this was used to play with "secret" red boards prior to MRE reality
|
||||
// set engine_type 59
|
||||
void setTle8888TestConfiguration(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
|
||||
void setTle8888TestConfiguration() {
|
||||
engineConfiguration->specs.cylindersCount = 8;
|
||||
engineConfiguration->specs.firingOrder = FO_1_8_7_2_6_5_4_3;
|
||||
engineConfiguration->ignitionMode = IM_INDIVIDUAL_COILS;
|
||||
|
@ -347,7 +347,7 @@ void setTle8888TestConfiguration(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
|
|||
// SF PF11
|
||||
#if defined(STM32_HAS_GPIOF) && STM32_HAS_GPIOF
|
||||
#if EFI_FSIO
|
||||
// todo lua setFsio(14, GPIOF_13, "1" PASS_CONFIG_PARAMETER_SUFFIX);
|
||||
// todo lua setFsio(14, GPIOF_13, "1");
|
||||
#endif /* EFI_FSIO */
|
||||
CONFIG(etbIo[0].directionPin1) = GPIOF_15;
|
||||
CONFIG(etbIo[0].directionPin2) = GPIOF_14;
|
||||
|
@ -363,7 +363,7 @@ void setTle8888TestConfiguration(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
|
|||
// IN2 PE4
|
||||
// SF PE3
|
||||
#if EFI_FSIO
|
||||
// todo lua setFsio(15, GPIOE_6, "1" PASS_CONFIG_PARAMETER_SUFFIX);
|
||||
// todo lua setFsio(15, GPIOE_6, "1");
|
||||
#endif
|
||||
CONFIG(etbIo[0].directionPin1) = GPIOE_2;
|
||||
CONFIG(etbIo[0].directionPin2) = GPIOE_4;
|
||||
|
@ -398,7 +398,7 @@ void setTle8888TestConfiguration(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
|
|||
* This configuration is used for MRE board Quality Assurance validation
|
||||
* todo: inline
|
||||
*/
|
||||
static void mreBoardOldTest(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
|
||||
static void mreBoardOldTest() {
|
||||
#if (BOARD_TLE8888_COUNT > 0)
|
||||
engineConfiguration->debugMode = DBG_TLE8888;
|
||||
|
||||
|
@ -515,7 +515,7 @@ static void mreBoardOldTest(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
|
|||
* PROTEUS_QC_TEST_BOARD
|
||||
* set engine_type 42
|
||||
*/
|
||||
void proteusBoardTest(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
|
||||
void proteusBoardTest() {
|
||||
engineConfiguration->specs.cylindersCount = 12;
|
||||
engineConfiguration->specs.firingOrder = FO_1_2_3_4_5_6_7_8_9_10_11_12;
|
||||
engineConfiguration->triggerSimulatorFrequency = 600;
|
||||
|
@ -562,11 +562,11 @@ void proteusBoardTest(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
|
|||
|
||||
#endif // EFI_PROD_CODE
|
||||
|
||||
setProteusHitachiEtbDefaults(PASS_CONFIG_PARAMETER_SIGNATURE);
|
||||
setProteusHitachiEtbDefaults();
|
||||
}
|
||||
#endif // HW_PROTEUS
|
||||
|
||||
void mreBCM(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
|
||||
void mreBCM() {
|
||||
for (int i = 0; i < MAX_CYLINDER_COUNT;i++) {
|
||||
engineConfiguration->ignitionPins[i] = GPIO_UNASSIGNED;
|
||||
engineConfiguration->injectionPins[i] = GPIO_UNASSIGNED;
|
||||
|
@ -576,7 +576,7 @@ void mreBCM(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
|
|||
|
||||
}
|
||||
|
||||
void mreSecondaryCan(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
|
||||
void mreSecondaryCan() {
|
||||
engineConfiguration->tps1_1AdcChannel = EFI_ADC_NONE;
|
||||
engineConfiguration->tps2_1AdcChannel = EFI_ADC_NONE;
|
||||
engineConfiguration->clt.adcChannel = EFI_ADC_NONE;
|
||||
|
@ -622,8 +622,8 @@ end
|
|||
* MRE_BOARD_NEW_TEST
|
||||
* set engine_type 31
|
||||
*/
|
||||
void mreBoardNewTest(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
|
||||
mreBoardOldTest(PASS_CONFIG_PARAMETER_SIGNATURE);
|
||||
void mreBoardNewTest() {
|
||||
mreBoardOldTest();
|
||||
|
||||
engineConfiguration->specs.cylindersCount = 12;
|
||||
engineConfiguration->specs.firingOrder = FO_1_2_3_4_5_6_7_8_9_10_11_12;
|
||||
|
@ -689,7 +689,7 @@ void mreBoardNewTest(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
|
|||
|
||||
}
|
||||
|
||||
void setBoschHDEV_5_injectors(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
|
||||
void setBoschHDEV_5_injectors() {
|
||||
// This is the configuration for bosch HDEV 5 injectors
|
||||
// all times in microseconds/us
|
||||
CONFIG(mc33_hvolt) = 65;
|
||||
|
@ -707,10 +707,10 @@ void setBoschHDEV_5_injectors(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
|
|||
/**
|
||||
* set engine_type 108
|
||||
*/
|
||||
void setVrThresholdTest(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
|
||||
void setVrThresholdTest() {
|
||||
engineConfiguration->trigger.type = TT_HONDA_1_24;
|
||||
|
||||
setHellenDefaultVrThresholds(PASS_CONFIG_PARAMETER_SIGNATURE);
|
||||
setHellenDefaultVrThresholds();
|
||||
engineConfiguration->vrThreshold[0].pin = GPIOB_4;
|
||||
|
||||
engineConfiguration->triggerInputPins[0] = GPIOA_5;
|
||||
|
@ -720,7 +720,7 @@ void setVrThresholdTest(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
|
|||
/**
|
||||
* set engine_type 107
|
||||
*/
|
||||
void setRotary(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
|
||||
void setRotary() {
|
||||
engineConfiguration->specs.cylindersCount = 2;
|
||||
engineConfiguration->specs.firingOrder = FO_1_2;
|
||||
|
||||
|
@ -743,7 +743,7 @@ void setRotary(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
|
|||
/**
|
||||
* set engine_type 103
|
||||
*/
|
||||
void setTest33816EngineConfiguration(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
|
||||
void setTest33816EngineConfiguration() {
|
||||
|
||||
// grey
|
||||
// default spi3mosiPin PB5
|
||||
|
@ -782,16 +782,16 @@ void setTest33816EngineConfiguration(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
|
|||
CONFIG(isSdCardEnabled) = false;
|
||||
|
||||
CONFIG(mc33816spiDevice) = SPI_DEVICE_3;
|
||||
setBoschHDEV_5_injectors(PASS_CONFIG_PARAMETER_SIGNATURE);
|
||||
setBoschHDEV_5_injectors();
|
||||
}
|
||||
|
||||
void setHellen72etb(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
|
||||
void setHellen72etb() {
|
||||
CONFIG(etbIo[0].directionPin1) = GPIOC_6;
|
||||
CONFIG(etbIo[0].directionPin2) = GPIOC_7;
|
||||
engineConfiguration->etb_use_two_wires = true;
|
||||
}
|
||||
|
||||
void setHellenDefaultVrThresholds(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
|
||||
void setHellenDefaultVrThresholds() {
|
||||
for (int i = 0;i<VR_THRESHOLD_COUNT;i++) {
|
||||
setLinearCurve(engineConfiguration->vrThreshold[i].rpmBins, 600 / RPM_1_BYTE_PACKING_MULT, 7000 / RPM_1_BYTE_PACKING_MULT, 100 / RPM_1_BYTE_PACKING_MULT);
|
||||
setLinearCurve(engineConfiguration->vrThreshold[i].values, PACK_PERCENT_BYTE_MULT * 0.6, PACK_PERCENT_BYTE_MULT * 1.2, PACK_PERCENT_BYTE_MULT * 0.1);
|
||||
|
@ -801,7 +801,7 @@ void setHellenDefaultVrThresholds(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
|
|||
/**
|
||||
* set engine_type 6
|
||||
*/
|
||||
void proteusHarley(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
|
||||
void proteusHarley() {
|
||||
strcpy(engineConfiguration->scriptSettingName[0], "compReleaseRpm");
|
||||
engineConfiguration->scriptSetting[0] = 300;
|
||||
strcpy(engineConfiguration->scriptSettingName[1], "compReleaseDur");
|
||||
|
@ -833,7 +833,7 @@ end
|
|||
#endif
|
||||
}
|
||||
|
||||
void proteusLuaDemo(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
|
||||
void proteusLuaDemo() {
|
||||
#if HW_PROTEUS
|
||||
engineConfiguration->tpsMin = 889;
|
||||
engineConfiguration->tpsMax = 67;
|
||||
|
@ -959,7 +959,7 @@ end
|
|||
}
|
||||
|
||||
#if HW_HELLEN
|
||||
void setHellen144LedPins(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
|
||||
void setHellen144LedPins() {
|
||||
#ifdef EFI_COMMUNICATION_PIN
|
||||
engineConfiguration->communicationLedPin = EFI_COMMUNICATION_PIN;
|
||||
#else
|
||||
|
@ -969,7 +969,7 @@ void setHellen144LedPins(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
|
|||
engineConfiguration->warningLedPin = GPIOE_8;
|
||||
}
|
||||
|
||||
void setHellen176LedPins(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
|
||||
void setHellen176LedPins() {
|
||||
#ifdef EFI_COMMUNICATION_PIN
|
||||
engineConfiguration->communicationLedPin = EFI_COMMUNICATION_PIN;
|
||||
#else
|
||||
|
|
|
@ -8,35 +8,35 @@
|
|||
#pragma once
|
||||
|
||||
#include "engine_configuration.h"
|
||||
void setHellenDefaultVrThresholds(DECLARE_CONFIG_PARAMETER_SIGNATURE);
|
||||
void setFrankensoConfiguration(DECLARE_CONFIG_PARAMETER_SIGNATURE);
|
||||
void setHellenDefaultVrThresholds();
|
||||
void setFrankensoConfiguration();
|
||||
void setFrankenso_01_LCD(engine_configuration_s *engineConfiguration);
|
||||
void disableLCD(engine_configuration_s *engineConfiguration);
|
||||
void runSchedulingPrecisionTestIfNeeded(void);
|
||||
void setFrankensoBoardTestConfiguration(DECLARE_CONFIG_PARAMETER_SIGNATURE);
|
||||
void setEtbTestConfiguration(DECLARE_CONFIG_PARAMETER_SIGNATURE);
|
||||
void setTle8888TestConfiguration(DECLARE_CONFIG_PARAMETER_SIGNATURE);
|
||||
void setFrankensoBoardTestConfiguration();
|
||||
void setEtbTestConfiguration();
|
||||
void setTle8888TestConfiguration();
|
||||
|
||||
void setIssue898(DECLARE_CONFIG_PARAMETER_SIGNATURE);
|
||||
void setTestQuadCam(DECLARE_CONFIG_PARAMETER_SIGNATURE);
|
||||
void setIssue898();
|
||||
void setTestQuadCam();
|
||||
|
||||
void mreBoardNewTest(DECLARE_CONFIG_PARAMETER_SIGNATURE);
|
||||
void mreSecondaryCan(DECLARE_CONFIG_PARAMETER_SIGNATURE);
|
||||
void mreBCM(DECLARE_CONFIG_PARAMETER_SIGNATURE);
|
||||
void mreBoardNewTest();
|
||||
void mreSecondaryCan();
|
||||
void mreBCM();
|
||||
|
||||
/**
|
||||
* PROTEUS_QC_TEST_BOARD
|
||||
* set engine_type 42
|
||||
*/
|
||||
void proteusBoardTest(DECLARE_CONFIG_PARAMETER_SIGNATURE);
|
||||
void proteusLuaDemo(DECLARE_CONFIG_PARAMETER_SIGNATURE);
|
||||
void proteusHarley(DECLARE_CONFIG_PARAMETER_SIGNATURE);
|
||||
void proteusBoardTest();
|
||||
void proteusLuaDemo();
|
||||
void proteusHarley();
|
||||
|
||||
void setTest33816EngineConfiguration(DECLARE_CONFIG_PARAMETER_SIGNATURE);
|
||||
void setBoschHDEV_5_injectors(DECLARE_CONFIG_PARAMETER_SIGNATURE);
|
||||
void setHellen72etb(DECLARE_CONFIG_PARAMETER_SIGNATURE);
|
||||
void setRotary(DECLARE_CONFIG_PARAMETER_SIGNATURE);
|
||||
void setVrThresholdTest(DECLARE_CONFIG_PARAMETER_SIGNATURE);
|
||||
void setTest33816EngineConfiguration();
|
||||
void setBoschHDEV_5_injectors();
|
||||
void setHellen72etb();
|
||||
void setRotary();
|
||||
void setVrThresholdTest();
|
||||
|
||||
void setHellen144LedPins(DECLARE_CONFIG_PARAMETER_SIGNATURE);
|
||||
void setHellen176LedPins(DECLARE_CONFIG_PARAMETER_SIGNATURE);
|
||||
void setHellen144LedPins();
|
||||
void setHellen176LedPins();
|
||||
|
|
|
@ -82,8 +82,8 @@ static const uint8_t veDodgeNeon2003Table[16][16] = {
|
|||
};
|
||||
|
||||
|
||||
void setDodgeNeon1995EngineConfiguration(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
|
||||
setDefaultFrankensoConfiguration(PASS_CONFIG_PARAMETER_SIGNATURE);
|
||||
void setDodgeNeon1995EngineConfiguration() {
|
||||
setDefaultFrankensoConfiguration();
|
||||
|
||||
engineConfiguration->trigger.type = TT_DODGE_NEON_1995;
|
||||
|
||||
|
@ -113,7 +113,7 @@ void setDodgeNeon1995EngineConfiguration(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
|
|||
* that's 1995 config
|
||||
*/
|
||||
|
||||
setWholeTimingTable_d(12 PASS_CONFIG_PARAMETER_SUFFIX);
|
||||
setWholeTimingTable_d(12);
|
||||
|
||||
// set cranking_injection_mode 0
|
||||
engineConfiguration->crankingInjectionMode = IM_SIMULTANEOUS;
|
||||
|
@ -180,8 +180,8 @@ void setDodgeNeon1995EngineConfiguration(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
|
|||
engineConfiguration->clt.config = {0, 30, 100, 32500, 7550, 700, 2700};
|
||||
}
|
||||
|
||||
void setDodgeNeonNGCEngineConfiguration(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
|
||||
setDefaultFrankensoConfiguration(PASS_CONFIG_PARAMETER_SIGNATURE);
|
||||
void setDodgeNeonNGCEngineConfiguration() {
|
||||
setDefaultFrankensoConfiguration();
|
||||
engineConfiguration->trigger.type = TT_DODGE_NEON_2003_CAM;
|
||||
setFrankenso_01_LCD(engineConfiguration);
|
||||
setFrankenso0_1_joystick(engineConfiguration);
|
||||
|
@ -206,7 +206,7 @@ void setDodgeNeonNGCEngineConfiguration(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
|
|||
* fuel 2.8
|
||||
*
|
||||
*/
|
||||
//setWholeTimingTable_d(12 PASS_CONFIG_PARAMETER_SUFFIX);
|
||||
//setWholeTimingTable_d(12);
|
||||
#if IGN_LOAD_COUNT == DEFAULT_IGN_LOAD_COUNT
|
||||
copyTable(config->ignitionTable, fromODB);
|
||||
#endif
|
||||
|
@ -226,9 +226,9 @@ void setDodgeNeonNGCEngineConfiguration(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
|
|||
|
||||
setLinearCurve(config->ignitionLoadBins, 20, 120, 1);
|
||||
|
||||
setAlgorithm(LM_SPEED_DENSITY PASS_CONFIG_PARAMETER_SUFFIX);
|
||||
setAlgorithm(LM_SPEED_DENSITY);
|
||||
|
||||
setFuelTablesLoadBin(20, 120 PASS_CONFIG_PARAMETER_SUFFIX);
|
||||
setFuelTablesLoadBin(20, 120);
|
||||
|
||||
engineConfiguration->malfunctionIndicatorPin = GPIO_UNASSIGNED;
|
||||
|
||||
|
@ -359,7 +359,7 @@ void setDodgeNeonNGCEngineConfiguration(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
|
|||
|
||||
// engineConfiguration->tunerStudioSerialSpeed = 9600;
|
||||
engineConfiguration->tunerStudioSerialSpeed = 19200;
|
||||
setAlgorithm(LM_SPEED_DENSITY PASS_CONFIG_PARAMETER_SUFFIX);
|
||||
setAlgorithm(LM_SPEED_DENSITY);
|
||||
|
||||
//temp engineConfiguration->alternatorControlPin = GPIOD_5;
|
||||
engineConfiguration->targetVBatt = 14.0;
|
||||
|
|
|
@ -9,12 +9,12 @@
|
|||
#pragma once
|
||||
#include "engine_configuration.h"
|
||||
|
||||
void setDodgeNeon1995EngineConfiguration(DECLARE_CONFIG_PARAMETER_SIGNATURE);
|
||||
void setDodgeNeon1995EngineConfiguration();
|
||||
|
||||
void setDodgeNeonNGCEngineConfiguration(DECLARE_CONFIG_PARAMETER_SIGNATURE);
|
||||
void setDodgeNeonNGCEngineConfiguration();
|
||||
|
||||
/**
|
||||
* testing or broken CAM sensor option
|
||||
*/
|
||||
void setDodgeNeonNGCEngineConfigurationCrankBased(DECLARE_CONFIG_PARAMETER_SIGNATURE);
|
||||
void setDodgeNeonNGCEngineConfigurationCrankBased();
|
||||
|
||||
|
|
|
@ -12,8 +12,8 @@
|
|||
#include "dodge_ram.h"
|
||||
#include "custom_engine.h"
|
||||
|
||||
void setDodgeRam1996(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
|
||||
setFrankensoConfiguration(PASS_CONFIG_PARAMETER_SIGNATURE);
|
||||
void setDodgeRam1996() {
|
||||
setFrankensoConfiguration();
|
||||
|
||||
setOperationMode(engineConfiguration, FOUR_STROKE_CAM_SENSOR);
|
||||
engineConfiguration->trigger.type = TT_DODGE_RAM;
|
||||
|
|
|
@ -9,5 +9,5 @@
|
|||
|
||||
#include "engine_configuration.h"
|
||||
|
||||
void setDodgeRam1996(DECLARE_CONFIG_PARAMETER_SIGNATURE);
|
||||
void setDodgeRam1996();
|
||||
|
||||
|
|
|
@ -8,6 +8,6 @@
|
|||
#include "engine_template.h"
|
||||
#include "custom_engine.h"
|
||||
|
||||
void setEngineTemplateConfiguration(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
|
||||
setFrankensoConfiguration(PASS_CONFIG_PARAMETER_SIGNATURE);
|
||||
void setEngineTemplateConfiguration() {
|
||||
setFrankensoConfiguration();
|
||||
}
|
||||
|
|
|
@ -9,4 +9,4 @@
|
|||
|
||||
#include "engine_configuration.h"
|
||||
|
||||
void setEngineTemplateConfiguration(DECLARE_CONFIG_PARAMETER_SIGNATURE);
|
||||
void setEngineTemplateConfiguration();
|
||||
|
|
|
@ -18,8 +18,8 @@
|
|||
/**
|
||||
* @brief Default values for persistent properties
|
||||
*/
|
||||
void setFordInline6(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
|
||||
setDefaultFrankensoConfiguration(PASS_CONFIG_PARAMETER_SIGNATURE);
|
||||
void setFordInline6() {
|
||||
setDefaultFrankensoConfiguration();
|
||||
|
||||
engineConfiguration->specs.cylindersCount = 6;
|
||||
|
||||
|
@ -35,7 +35,7 @@ void setFordInline6(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
|
|||
/**
|
||||
* 0.5ms dweel time just to be sure it would fit within camshaft revolution, dwell is not controlled by us anyway
|
||||
*/
|
||||
setConstantDwell(0.5 PASS_CONFIG_PARAMETER_SUFFIX);
|
||||
setConstantDwell(0.5);
|
||||
|
||||
/**
|
||||
* We treat the trigger as 6/0 toothed wheel
|
||||
|
|
|
@ -9,4 +9,4 @@
|
|||
|
||||
#include "engine_configuration.h"
|
||||
|
||||
void setFordInline6(DECLARE_CONFIG_PARAMETER_SIGNATURE);
|
||||
void setFordInline6();
|
||||
|
|
|
@ -37,17 +37,17 @@ static const int8_t default_aspire_timing_table[16][16] = {
|
|||
};
|
||||
#endif
|
||||
|
||||
static void setDefaultAspireMaps(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
|
||||
setTimingLoadBin(1.2, 4.4 PASS_CONFIG_PARAMETER_SUFFIX);
|
||||
setTimingRpmBin(800, 7000 PASS_CONFIG_PARAMETER_SUFFIX);
|
||||
static void setDefaultAspireMaps() {
|
||||
setTimingLoadBin(1.2, 4.4);
|
||||
setTimingRpmBin(800, 7000);
|
||||
|
||||
#if IGN_LOAD_COUNT == DEFAULT_IGN_LOAD_COUNT
|
||||
copyTable(config->ignitionTable, default_aspire_timing_table);
|
||||
#endif
|
||||
}
|
||||
|
||||
void setFordAspireEngineConfiguration(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
|
||||
setDefaultFrankensoConfiguration(PASS_CONFIG_PARAMETER_SIGNATURE);
|
||||
void setFordAspireEngineConfiguration() {
|
||||
setDefaultFrankensoConfiguration();
|
||||
|
||||
engineConfiguration->tpsMin = 100;
|
||||
engineConfiguration->tpsMax = 750;
|
||||
|
@ -73,13 +73,13 @@ void setFordAspireEngineConfiguration(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
|
|||
engineConfiguration->globalTriggerAngleOffset = 175;
|
||||
engineConfiguration->extraInjectionOffset = 54 + 360;
|
||||
|
||||
setDefaultAspireMaps(PASS_CONFIG_PARAMETER_SIGNATURE);
|
||||
setDefaultAspireMaps();
|
||||
// set_cranking_rpm 550
|
||||
engineConfiguration->cranking.rpm = 550;
|
||||
// set cranking_timing_angle 37
|
||||
engineConfiguration->crankingTimingAngle = -37;
|
||||
|
||||
setSingleCoilDwell(PASS_CONFIG_PARAMETER_SIGNATURE);
|
||||
setSingleCoilDwell();
|
||||
engineConfiguration->ignitionMode = IM_ONE_COIL;
|
||||
setOperationMode(engineConfiguration, FOUR_STROKE_CAM_SENSOR);
|
||||
engineConfiguration->useOnlyRisingEdgeForTrigger = true;
|
||||
|
|
|
@ -13,4 +13,4 @@
|
|||
|
||||
#include "engine_configuration.h"
|
||||
|
||||
void setFordAspireEngineConfiguration(DECLARE_CONFIG_PARAMETER_SIGNATURE);
|
||||
void setFordAspireEngineConfiguration();
|
||||
|
|
|
@ -64,8 +64,8 @@ static const uint8_t racingFestivaVeTable[16][16] = {
|
|||
* pin 1I/W9 - extra +5v
|
||||
* set engine_type 14
|
||||
*/
|
||||
void setFordEscortGt(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
|
||||
common079721_2351(PASS_CONFIG_PARAMETER_SIGNATURE);
|
||||
void setFordEscortGt() {
|
||||
common079721_2351();
|
||||
|
||||
engineConfiguration->trigger.type = TT_MAZDA_DOHC_1_4;
|
||||
|
||||
|
@ -76,7 +76,7 @@ void setFordEscortGt(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
|
|||
|
||||
engineConfiguration->globalFuelCorrection = 0.75;
|
||||
engineConfiguration->specs.displacement = 1.839;
|
||||
setAlgorithm(LM_SPEED_DENSITY PASS_CONFIG_PARAMETER_SUFFIX);
|
||||
setAlgorithm(LM_SPEED_DENSITY);
|
||||
|
||||
static const float veRpmBins[] =
|
||||
{
|
||||
|
@ -123,14 +123,14 @@ void setFordEscortGt(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
|
|||
*/
|
||||
engineConfiguration->map.sensor.hwChannel = EFI_ADC_4;
|
||||
|
||||
setEgoSensor(ES_Innovate_MTX_L PASS_CONFIG_PARAMETER_SUFFIX);
|
||||
setEgoSensor(ES_Innovate_MTX_L);
|
||||
engineConfiguration->afr.hwChannel = EFI_ADC_2; // Frankenso analog #5 // PA2
|
||||
|
||||
// set_idle_position 10
|
||||
engineConfiguration->manIdlePosition = 10;
|
||||
engineConfiguration->crankingIACposition = 65;
|
||||
|
||||
setWholeIatCorrTimingTable(0 PASS_CONFIG_PARAMETER_SUFFIX);
|
||||
setWholeIatCorrTimingTable(0);
|
||||
|
||||
|
||||
// set global_trigger_offset_angle -37
|
||||
|
@ -141,10 +141,10 @@ void setFordEscortGt(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
|
|||
engineConfiguration->crankingTimingAngle = 3;
|
||||
|
||||
setLinearCurve(config->ignitionLoadBins, 20, 105, 5);
|
||||
setWholeTimingTable_d(10 PASS_CONFIG_PARAMETER_SUFFIX);
|
||||
setWholeTimingTable_d(10);
|
||||
setTable(config->lambdaTable, 0.92f);
|
||||
|
||||
setSingleCoilDwell(PASS_CONFIG_PARAMETER_SIGNATURE);
|
||||
setSingleCoilDwell();
|
||||
engineConfiguration->ignitionMode = IM_ONE_COIL;
|
||||
|
||||
engineConfiguration->triggerSimulatorPinModes[0] = OM_OPENDRAIN;
|
||||
|
|
|
@ -8,4 +8,4 @@
|
|||
#pragma once
|
||||
#include "engine_configuration.h"
|
||||
|
||||
void setFordEscortGt(DECLARE_CONFIG_PARAMETER_SIGNATURE);
|
||||
void setFordEscortGt();
|
||||
|
|
|
@ -34,17 +34,17 @@ static const uint8_t default_custom_timing_table[16][16] = {
|
|||
};
|
||||
#endif
|
||||
|
||||
static void setDefaultCustomMaps(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
|
||||
setTimingLoadBin(0,100 PASS_CONFIG_PARAMETER_SUFFIX);
|
||||
setTimingRpmBin(0,7000 PASS_CONFIG_PARAMETER_SUFFIX);
|
||||
static void setDefaultCustomMaps() {
|
||||
setTimingLoadBin(0,100);
|
||||
setTimingRpmBin(0,7000);
|
||||
|
||||
#if IGN_LOAD_COUNT == DEFAULT_IGN_LOAD_COUNT
|
||||
copyTable(config->ignitionTable, default_custom_timing_table);
|
||||
#endif
|
||||
}
|
||||
|
||||
void setHonda600(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
|
||||
setDefaultFrankensoConfiguration(PASS_CONFIG_PARAMETER_SIGNATURE);
|
||||
void setHonda600() {
|
||||
setDefaultFrankensoConfiguration();
|
||||
engineConfiguration->trigger.type = TT_HONDA_CBR_600;
|
||||
engineConfiguration->fuelAlgorithm = LM_ALPHA_N;
|
||||
|
||||
|
@ -128,8 +128,8 @@ void setHonda600(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
|
|||
engineConfiguration->injectionPins[2] = GPIOB_7; // #3
|
||||
engineConfiguration->injectionPins[3] = GPIOB_8; // #4
|
||||
|
||||
setDefaultCustomMaps(PASS_CONFIG_PARAMETER_SIGNATURE);
|
||||
setAlgorithm(LM_ALPHA_N PASS_CONFIG_PARAMETER_SUFFIX);
|
||||
setDefaultCustomMaps();
|
||||
setAlgorithm(LM_ALPHA_N);
|
||||
|
||||
engineConfiguration->injectionPins[4] = GPIO_UNASSIGNED;
|
||||
engineConfiguration->injectionPins[5] = GPIO_UNASSIGNED;
|
||||
|
|
|
@ -8,5 +8,5 @@
|
|||
#pragma once
|
||||
#include "engine_configuration.h"
|
||||
|
||||
void setHonda600(DECLARE_CONFIG_PARAMETER_SIGNATURE);
|
||||
void setHonda600();
|
||||
|
||||
|
|
|
@ -33,7 +33,7 @@
|
|||
#include "advance_map.h"
|
||||
#include "custom_engine.h"
|
||||
|
||||
static void setHondaAccordConfigurationCommon(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
|
||||
static void setHondaAccordConfigurationCommon() {
|
||||
engineConfiguration->map.sensor.type = MT_DENSO183;
|
||||
|
||||
// set ignition_mode 0
|
||||
|
@ -51,9 +51,9 @@ static void setHondaAccordConfigurationCommon(DECLARE_CONFIG_PARAMETER_SIGNATURE
|
|||
// Keihin 06164-P0A-A00
|
||||
engineConfiguration->injector.flow = 248;
|
||||
|
||||
setAlgorithm(LM_SPEED_DENSITY PASS_CONFIG_PARAMETER_SUFFIX);
|
||||
setAlgorithm(LM_SPEED_DENSITY);
|
||||
|
||||
buildTimingMap(35 PASS_CONFIG_PARAMETER_SUFFIX);
|
||||
buildTimingMap(35);
|
||||
|
||||
/**
|
||||
* 18K Ohm @ -20C
|
||||
|
@ -159,7 +159,7 @@ static void setHondaAccordConfigurationCommon(DECLARE_CONFIG_PARAMETER_SIGNATURE
|
|||
engineConfiguration->idle.solenoidFrequency = 500;
|
||||
}
|
||||
|
||||
void setHondaAccordConfiguration1_24(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
|
||||
void setHondaAccordConfiguration1_24() {
|
||||
engineConfiguration->trigger.type = TT_HONDA_1_24;
|
||||
setHondaAccordConfigurationCommon(PASS_CONFIG_PARAMETER_SIGNATURE);
|
||||
setHondaAccordConfigurationCommon();
|
||||
}
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
#pragma once
|
||||
#include "engine_configuration.h"
|
||||
|
||||
void setHondaAccordConfigurationTwoWires(DECLARE_CONFIG_PARAMETER_SIGNATURE);
|
||||
void setHondaAccordConfigurationTwoWires();
|
||||
|
||||
/**
|
||||
* https://technet.ff-squad.com/wiring.obd1.htm
|
||||
|
@ -18,4 +18,4 @@ void setHondaAccordConfigurationTwoWires(DECLARE_CONFIG_PARAMETER_SIGNATURE);
|
|||
* middle = 4 total, 1/cyl
|
||||
* inner CID cylinder ID = 1 total, 1/cam
|
||||
*/
|
||||
void setHondaAccordConfiguration1_24(DECLARE_CONFIG_PARAMETER_SIGNATURE);
|
||||
void setHondaAccordConfiguration1_24();
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
* K24A4 engine
|
||||
* PROTEUS_HONDA_ELEMENT_2003
|
||||
*/
|
||||
void setProteusHondaElement2003(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
|
||||
void setProteusHondaElement2003() {
|
||||
engineConfiguration->specs.cylindersCount = 4;
|
||||
engineConfiguration->specs.firingOrder = FO_1_3_4_2;
|
||||
engineConfiguration->specs.displacement = 2.4;
|
||||
|
@ -90,6 +90,6 @@ void setProteusHondaElement2003(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
|
|||
#endif // HW_PROTEUS
|
||||
}
|
||||
|
||||
void setProteusHondaOBD2A(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
|
||||
void setProteusHondaOBD2A() {
|
||||
|
||||
}
|
||||
|
|
|
@ -9,5 +9,5 @@
|
|||
|
||||
#include "engine_configuration.h"
|
||||
|
||||
void setProteusHondaElement2003(DECLARE_CONFIG_PARAMETER_SIGNATURE);
|
||||
void setProteusHondaOBD2A(DECLARE_CONFIG_PARAMETER_SIGNATURE);
|
||||
void setProteusHondaElement2003();
|
||||
void setProteusHondaOBD2A();
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
#include "hyundai.h"
|
||||
#include "map.h"
|
||||
|
||||
void setGenesisCoupeBK1(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
|
||||
void setGenesisCoupeBK1() {
|
||||
// 2010-2012 315cc at 43.5psi
|
||||
// fuel system is fixed pressure 55psi
|
||||
engineConfiguration->injector.flow = 354.19; // https://www.google.com/search?q=315*sqrt%2855%2F43.5%29
|
||||
|
@ -16,7 +16,7 @@ void setGenesisCoupeBK1(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
|
|||
|
||||
}
|
||||
|
||||
void setGenesisCoupeBK2(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
|
||||
void setGenesisCoupeBK2() {
|
||||
// 2013+ 450cc at 43.5
|
||||
// fuel system is fixed pressure 85psi
|
||||
// flow rate P2 = flow rate P1 * sqrt(P2/P1)
|
||||
|
|
|
@ -9,6 +9,6 @@
|
|||
|
||||
#include "engine_configuration.h"
|
||||
|
||||
void setGenesisCoupeBK1(DECLARE_CONFIG_PARAMETER_SIGNATURE);
|
||||
void setGenesisCoupeBK1();
|
||||
|
||||
void setGenesisCoupeBK2(DECLARE_CONFIG_PARAMETER_SIGNATURE);
|
||||
void setGenesisCoupeBK2();
|
||||
|
|
|
@ -8,6 +8,6 @@
|
|||
|
||||
#include "m111.h"
|
||||
|
||||
void setM111EngineConfiguration(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
|
||||
void setM111EngineConfiguration() {
|
||||
|
||||
}
|
||||
|
|
|
@ -12,4 +12,4 @@
|
|||
/**
|
||||
* set engine_type 68
|
||||
*/
|
||||
void setM111EngineConfiguration(DECLARE_CONFIG_PARAMETER_SIGNATURE);
|
||||
void setM111EngineConfiguration();
|
||||
|
|
|
@ -73,7 +73,7 @@ static const uint8_t miataNA8_maf_advance_table[16][16] = { {/*0 engineLoad=1.2
|
|||
+29, /*12 5760.0*/+28, /*13 6173.0*/+28, /*14 6586.0*/+27, /*15 7000.0*/+27 } };
|
||||
#endif
|
||||
|
||||
static void commonMiataNa(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
|
||||
static void commonMiataNa() {
|
||||
engineConfiguration->trigger.type = TT_MAZDA_MIATA_NA;
|
||||
engineConfiguration->engineChartSize = 100;
|
||||
|
||||
|
@ -106,8 +106,8 @@ static void commonMiataNa(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
|
|||
setCommonNTCSensor(&engineConfiguration->iat, 2700);
|
||||
}
|
||||
|
||||
void common079721_2351(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
|
||||
setDefaultFrankensoConfiguration(PASS_CONFIG_PARAMETER_SIGNATURE);
|
||||
void common079721_2351() {
|
||||
setDefaultFrankensoConfiguration();
|
||||
|
||||
engineConfiguration->engineChartSize = 300;
|
||||
|
||||
|
@ -143,8 +143,8 @@ void common079721_2351(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
|
|||
/**
|
||||
* Tom tomiata, Frankenstein board
|
||||
*/
|
||||
void setFrankensteinMiata1996(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
|
||||
commonMiataNa(PASS_CONFIG_PARAMETER_SIGNATURE);
|
||||
void setFrankensteinMiata1996() {
|
||||
commonMiataNa();
|
||||
engineConfiguration->specs.displacement = 1.839;
|
||||
|
||||
#if IGN_LOAD_COUNT == DEFAULT_IGN_LOAD_COUNT
|
||||
|
|
|
@ -13,5 +13,5 @@
|
|||
|
||||
#include "engine_configuration.h"
|
||||
|
||||
void common079721_2351(DECLARE_CONFIG_PARAMETER_SIGNATURE);
|
||||
void setFrankensteinMiata1996(DECLARE_CONFIG_PARAMETER_SIGNATURE);
|
||||
void common079721_2351();
|
||||
void setFrankensteinMiata1996();
|
||||
|
|
|
@ -24,7 +24,7 @@ static const float hardCodedmafDecodingBins[42] = {0.1, 0.2, 0.3, 0.4, 0.5, 0.59
|
|||
static const float hardCodedmafDecoding[256] = {570.0, 437.0, 351.5, 293.55078, 237.0, 186.0, 145.0, 116.0, 96.0, 78.84961, 65.549805, 56.049805, 48.0, 40.0, 33.25, 29.449951, 25.649902, 22.800049, 20.899902, 19.0, 17.100098, 16.149902, 13.775024, 12.824951, 11.400024, 10.449951, 9.5, 8.550049, 8.454956, 8.359985, 8.300049, 8.199951, 7.5999756, 7.125, 7.125, 7.125, 6.6500244, 6.6500244, 6.6500244, 6.6500244, 6.6500244, 6.6500244, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0};
|
||||
|
||||
/* Generated by TS2C on Fri Jul 31 14:02:18 EDT 2020*/
|
||||
static void setMafDecodingBins(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
|
||||
static void setMafDecodingBins() {
|
||||
for (size_t i = 0; i < 42; i++) {
|
||||
config->mafDecodingBins[i] = hardCodedmafDecodingBins[i];
|
||||
}
|
||||
|
@ -60,7 +60,7 @@ static const uint8_t hardCodedveTable[16][16] = {
|
|||
};
|
||||
|
||||
/* Generated by TS2C on Sun Aug 02 10:02:25 EDT 2020*/
|
||||
static void setMapVeTable(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
|
||||
static void setMapVeTable() {
|
||||
copyArray(config->veLoadBins, hardCodedveLoadBins);
|
||||
copyArray(config->veRpmBins, hardCodedveRpmBins);
|
||||
copyTable(config->veTable, hardCodedveTable);
|
||||
|
@ -91,7 +91,7 @@ static const uint8_t hardCodedVafveTable[16][16] = {
|
|||
};
|
||||
|
||||
/* Generated by TS2C on Tue Aug 11 21:13:28 EDT 2020*/
|
||||
static void setVafVeTable(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
|
||||
static void setVafVeTable() {
|
||||
copyArray(config->veLoadBins, hardCodedVafveLoadBins);
|
||||
copyArray(config->veRpmBins, hardCodedVafveRpmBins);
|
||||
copyTable(config->veTable, hardCodedVafveTable);
|
||||
|
@ -122,7 +122,7 @@ static const uint8_t hardCodedVafignitionTable[16][16] = {
|
|||
};
|
||||
|
||||
/* Generated by TS2C on Tue Aug 11 21:13:28 EDT 2020*/
|
||||
static void setVafIgnitionTable(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
|
||||
static void setVafIgnitionTable() {
|
||||
copyArray(config->ignitionLoadBins, hardCodedVafignitionLoadBins);
|
||||
copyArray(config->ignitionRpmBins, hardCodedVafignitionRpmBins);
|
||||
copyTable(config->ignitionTable, hardCodedVafignitionTable);
|
||||
|
@ -151,7 +151,7 @@ static const uint8_t mapBased16IgnitionTable[16][16] = {
|
|||
#endif
|
||||
|
||||
|
||||
static void miataNAcommonEngineSettings(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
|
||||
static void miataNAcommonEngineSettings() {
|
||||
engineConfiguration->trigger.type = TT_MAZDA_MIATA_NA;
|
||||
engineConfiguration->useOnlyRisingEdgeForTrigger = false;
|
||||
engineConfiguration->specs.cylindersCount = 4;
|
||||
|
@ -180,11 +180,11 @@ static void miataNAcommonEngineSettings(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
|
|||
|
||||
engineConfiguration->manIdlePosition = 34;
|
||||
|
||||
miataNA_setCltIdleCorrBins(PASS_CONFIG_PARAMETER_SIGNATURE);
|
||||
miataNA_setCltIdleRpmBins(PASS_CONFIG_PARAMETER_SIGNATURE);
|
||||
miataNA_setIacCoastingBins(PASS_CONFIG_PARAMETER_SIGNATURE);
|
||||
setMafDecodingBins(PASS_CONFIG_PARAMETER_SIGNATURE);
|
||||
miataNA_setIgnitionTable(PASS_CONFIG_PARAMETER_SIGNATURE);
|
||||
miataNA_setCltIdleCorrBins();
|
||||
miataNA_setCltIdleRpmBins();
|
||||
miataNA_setIacCoastingBins();
|
||||
setMafDecodingBins();
|
||||
miataNA_setIgnitionTable();
|
||||
|
||||
engineConfiguration->idle.solenoidFrequency = 160;
|
||||
engineConfiguration->ignitionMode = IM_WASTED_SPARK;
|
||||
|
@ -192,7 +192,7 @@ static void miataNAcommonEngineSettings(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
|
|||
engineConfiguration->isFasterEngineSpinUpEnabled = true;
|
||||
|
||||
|
||||
setMapVeTable(PASS_CONFIG_PARAMETER_SIGNATURE);
|
||||
setMapVeTable();
|
||||
|
||||
engineConfiguration->idleMode = IM_AUTO;
|
||||
// below 20% this valve seems to be opening for fail-safe idle air
|
||||
|
@ -246,7 +246,7 @@ static void miataNAcommonEngineSettings(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
|
|||
engineConfiguration->injectionMode = IM_BATCH;
|
||||
}
|
||||
|
||||
static void miataNAcommon(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
|
||||
static void miataNAcommon() {
|
||||
|
||||
engineConfiguration->idle.solenoidPin = GPIOB_9; // this W61 <> W61 jumper, pin 3W
|
||||
|
||||
|
@ -259,10 +259,10 @@ static void miataNAcommon(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
|
|||
/**
|
||||
* MIATA_NA6_MAP
|
||||
*/
|
||||
void setMiataNA6_MAP_Frankenso(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
|
||||
setDefaultFrankensoConfiguration(PASS_CONFIG_PARAMETER_SIGNATURE);
|
||||
setFrankensoConfiguration(PASS_CONFIG_PARAMETER_SIGNATURE);
|
||||
miataNAcommonEngineSettings(PASS_CONFIG_PARAMETER_SIGNATURE);
|
||||
void setMiataNA6_MAP_Frankenso() {
|
||||
setDefaultFrankensoConfiguration();
|
||||
setFrankensoConfiguration();
|
||||
miataNAcommonEngineSettings();
|
||||
|
||||
|
||||
engineConfiguration->isHip9011Enabled = false;
|
||||
|
@ -310,11 +310,11 @@ void setMiataNA6_MAP_Frankenso(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
|
|||
// W58 PE4 A/C fan relay out
|
||||
#endif /* EFI_UNIT_TEST */
|
||||
|
||||
miataNAcommon(PASS_CONFIG_PARAMETER_SIGNATURE);
|
||||
miataNAcommon();
|
||||
}
|
||||
|
||||
void setMiataNA6_VAF_Frankenso(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
|
||||
setMiataNA6_MAP_Frankenso(PASS_CONFIG_PARAMETER_SIGNATURE);
|
||||
void setMiataNA6_VAF_Frankenso() {
|
||||
setMiataNA6_MAP_Frankenso();
|
||||
|
||||
/**
|
||||
* Stage 0 we only have OEM TPS switch
|
||||
|
@ -327,14 +327,14 @@ void setMiataNA6_VAF_Frankenso(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
|
|||
/**
|
||||
* set engine_type 12
|
||||
*/
|
||||
void setMiataNA6_VAF_MRE(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
|
||||
setMiataNA6_MAP_MRE(PASS_CONFIG_PARAMETER_SIGNATURE);
|
||||
void setMiataNA6_VAF_MRE() {
|
||||
setMiataNA6_MAP_MRE();
|
||||
|
||||
engineConfiguration->fuelAlgorithm = LM_REAL_MAF;
|
||||
|
||||
|
||||
setVafVeTable(PASS_CONFIG_PARAMETER_SIGNATURE);
|
||||
setVafIgnitionTable(PASS_CONFIG_PARAMETER_SIGNATURE);
|
||||
setVafVeTable();
|
||||
setVafIgnitionTable();
|
||||
|
||||
#if (BOARD_TLE8888_COUNT > 0)
|
||||
|
||||
|
@ -345,8 +345,8 @@ void setMiataNA6_VAF_MRE(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
|
|||
/**
|
||||
* set engine_type 66
|
||||
*/
|
||||
void setMiataNA6_MAP_MRE(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
|
||||
miataNAcommonEngineSettings(PASS_CONFIG_PARAMETER_SIGNATURE);
|
||||
void setMiataNA6_MAP_MRE() {
|
||||
miataNAcommonEngineSettings();
|
||||
|
||||
engineConfiguration->triggerInputPins[0] = GPIOA_5;
|
||||
engineConfiguration->triggerInputPins[1] = GPIOC_6;
|
||||
|
@ -411,8 +411,8 @@ void setMiataNA6_MAP_MRE(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
|
|||
#endif /* BOARD_TLE8888_COUNT */
|
||||
}
|
||||
|
||||
void setMiata94_MAP_MRE(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
|
||||
setMiataNA6_MAP_MRE(PASS_CONFIG_PARAMETER_SIGNATURE);
|
||||
void setMiata94_MAP_MRE() {
|
||||
setMiataNA6_MAP_MRE();
|
||||
|
||||
#if (BOARD_TLE8888_COUNT > 0)
|
||||
// "35 - GP Out 1"
|
||||
|
@ -428,8 +428,8 @@ void setMiata94_MAP_MRE(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
|
|||
|
||||
}
|
||||
|
||||
void setHellenNA94(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
|
||||
miataNAcommonEngineSettings(PASS_CONFIG_PARAMETER_SIGNATURE);
|
||||
void setHellenNA94() {
|
||||
miataNAcommonEngineSettings();
|
||||
strcpy(CONFIG(engineCode), "94");
|
||||
/**
|
||||
* http://miataturbo.wikidot.com/fuel-injectors
|
||||
|
@ -449,7 +449,7 @@ void setHellenNA94(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
|
|||
engineConfiguration->fan2Pin = GPIOD_9; // 3S - A/C Fan 94-95
|
||||
}
|
||||
|
||||
void setHellenNA6(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
|
||||
miataNAcommonEngineSettings(PASS_CONFIG_PARAMETER_SIGNATURE);
|
||||
void setHellenNA6() {
|
||||
miataNAcommonEngineSettings();
|
||||
engineConfiguration->map.sensor.type = MT_MPX4250;
|
||||
}
|
||||
|
|
|
@ -12,24 +12,24 @@
|
|||
/**
|
||||
* set engine_type 57
|
||||
*/
|
||||
void setMiataNA6_VAF_Frankenso(DECLARE_CONFIG_PARAMETER_SIGNATURE);
|
||||
void setMiataNA6_VAF_Frankenso();
|
||||
/**
|
||||
* set engine_type 41
|
||||
*/
|
||||
void setMiataNA6_MAP_Frankenso(DECLARE_CONFIG_PARAMETER_SIGNATURE);
|
||||
void setMiataNA6_MAP_Frankenso();
|
||||
|
||||
void setMiataNA6_VAF_MRE(DECLARE_CONFIG_PARAMETER_SIGNATURE);
|
||||
void setMiataNA6_MAP_MRE(DECLARE_CONFIG_PARAMETER_SIGNATURE);
|
||||
void setMiataNA6_VAF_MRE();
|
||||
void setMiataNA6_MAP_MRE();
|
||||
|
||||
/**
|
||||
* set engine_type 20
|
||||
*/
|
||||
void setMiata94_MAP_MRE(DECLARE_CONFIG_PARAMETER_SIGNATURE);
|
||||
void setMiata94_MAP_MRE();
|
||||
|
||||
|
||||
/**
|
||||
* set engine_type 34
|
||||
*/
|
||||
void setHellenNA6(DECLARE_CONFIG_PARAMETER_SIGNATURE);
|
||||
void setHellenNA6();
|
||||
|
||||
void setHellenNA94(DECLARE_CONFIG_PARAMETER_SIGNATURE);
|
||||
void setHellenNA94();
|
||||
|
|
|
@ -12,7 +12,7 @@ static const float hardCodedcrankingFuelBins[8] = {-20.0, -10.0, 3.6799927, 22.7
|
|||
static const float hardCodedcrankingFuelCoef[8] = {2.7999878, 2.2000122, 1.6900024, 1.2900009, 1.199997, 1.050003, 1.0, 1.0};
|
||||
|
||||
/* Generated by TS2C on Thu Jul 30 00:03:20 EDT 2020*/
|
||||
void miataNA_setCrankingFuelBins(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
|
||||
void miataNA_setCrankingFuelBins() {
|
||||
copyArray(config->crankingFuelBins, hardCodedcrankingFuelBins);
|
||||
copyArray(config->crankingFuelCoef, hardCodedcrankingFuelCoef);
|
||||
}
|
||||
|
@ -22,7 +22,7 @@ static const float hardCodediacCoastingBins[16] = {-40.0, -30.0, -20.0, -10.0, 0
|
|||
static const float hardCodediacCoasting[16] = {40.0, 40.0, 40.0, 40.0, 40.0, 40.0, 40.0, 40.0, 40.0, 40.0, 40.0, 40.0, 40.0, 40.0, 40.0, 40.0};
|
||||
|
||||
/* Generated by TS2C on Fri Jul 31 14:02:18 EDT 2020*/
|
||||
void miataNA_setIacCoastingBins(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
|
||||
void miataNA_setIacCoastingBins() {
|
||||
copyArray(engineConfiguration->iacCoastingBins, hardCodediacCoastingBins);
|
||||
copyArray(engineConfiguration->iacCoasting, hardCodediacCoasting);
|
||||
}
|
||||
|
@ -32,7 +32,7 @@ static const float hardCodedcltIdleCorrBins[16] = {-40.0, -30.0, -20.0, -10.0, 0
|
|||
static const float hardCodedcltIdleCorr[16] = {1.4000015, 1.3199997, 1.2600021, 1.2099991, 1.1699982, 1.050003, 1.0299988, 1.0199966, 1.0299988, 1.0199966, 1.0100021, 1.0, 0.9900017, 0.9900017, 0.9900017, 0.9900017};
|
||||
|
||||
/* Generated by TS2C on Fri Jul 31 14:02:18 EDT 2020*/
|
||||
void miataNA_setCltIdleCorrBins(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
|
||||
void miataNA_setCltIdleCorrBins() {
|
||||
copyArray(config->cltIdleCorrBins, hardCodedcltIdleCorrBins);
|
||||
copyArray(config->cltIdleCorr, hardCodedcltIdleCorr);
|
||||
}
|
||||
|
@ -42,7 +42,7 @@ static const float hardCodedcltIdleRpmBins[16] = {-40.0, -30.0, -20.0, 0.0, 10.0
|
|||
static const float hardCodedcltIdleRpm[16] = {1180.0, 1150.0, 1130.0, 1110.0, 1090.0, 1070.0, 1050.0, 1020.0, 990.0, 970.0, 950.0, 950.0, 950.0, 950.0, 950.0, 950.0};
|
||||
|
||||
/* Generated by TS2C on Fri Jul 31 14:02:18 EDT 2020*/
|
||||
void miataNA_setCltIdleRpmBins(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
|
||||
void miataNA_setCltIdleRpmBins() {
|
||||
copyArray(engineConfiguration->cltIdleRpmBins, hardCodedcltIdleRpmBins);
|
||||
copyArray(engineConfiguration->cltIdleRpm, hardCodedcltIdleRpm);
|
||||
}
|
||||
|
@ -72,7 +72,7 @@ static const uint8_t hardCodedignitionTable[16][16] = {
|
|||
};
|
||||
|
||||
/* Generated by TS2C on Sun Aug 02 11:58:01 EDT 2020*/
|
||||
void miataNA_setIgnitionTable(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
|
||||
void miataNA_setIgnitionTable() {
|
||||
copyArray(config->ignitionLoadBins, hardCodedignitionLoadBins);
|
||||
copyArray(config->ignitionRpmBins, hardCodedignitionRpmBins);
|
||||
copyTable(config->ignitionTable, hardCodedignitionTable);
|
||||
|
|
|
@ -9,9 +9,9 @@
|
|||
|
||||
#include "global.h"
|
||||
|
||||
void miataNA_setCrankingCycleBins(DECLARE_CONFIG_PARAMETER_SIGNATURE);
|
||||
void miataNA_setCrankingFuelBins(DECLARE_CONFIG_PARAMETER_SIGNATURE);
|
||||
void miataNA_setIacCoastingBins(DECLARE_CONFIG_PARAMETER_SIGNATURE);
|
||||
void miataNA_setCltIdleCorrBins(DECLARE_CONFIG_PARAMETER_SIGNATURE);
|
||||
void miataNA_setCltIdleRpmBins(DECLARE_CONFIG_PARAMETER_SIGNATURE);
|
||||
void miataNA_setIgnitionTable(DECLARE_CONFIG_PARAMETER_SIGNATURE);
|
||||
void miataNA_setCrankingCycleBins();
|
||||
void miataNA_setCrankingFuelBins();
|
||||
void miataNA_setIacCoastingBins();
|
||||
void miataNA_setCltIdleCorrBins();
|
||||
void miataNA_setCltIdleRpmBins();
|
||||
void miataNA_setIgnitionTable();
|
||||
|
|
|
@ -81,8 +81,8 @@ static const float mazda_miata_nb2_targetLambdaLoadBins[FUEL_LOAD_COUNT] = {10.0
|
|||
90.0, 100.0, 110.0, 120.0,
|
||||
130.0, 140.0, 150.0, 160.0};
|
||||
|
||||
void setMazdaMiata2003EngineConfigurationNaFuelRail(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
|
||||
setMazdaMiata2003EngineConfiguration(PASS_CONFIG_PARAMETER_SIGNATURE);
|
||||
void setMazdaMiata2003EngineConfigurationNaFuelRail() {
|
||||
setMazdaMiata2003EngineConfiguration();
|
||||
|
||||
copyTable(config->scriptTable1, SCRIPT_TABLE_dyno);
|
||||
|
||||
|
@ -102,7 +102,7 @@ void setMazdaMiata2003EngineConfigurationNaFuelRail(DECLARE_CONFIG_PARAMETER_SIG
|
|||
|
||||
engineConfiguration->mafAdcChannel = EFI_ADC_4; // PA4
|
||||
|
||||
setEgoSensor(ES_14Point7_Free PASS_CONFIG_PARAMETER_SUFFIX);
|
||||
setEgoSensor(ES_14Point7_Free);
|
||||
|
||||
engineConfiguration->cranking.baseFuel = 27; // higher value for return system NA conversion since lower fuel pressure
|
||||
engineConfiguration->vbattDividerCoeff = 9.30; // actual value on my new board
|
||||
|
|
|
@ -21,8 +21,8 @@
|
|||
*
|
||||
* See also setMiataNA_1_6_Configuration
|
||||
*/
|
||||
void setMazdaMiataNA8Configuration(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
|
||||
setMiataNA6_MAP_Frankenso(PASS_CONFIG_PARAMETER_SIGNATURE);
|
||||
void setMazdaMiataNA8Configuration() {
|
||||
setMiataNA6_MAP_Frankenso();
|
||||
|
||||
// blue jumper wire to W45 bottom jumper, not OEM
|
||||
engineConfiguration->map.sensor.hwChannel = EFI_ADC_7;
|
||||
|
|
|
@ -9,4 +9,4 @@
|
|||
|
||||
#include "engine_configuration.h"
|
||||
|
||||
void setMazdaMiataNA8Configuration(DECLARE_CONFIG_PARAMETER_SIGNATURE);
|
||||
void setMazdaMiataNA8Configuration();
|
||||
|
|
|
@ -220,7 +220,7 @@ static const float mafTransferKgH[MAF_TRANSFER_SIZE] = {
|
|||
};
|
||||
|
||||
|
||||
static void setMAFTransferFunction(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
|
||||
static void setMAFTransferFunction() {
|
||||
memcpy(config->mafDecoding, mafTransferKgH, sizeof(mafTransferKgH));
|
||||
memcpy(config->mafDecodingBins, mafTransferVolts, sizeof(mafTransferVolts));
|
||||
for (int i = MAF_TRANSFER_SIZE;i<MAF_DECODING_COUNT;i++) {
|
||||
|
@ -229,12 +229,12 @@ static void setMAFTransferFunction(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
|
|||
}
|
||||
}
|
||||
|
||||
void setMazdaMiataNbInjectorLag(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
|
||||
void setMazdaMiataNbInjectorLag() {
|
||||
copyArray(engineConfiguration->injector.battLagCorr, injectorLagCorrection);
|
||||
copyArray(engineConfiguration->injector.battLagCorrBins, injectorLagBins);
|
||||
}
|
||||
|
||||
void setMazdaNB2VVTSettings(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
|
||||
void setMazdaNB2VVTSettings() {
|
||||
copyArray(config->vvtTable1RpmBins, vvt18fsioRpmBins);
|
||||
copyArray(config->vvtTable1LoadBins, vvt18fsioLoadBins);
|
||||
copyTable(config->vvtTable1, SCRIPT_TABLE_vvt_target);
|
||||
|
@ -251,7 +251,7 @@ void setMazdaNB2VVTSettings(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
|
|||
/**
|
||||
* stuff common between NA1 and NB2
|
||||
*/
|
||||
static void setCommonMazdaNB(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
|
||||
static void setCommonMazdaNB() {
|
||||
engineConfiguration->displayLogicLevelsInEngineSniffer = true;
|
||||
engineConfiguration->useOnlyRisingEdgeForTrigger = true;
|
||||
engineConfiguration->trigger.type = TT_MIATA_VVT;
|
||||
|
@ -279,7 +279,7 @@ static void setCommonMazdaNB(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
|
|||
// enable cylinder_cleanup
|
||||
engineConfiguration->isCylinderCleanupEnabled = true;
|
||||
// set_whole_ve_map 80
|
||||
setMazdaMiataNbInjectorLag(PASS_CONFIG_PARAMETER_SIGNATURE);
|
||||
setMazdaMiataNbInjectorLag();
|
||||
|
||||
engineConfiguration->idleMode = IM_AUTO;
|
||||
engineConfiguration->tachPulsePerRev = 2;
|
||||
|
@ -291,7 +291,7 @@ static void setCommonMazdaNB(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
|
|||
|
||||
setCommonNTCSensor(&engineConfiguration->clt, 2700);
|
||||
setCommonNTCSensor(&engineConfiguration->iat, 2700);
|
||||
setMAFTransferFunction(PASS_CONFIG_PARAMETER_SIGNATURE);
|
||||
setMAFTransferFunction();
|
||||
|
||||
// second harmonic (aka double) is usually quieter background noise
|
||||
// 13.8
|
||||
|
@ -318,21 +318,21 @@ static void setCommonMazdaNB(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
|
|||
engineConfiguration->idleRpmPid.dFactor = 5;
|
||||
engineConfiguration->idleRpmPid.periodMs = 10;
|
||||
|
||||
miataNA_setCltIdleCorrBins(PASS_CONFIG_PARAMETER_SIGNATURE);
|
||||
miataNA_setCltIdleRpmBins(PASS_CONFIG_PARAMETER_SIGNATURE);
|
||||
miataNA_setIacCoastingBins(PASS_CONFIG_PARAMETER_SIGNATURE);
|
||||
miataNA_setCltIdleCorrBins();
|
||||
miataNA_setCltIdleRpmBins();
|
||||
miataNA_setIacCoastingBins();
|
||||
}
|
||||
|
||||
static void setMazdaMiataEngineNB1Defaults(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
|
||||
setCommonMazdaNB(PASS_CONFIG_PARAMETER_SIGNATURE);
|
||||
static void setMazdaMiataEngineNB1Defaults() {
|
||||
setCommonMazdaNB();
|
||||
strcpy(CONFIG(engineCode), "NB1");
|
||||
}
|
||||
|
||||
static void setMazdaMiataEngineNB2Defaults(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
|
||||
static void setMazdaMiataEngineNB2Defaults() {
|
||||
strcpy(CONFIG(engineCode), "NB2");
|
||||
|
||||
engineConfiguration->map.sensor.type = MT_GM_3_BAR;
|
||||
setEgoSensor(ES_Innovate_MTX_L PASS_CONFIG_PARAMETER_SUFFIX);
|
||||
setEgoSensor(ES_Innovate_MTX_L);
|
||||
|
||||
/**
|
||||
* http://miataturbo.wikidot.com/fuel-injectors
|
||||
|
@ -358,9 +358,9 @@ static void setMazdaMiataEngineNB2Defaults(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
|
|||
engineConfiguration->vvtMode[0] = VVT_MIATA_NB2;
|
||||
engineConfiguration->vvtOffsets[0] = 98; // 2003 red car value
|
||||
|
||||
setCommonMazdaNB(PASS_CONFIG_PARAMETER_SIGNATURE);
|
||||
setCommonMazdaNB();
|
||||
|
||||
setMazdaNB2VVTSettings(PASS_CONFIG_PARAMETER_SIGNATURE);
|
||||
setMazdaNB2VVTSettings();
|
||||
|
||||
|
||||
|
||||
|
@ -373,10 +373,10 @@ static void setMazdaMiataEngineNB2Defaults(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
|
|||
} // end of setMazdaMiataEngineNB2Defaults
|
||||
|
||||
// MAZDA_MIATA_2003
|
||||
void setMazdaMiata2003EngineConfiguration(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
|
||||
setFrankensoConfiguration(PASS_CONFIG_PARAMETER_SIGNATURE);
|
||||
void setMazdaMiata2003EngineConfiguration() {
|
||||
setFrankensoConfiguration();
|
||||
|
||||
setMazdaMiataEngineNB2Defaults(PASS_CONFIG_PARAMETER_SIGNATURE);
|
||||
setMazdaMiataEngineNB2Defaults();
|
||||
|
||||
// engineConfiguration->triggerInputPins[0] = GPIOA_8; // custom Frankenso wiring in order to use SPI1 for accelerometer
|
||||
engineConfiguration->triggerInputPins[0] = GPIOA_5; // board still not modified
|
||||
|
@ -456,7 +456,7 @@ void setMazdaMiata2003EngineConfiguration(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
|
|||
engineConfiguration->scriptSetting[2] = 105; // #3 CLT threshold
|
||||
engineConfiguration->scriptSetting[3] = 12.0; // #4 voltage threshold
|
||||
|
||||
// setFsio(1, GPIOE_6, COMBINED_WARNING_LIGHT PASS_CONFIG_PARAMETER_SUFFIX);
|
||||
// setFsio(1, GPIOE_6, COMBINED_WARNING_LIGHT);
|
||||
|
||||
// enable auto_idle
|
||||
// enable verbose_idle
|
||||
|
@ -537,8 +537,8 @@ void setMazdaMiata2003EngineConfiguration(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
|
|||
* board #70 - closer to default miata NA6 harness
|
||||
*
|
||||
*/
|
||||
void setMazdaMiata2003EngineConfigurationBoardTest(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
|
||||
setMazdaMiata2003EngineConfiguration(PASS_CONFIG_PARAMETER_SIGNATURE);
|
||||
void setMazdaMiata2003EngineConfigurationBoardTest() {
|
||||
setMazdaMiata2003EngineConfiguration();
|
||||
|
||||
engineConfiguration->ignitionPins[2] = GPIOC_7;
|
||||
|
||||
|
@ -548,9 +548,9 @@ void setMazdaMiata2003EngineConfigurationBoardTest(DECLARE_CONFIG_PARAMETER_SIGN
|
|||
engineConfiguration->mafAdcChannel = EFI_ADC_4; // PA4 - W47 top <>W47
|
||||
}
|
||||
|
||||
static void setMiataNB2_MRE_common(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
|
||||
static void setMiataNB2_MRE_common() {
|
||||
#if (BOARD_TLE8888_COUNT > 0)
|
||||
setMazdaMiataEngineNB2Defaults(PASS_CONFIG_PARAMETER_SIGNATURE);
|
||||
setMazdaMiataEngineNB2Defaults();
|
||||
|
||||
// MRE has a special main relay control low side pin - rusEfi firmware is totally not involved with main relay control
|
||||
//
|
||||
|
@ -624,15 +624,15 @@ static void setMiataNB2_MRE_common(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
|
|||
* Pretty much OEM 2003 Miata with ETB
|
||||
* set engine_type 13
|
||||
*/
|
||||
void setMiataNB2_MRE_ETB(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
|
||||
setMiataNB2_MRE_common(PASS_CONFIG_PARAMETER_SIGNATURE);
|
||||
void setMiataNB2_MRE_ETB() {
|
||||
setMiataNB2_MRE_common();
|
||||
|
||||
CONFIG(useETBforIdleControl) = true;
|
||||
|
||||
#if EFI_FSIO
|
||||
// enable ETB
|
||||
// set_rpn_expression 8 "0"
|
||||
// todo lua ETB setFsio(7, GPIOC_8, "0" PASS_CONFIG_PARAMETER_SUFFIX);
|
||||
// todo lua ETB setFsio(7, GPIOC_8, "0");
|
||||
#endif /* EFI_FSIO */
|
||||
|
||||
//set idle_offset 0
|
||||
|
@ -657,8 +657,8 @@ void setMiataNB2_MRE_ETB(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
|
|||
* Normal mechanical throttle body
|
||||
* set engine_type 11
|
||||
*/
|
||||
void setMiataNB2_MRE_MAP(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
|
||||
setMiataNB2_MRE_common(PASS_CONFIG_PARAMETER_SIGNATURE);
|
||||
void setMiataNB2_MRE_MAP() {
|
||||
setMiataNB2_MRE_common();
|
||||
|
||||
// somehow MRE72 adapter 0.2 has TPS routed to pin 26?
|
||||
engineConfiguration->tps1_1AdcChannel = EFI_ADC_6; // PA6
|
||||
|
@ -668,8 +668,8 @@ void setMiataNB2_MRE_MAP(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
|
|||
engineConfiguration->mafAdcChannel = EFI_ADC_13; // J30 AV5
|
||||
}
|
||||
|
||||
void setMiataNB2_MRE_MAF(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
|
||||
setMiataNB2_MRE_MAP(PASS_CONFIG_PARAMETER_SIGNATURE);
|
||||
void setMiataNB2_MRE_MAF() {
|
||||
setMiataNB2_MRE_MAP();
|
||||
|
||||
engineConfiguration->fuelAlgorithm = LM_REAL_MAF;
|
||||
}
|
||||
|
@ -678,7 +678,7 @@ void setMiataNB2_MRE_MAF(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
|
|||
* https://github.com/rusefi/rusefi/wiki/HOWTO-TCU-A42DE-on-Proteus
|
||||
*/
|
||||
#if HW_PROTEUS
|
||||
void setMiataNB2_Proteus_TCU(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
|
||||
void setMiataNB2_Proteus_TCU() {
|
||||
engineConfiguration->tcuEnabled = true;
|
||||
|
||||
engineConfiguration->trigger.type = TT_TOOTHED_WHEEL;
|
||||
|
@ -732,8 +732,8 @@ void setMiataNB2_Proteus_TCU(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
|
|||
/**
|
||||
* https://github.com/rusefi/rusefi/wiki/HOWTO-Miata-NB2-on-Proteus
|
||||
*/
|
||||
void setMiataNB2_ProteusEngineConfiguration(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
|
||||
setMazdaMiataEngineNB2Defaults(PASS_CONFIG_PARAMETER_SIGNATURE);
|
||||
void setMiataNB2_ProteusEngineConfiguration() {
|
||||
setMazdaMiataEngineNB2Defaults();
|
||||
|
||||
engineConfiguration->triggerInputPins[0] = GPIOC_6; // pin 10/black23
|
||||
engineConfiguration->triggerInputPins[1] = GPIO_UNASSIGNED;
|
||||
|
@ -799,14 +799,14 @@ void setMiataNB2_ProteusEngineConfiguration(DECLARE_CONFIG_PARAMETER_SIGNATURE)
|
|||
#endif // HW_PROTEUS
|
||||
|
||||
#if HW_HELLEN
|
||||
void setHellenNB1(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
|
||||
setMazdaMiataEngineNB1Defaults(PASS_CONFIG_PARAMETER_SIGNATURE);
|
||||
void setHellenNB1() {
|
||||
setMazdaMiataEngineNB1Defaults();
|
||||
|
||||
engineConfiguration->injector.flow = 256;
|
||||
}
|
||||
|
||||
void setMiataNB2_Hellen72(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
|
||||
setMazdaMiataEngineNB2Defaults(PASS_CONFIG_PARAMETER_SIGNATURE);
|
||||
void setMiataNB2_Hellen72() {
|
||||
setMazdaMiataEngineNB2Defaults();
|
||||
strcpy(CONFIG(vehicleName), "H72 test");
|
||||
|
||||
|
||||
|
@ -815,8 +815,8 @@ void setMiataNB2_Hellen72(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
|
|||
|
||||
}
|
||||
|
||||
void setMiataNB2_Hellen72_36(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
|
||||
setMiataNB2_Hellen72(PASS_CONFIG_PARAMETER_SIGNATURE);
|
||||
void setMiataNB2_Hellen72_36() {
|
||||
setMiataNB2_Hellen72();
|
||||
|
||||
engineConfiguration->trigger.type = TT_TOOTHED_WHEEL_36_1;
|
||||
engineConfiguration->globalTriggerAngleOffset = 76;
|
||||
|
|
|
@ -11,51 +11,51 @@
|
|||
|
||||
#include "engine_configuration.h"
|
||||
|
||||
void setMazdaMiataNbInjectorLag(DECLARE_CONFIG_PARAMETER_SIGNATURE);
|
||||
void setMazdaNB2VVTSettings(DECLARE_CONFIG_PARAMETER_SIGNATURE);
|
||||
void setMazdaMiataNbInjectorLag();
|
||||
void setMazdaNB2VVTSettings();
|
||||
|
||||
/**
|
||||
* Primary rusEfi test mule https://rusefi.com/forum/viewtopic.php?f=3&t=1095
|
||||
* MAZDA_MIATA_2003
|
||||
* set engine_type 47
|
||||
*/
|
||||
void setMazdaMiata2003EngineConfiguration(DECLARE_CONFIG_PARAMETER_SIGNATURE);
|
||||
void setMazdaMiata2003EngineConfiguration();
|
||||
/**
|
||||
* race car - NA body and fuel system with NB2 engine
|
||||
*/
|
||||
void setMazdaMiata2003EngineConfigurationNaFuelRail(DECLARE_CONFIG_PARAMETER_SIGNATURE);
|
||||
void setMazdaMiata2003EngineConfigurationBoardTest(DECLARE_CONFIG_PARAMETER_SIGNATURE);
|
||||
void setMazdaMiata2003EngineConfigurationNaFuelRail();
|
||||
void setMazdaMiata2003EngineConfigurationBoardTest();
|
||||
|
||||
void setMiataNB2_MRE_ETB(DECLARE_CONFIG_PARAMETER_SIGNATURE);
|
||||
void setMiataNB2_MRE_ETB();
|
||||
|
||||
/**
|
||||
* OEM mechanical throttle body, with MAP
|
||||
* set engine_type 11
|
||||
*/
|
||||
void setMiataNB2_MRE_MAP(DECLARE_CONFIG_PARAMETER_SIGNATURE);
|
||||
void setMiataNB2_MRE_MAP();
|
||||
|
||||
/**
|
||||
* OEM mechanical throttle body using OEM MAF
|
||||
* set engine_type 15
|
||||
*/
|
||||
void setMiataNB2_MRE_MAF(DECLARE_CONFIG_PARAMETER_SIGNATURE);
|
||||
void setMiataNB2_MRE_MAF();
|
||||
|
||||
/**
|
||||
* https://github.com/rusefi/rusefi/wiki/Mazda-Miata-2001
|
||||
* set engine_type 1
|
||||
*/
|
||||
void setMiataNB2_Proteus_TCU(DECLARE_CONFIG_PARAMETER_SIGNATURE);
|
||||
void setMiataNB2_Proteus_TCU();
|
||||
|
||||
/**
|
||||
* set engine_type 67
|
||||
*/
|
||||
void setMiataNB2_ProteusEngineConfiguration(DECLARE_CONFIG_PARAMETER_SIGNATURE);
|
||||
void setMiataNB2_ProteusEngineConfiguration();
|
||||
|
||||
/**
|
||||
* set engine_type 69
|
||||
*/
|
||||
void setMiataNB2_Hellen72(DECLARE_CONFIG_PARAMETER_SIGNATURE);
|
||||
void setMiataNB2_Hellen72();
|
||||
|
||||
void setMiataNB2_Hellen72_36(DECLARE_CONFIG_PARAMETER_SIGNATURE);
|
||||
void setMiataNB2_Hellen72_36();
|
||||
|
||||
void setHellenNB1(DECLARE_CONFIG_PARAMETER_SIGNATURE);
|
||||
void setHellenNB1();
|
||||
|
|
|
@ -14,14 +14,14 @@
|
|||
/**
|
||||
* set engine_type 102
|
||||
*/
|
||||
void vag_18_Turbo(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
|
||||
void vag_18_Turbo() {
|
||||
|
||||
//Base Engine Settings
|
||||
|
||||
setOperationMode(engineConfiguration, FOUR_STROKE_CRANK_SENSOR);
|
||||
engineConfiguration->trigger.type = TT_60_2_VW;
|
||||
engineConfiguration->useOnlyRisingEdgeForTrigger = true;
|
||||
setAlgorithm(LM_SPEED_DENSITY PASS_CONFIG_PARAMETER_SUFFIX);
|
||||
setAlgorithm(LM_SPEED_DENSITY);
|
||||
|
||||
engineConfiguration->specs.cylindersCount = 4;
|
||||
engineConfiguration->specs.firingOrder = FO_1_3_4_2;
|
||||
|
@ -89,7 +89,7 @@ void vag_18_Turbo(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
|
|||
engineConfiguration->is_enabled_spi_3 = false;
|
||||
|
||||
#if EFI_CJ125
|
||||
cj125defaultPinout(PASS_CONFIG_PARAMETER_SIGNATURE);
|
||||
cj125defaultPinout();
|
||||
engineConfiguration->cj125ur = EFI_ADC_11; // PC3
|
||||
engineConfiguration->cj125CsPin = GPIOB_11;
|
||||
#endif
|
||||
|
@ -131,8 +131,8 @@ void vag_18_Turbo(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
|
|||
//ETB Settings
|
||||
|
||||
#if EFI_FSIO
|
||||
// todo lua setFsio (14, GPIOF_13, "1" PASS_CONFIG_PARAMETER_SUFFIX);
|
||||
// todo lua setFsioExt (3, GPIOE_0, "0.15 90 coolant 120 min max 90 - 30 / 0.8 * +", 25 PASS_CONFIG_PARAMETER_SUFFIX);
|
||||
// todo lua setFsio (14, GPIOF_13, "1");
|
||||
// todo lua setFsioExt (3, GPIOE_0, "0.15 90 coolant 120 min max 90 - 30 / 0.8 * +", 25);
|
||||
#endif
|
||||
// is this needed? engineConfiguration->vvtOutputFrequency[3] = 25;
|
||||
CONFIG(etb_use_two_wires) = true;
|
||||
|
@ -144,7 +144,7 @@ void vag_18_Turbo(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
|
|||
engineConfiguration->isHip9011Enabled = false;
|
||||
|
||||
#if EFI_FSIO
|
||||
// todo lua setFsio (15, GPIOE_6, "1" PASS_CONFIG_PARAMETER_SUFFIX);
|
||||
// todo lua setFsio (15, GPIOE_6, "1");
|
||||
#endif
|
||||
CONFIG(etbIo[1].directionPin1) = GPIOE_2;
|
||||
CONFIG(etbIo[1].directionPin2) = GPIOE_4;
|
||||
|
|
|
@ -9,5 +9,5 @@
|
|||
|
||||
#include "engine_configuration.h"
|
||||
|
||||
void vag_18_Turbo(DECLARE_CONFIG_PARAMETER_SIGNATURE);
|
||||
void vag_18_Turbo();
|
||||
|
||||
|
|
|
@ -8,26 +8,26 @@
|
|||
#include "pch.h"
|
||||
#include "custom_engine.h"
|
||||
|
||||
static void common(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
|
||||
setHellenDefaultVrThresholds(PASS_CONFIG_PARAMETER_SIGNATURE);
|
||||
static void common() {
|
||||
setHellenDefaultVrThresholds();
|
||||
engineConfiguration->vrThreshold[0].pin = GPIOD_14;
|
||||
}
|
||||
|
||||
void setHellenMercedes128_4_cyl(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
|
||||
common(PASS_CONFIG_PARAMETER_SIGNATURE);
|
||||
void setHellenMercedes128_4_cyl() {
|
||||
common();
|
||||
}
|
||||
|
||||
// is this M104 or M112 or both?
|
||||
void setHellenMercedes128_6_cyl(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
|
||||
common(PASS_CONFIG_PARAMETER_SIGNATURE);
|
||||
void setHellenMercedes128_6_cyl() {
|
||||
common();
|
||||
engineConfiguration->specs.cylindersCount = 6;
|
||||
// 1-4-2-5-3-6 M104
|
||||
engineConfiguration->specs.firingOrder = FO_1_4_3_6_2_5; // M112
|
||||
}
|
||||
|
||||
// M113
|
||||
void setHellenMercedes128_8_cyl(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
|
||||
common(PASS_CONFIG_PARAMETER_SIGNATURE);
|
||||
void setHellenMercedes128_8_cyl() {
|
||||
common();
|
||||
engineConfiguration->specs.cylindersCount = 8;
|
||||
engineConfiguration->specs.firingOrder = FO_1_5_4_2_6_3_7_8;
|
||||
}
|
||||
|
|
|
@ -9,6 +9,6 @@
|
|||
|
||||
#include "engine_configuration.h"
|
||||
|
||||
void setHellenMercedes128_4_cyl(DECLARE_CONFIG_PARAMETER_SIGNATURE);
|
||||
void setHellenMercedes128_6_cyl(DECLARE_CONFIG_PARAMETER_SIGNATURE);
|
||||
void setHellenMercedes128_8_cyl(DECLARE_CONFIG_PARAMETER_SIGNATURE);
|
||||
void setHellenMercedes128_4_cyl();
|
||||
void setHellenMercedes128_6_cyl();
|
||||
void setHellenMercedes128_8_cyl();
|
||||
|
|
|
@ -14,8 +14,8 @@
|
|||
#include "fsio_impl.h"
|
||||
#include "mitsubishi.h"
|
||||
|
||||
void setMitsubishiConfiguration(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
|
||||
setDefaultFrankensoConfiguration(PASS_CONFIG_PARAMETER_SIGNATURE);
|
||||
void setMitsubishiConfiguration() {
|
||||
setDefaultFrankensoConfiguration();
|
||||
|
||||
engineConfiguration->trigger.type = TT_MITSUBISHI; // same trigger as 4G63?
|
||||
|
||||
|
@ -73,7 +73,7 @@ void setMitsubishiConfiguration(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
|
|||
engineConfiguration->HD44780width = 20;
|
||||
engineConfiguration->HD44780height = 4;
|
||||
|
||||
setEgoSensor(ES_Innovate_MTX_L PASS_CONFIG_PARAMETER_SUFFIX);
|
||||
setEgoSensor(ES_Innovate_MTX_L);
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -9,5 +9,5 @@
|
|||
|
||||
#include "engine_configuration.h"
|
||||
|
||||
void setMitsubishiConfiguration(DECLARE_CONFIG_PARAMETER_SIGNATURE);
|
||||
void setMitsubishiConfiguration();
|
||||
|
||||
|
|
|
@ -12,8 +12,8 @@
|
|||
|
||||
#include "nissan_primera.h"
|
||||
|
||||
void setNissanPrimeraEngineConfiguration(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
|
||||
setDefaultFrankensoConfiguration(PASS_CONFIG_PARAMETER_SIGNATURE);
|
||||
void setNissanPrimeraEngineConfiguration() {
|
||||
setDefaultFrankensoConfiguration();
|
||||
|
||||
engineConfiguration->trigger.type = TT_NISSAN_SR20VE;
|
||||
|
||||
|
@ -21,6 +21,6 @@ void setNissanPrimeraEngineConfiguration(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
|
|||
engineConfiguration->auxValves[1] = GPIOE_12;
|
||||
}
|
||||
|
||||
void setNissanPrimeraEngineConfiguration_360(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
|
||||
void setNissanPrimeraEngineConfiguration_360() {
|
||||
engineConfiguration->trigger.type = TT_NISSAN_SR20VE_360;
|
||||
}
|
||||
|
|
|
@ -9,5 +9,5 @@
|
|||
|
||||
#include "engine_configuration.h"
|
||||
|
||||
void setNissanPrimeraEngineConfiguration(DECLARE_CONFIG_PARAMETER_SIGNATURE);
|
||||
void setNissanPrimeraEngineConfiguration_360(DECLARE_CONFIG_PARAMETER_SIGNATURE);
|
||||
void setNissanPrimeraEngineConfiguration();
|
||||
void setNissanPrimeraEngineConfiguration_360();
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
|
||||
#include "nissan_vq.h"
|
||||
|
||||
void setHellen121nissanQR(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
|
||||
void setHellen121nissanQR() {
|
||||
engineConfiguration->trigger.type = TT_NISSAN_QR25;
|
||||
|
||||
engineConfiguration->specs.cylindersCount = 4;
|
||||
|
@ -26,7 +26,7 @@ void setHellen121nissanQR(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
|
|||
|
||||
}
|
||||
|
||||
void setHellen121nissanVQ(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
|
||||
void setHellen121nissanVQ() {
|
||||
engineConfiguration->trigger.type = TT_NISSAN_VQ35;
|
||||
|
||||
engineConfiguration->specs.cylindersCount = 6;
|
||||
|
@ -43,10 +43,10 @@ void setHellen121nissanVQ(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
|
|||
engineConfiguration->vvtOffsets[1 * CAMS_PER_BANK] = NISSAN_VQ_VVT_OFFSET - NISSAN_VQ_CAM_OFFSET;
|
||||
}
|
||||
|
||||
void setHellen121nissanAltimaN16(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
|
||||
void setHellen121nissanAltimaN16() {
|
||||
// https://en.wikipedia.org/wiki/Nissan_QG_engine
|
||||
// https://en.wikipedia.org/wiki/N-VCT
|
||||
setHellen121nissanQR(PASS_CONFIG_PARAMETER_SIGNATURE);
|
||||
setHellen121nissanQR();
|
||||
engineConfiguration->specs.displacement = 1.8;
|
||||
strcpy(CONFIG(engineCode), "N16");
|
||||
|
||||
|
|
|
@ -12,6 +12,6 @@
|
|||
#define NISSAN_VQ_VVT_OFFSET -610
|
||||
#define NISSAN_VQ_CAM_OFFSET -360
|
||||
|
||||
void setHellen121nissanVQ(DECLARE_CONFIG_PARAMETER_SIGNATURE);
|
||||
void setHellen121nissanQR(DECLARE_CONFIG_PARAMETER_SIGNATURE);
|
||||
void setHellen121nissanAltimaN16(DECLARE_CONFIG_PARAMETER_SIGNATURE);
|
||||
void setHellen121nissanVQ();
|
||||
void setHellen121nissanQR();
|
||||
void setHellen121nissanAltimaN16();
|
||||
|
|
|
@ -12,8 +12,8 @@
|
|||
|
||||
#include "sachs.h"
|
||||
|
||||
void setSachs(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
|
||||
setDefaultFrankensoConfiguration(PASS_CONFIG_PARAMETER_SIGNATURE);
|
||||
void setSachs() {
|
||||
setDefaultFrankensoConfiguration();
|
||||
|
||||
engineConfiguration->specs.displacement = 0.1; // 100cc
|
||||
engineConfiguration->specs.cylindersCount = 1;
|
||||
|
@ -25,7 +25,7 @@ void setSachs(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
|
|||
// set injection_offset 0
|
||||
engineConfiguration->extraInjectionOffset = 0;
|
||||
|
||||
setEgoSensor(ES_Innovate_MTX_L PASS_CONFIG_PARAMETER_SUFFIX);
|
||||
setEgoSensor(ES_Innovate_MTX_L);
|
||||
|
||||
/**
|
||||
* 50/2 trigger
|
||||
|
@ -81,7 +81,7 @@ void setSachs(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
|
|||
engineConfiguration->fuelPumpPin = GPIOE_6;
|
||||
|
||||
// todo: extract a method? figure out something smarter
|
||||
setTimingRpmBin(800, 15000 PASS_CONFIG_PARAMETER_SUFFIX);
|
||||
setTimingRpmBin(800, 15000);
|
||||
setLinearCurve(config->veRpmBins, 7000, 15000, 1);
|
||||
setLinearCurve(config->lambdaRpmBins, 500, 7000, 1);
|
||||
}
|
||||
|
|
|
@ -8,5 +8,5 @@
|
|||
#pragma once
|
||||
#include "engine_configuration.h"
|
||||
|
||||
void setSachs(DECLARE_CONFIG_PARAMETER_SIGNATURE);
|
||||
void setSachs();
|
||||
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
#include "subaru.h"
|
||||
#include "custom_engine.h"
|
||||
|
||||
void setSubaru2003Wrx(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
|
||||
void setSubaru2003Wrx() {
|
||||
setFrankenso_01_LCD(engineConfiguration);
|
||||
setFrankenso0_1_joystick(engineConfiguration);
|
||||
|
||||
|
@ -37,7 +37,7 @@ void setSubaru2003Wrx(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
|
|||
* MRE_SUBARU_EJ18
|
||||
* set engine_type 37
|
||||
*/
|
||||
void setSubaruEJ18_MRE(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
|
||||
void setSubaruEJ18_MRE() {
|
||||
engineConfiguration->trigger.type = TT_SUBARU_7_WITHOUT_6;
|
||||
|
||||
|
||||
|
@ -65,7 +65,7 @@ void setSubaruEJ18_MRE(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
|
|||
* Subaru SVX (Alcyone SVX)
|
||||
*/
|
||||
|
||||
void setSubaruEG33Defaults(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
|
||||
void setSubaruEG33Defaults() {
|
||||
setOperationMode(engineConfiguration, FOUR_STROKE_CAM_SENSOR);
|
||||
|
||||
engineConfiguration->trigger.type = TT_SUBARU_SVX;
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
|
||||
#include "engine_configuration.h"
|
||||
|
||||
void setSubaru2003Wrx(DECLARE_CONFIG_PARAMETER_SIGNATURE);
|
||||
void setSubaruEJ20GDefaults(DECLARE_CONFIG_PARAMETER_SIGNATURE);
|
||||
void setSubaruEJ18_MRE(DECLARE_CONFIG_PARAMETER_SIGNATURE);
|
||||
void setSubaruEG33Defaults(DECLARE_ENGINE_PARAMETER_SIGNATURE);
|
||||
void setSubaru2003Wrx();
|
||||
void setSubaruEJ20GDefaults();
|
||||
void setSubaruEJ18_MRE();
|
||||
void setSubaruEG33Defaults();
|
||||
|
|
|
@ -15,8 +15,8 @@
|
|||
#include "test_engine.h"
|
||||
|
||||
// TEST_ENGINE
|
||||
void setTestEngineConfiguration(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
|
||||
setDefaultFrankensoConfiguration(PASS_CONFIG_PARAMETER_SIGNATURE);
|
||||
void setTestEngineConfiguration() {
|
||||
setDefaultFrankensoConfiguration();
|
||||
|
||||
setOperationMode(engineConfiguration, FOUR_STROKE_CAM_SENSOR);
|
||||
engineConfiguration->trigger.type = TT_ONE_PLUS_ONE;
|
||||
|
@ -32,13 +32,13 @@ void setTestEngineConfiguration(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
|
|||
engineConfiguration->tps1_1AdcChannel = EFI_ADC_2;
|
||||
engineConfiguration->vbattAdcChannel = EFI_ADC_NONE;
|
||||
|
||||
setWholeIatCorrTimingTable(0 PASS_CONFIG_PARAMETER_SUFFIX);
|
||||
setWholeIatCorrTimingTable(0);
|
||||
|
||||
// Many tests were written when the default target AFR was 14.0, so use that for tests by default.
|
||||
engineConfiguration->stoichRatioPrimary = 14.0f;
|
||||
|
||||
engineConfiguration->ignitionMode = IM_ONE_COIL;
|
||||
setConstantDwell(3 PASS_CONFIG_PARAMETER_SUFFIX); // 50% duty cycle @ 5000 rpm
|
||||
setConstantDwell(3); // 50% duty cycle @ 5000 rpm
|
||||
|
||||
engineConfiguration->malfunctionIndicatorPin = GPIO_UNASSIGNED;
|
||||
|
||||
|
@ -50,8 +50,8 @@ void setTestEngineConfiguration(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
|
|||
engineConfiguration->ignitionPins[5] = GPIO_UNASSIGNED; // #6
|
||||
}
|
||||
|
||||
void setTestVVTEngineConfiguration(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
|
||||
setDefaultFrankensoConfiguration(PASS_CONFIG_PARAMETER_SIGNATURE);
|
||||
void setTestVVTEngineConfiguration() {
|
||||
setDefaultFrankensoConfiguration();
|
||||
setOperationMode(engineConfiguration, FOUR_STROKE_CRANK_SENSOR);
|
||||
|
||||
engineConfiguration->trigger.type = TT_TOOTHED_WHEEL;
|
||||
|
@ -59,7 +59,7 @@ void setTestVVTEngineConfiguration(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
|
|||
engineConfiguration->trigger.customSkippedToothCount = 1;
|
||||
|
||||
// set algorithm 3
|
||||
setAlgorithm(LM_SPEED_DENSITY PASS_CONFIG_PARAMETER_SUFFIX);
|
||||
setAlgorithm(LM_SPEED_DENSITY);
|
||||
|
||||
engineConfiguration->triggerInputPins[1] = GPIO_UNASSIGNED;
|
||||
engineConfiguration->camInputs[0] = GPIOA_5;
|
||||
|
@ -72,8 +72,8 @@ void setTestVVTEngineConfiguration(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
|
|||
}
|
||||
|
||||
#if EFI_UNIT_TEST
|
||||
void setTestEngineIssue366both(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
|
||||
setTestEngineConfiguration(PASS_CONFIG_PARAMETER_SIGNATURE);
|
||||
void setTestEngineIssue366both() {
|
||||
setTestEngineConfiguration();
|
||||
|
||||
|
||||
engineConfiguration->useOnlyRisingEdgeForTrigger = false;
|
||||
|
@ -84,8 +84,8 @@ void setTestEngineIssue366both(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
|
|||
|
||||
}
|
||||
|
||||
void setTestEngineIssue366rise(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
|
||||
setTestEngineIssue366both(PASS_CONFIG_PARAMETER_SIGNATURE);
|
||||
void setTestEngineIssue366rise() {
|
||||
setTestEngineIssue366both();
|
||||
|
||||
|
||||
engineConfiguration->useOnlyRisingEdgeForTrigger = true;
|
||||
|
@ -93,7 +93,7 @@ void setTestEngineIssue366rise(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
|
|||
#endif /* EFI_UNIT_TEST */
|
||||
|
||||
#ifdef HARDWARE_CI
|
||||
void setProteusAnalogPwmTest(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
|
||||
void setProteusAnalogPwmTest() {
|
||||
// lowest cpu trigger possible
|
||||
engineConfiguration->trigger.type = TT_ONE;
|
||||
|
||||
|
|
|
@ -9,9 +9,9 @@
|
|||
|
||||
#include "engine_configuration.h"
|
||||
|
||||
void setTestEngineConfiguration(DECLARE_CONFIG_PARAMETER_SIGNATURE);
|
||||
void setTestVVTEngineConfiguration(DECLARE_CONFIG_PARAMETER_SIGNATURE);
|
||||
void setTestEngineConfiguration();
|
||||
void setTestVVTEngineConfiguration();
|
||||
|
||||
void setTestEngineIssue366both(DECLARE_CONFIG_PARAMETER_SIGNATURE);
|
||||
void setTestEngineIssue366rise(DECLARE_CONFIG_PARAMETER_SIGNATURE);
|
||||
void setProteusAnalogPwmTest(DECLARE_CONFIG_PARAMETER_SIGNATURE);
|
||||
void setTestEngineIssue366both();
|
||||
void setTestEngineIssue366rise();
|
||||
void setProteusAnalogPwmTest();
|
||||
|
|
|
@ -23,8 +23,8 @@
|
|||
#include "custom_engine.h"
|
||||
#include "mazda_miata_vvt.h"
|
||||
|
||||
static void common2jz(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
|
||||
setFrankensoConfiguration(PASS_CONFIG_PARAMETER_SIGNATURE); // default pinout
|
||||
static void common2jz() {
|
||||
setFrankensoConfiguration(); // default pinout
|
||||
|
||||
engineConfiguration->specs.displacement = 3.0;
|
||||
engineConfiguration->specs.cylindersCount = 6;
|
||||
|
@ -67,8 +67,8 @@ static void common2jz(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
|
|||
|
||||
}
|
||||
|
||||
void setToyota_jzs147EngineConfiguration(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
|
||||
common2jz(PASS_CONFIG_PARAMETER_SIGNATURE);
|
||||
void setToyota_jzs147EngineConfiguration() {
|
||||
common2jz();
|
||||
|
||||
setOperationMode(engineConfiguration, FOUR_STROKE_CAM_SENSOR);
|
||||
engineConfiguration->trigger.type = TT_2JZ_1_12;
|
||||
|
@ -99,8 +99,8 @@ void setToyota_jzs147EngineConfiguration(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
|
|||
* TOYOTA_2JZ_GTE_VVTi
|
||||
* set engine_type 44
|
||||
*/
|
||||
void setToyota_2jz_vics(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
|
||||
common2jz(PASS_CONFIG_PARAMETER_SIGNATURE);
|
||||
void setToyota_2jz_vics() {
|
||||
common2jz();
|
||||
|
||||
setOperationMode(engineConfiguration, FOUR_STROKE_CRANK_SENSOR);
|
||||
engineConfiguration->trigger.type = TT_TOOTHED_WHEEL_36_2;
|
||||
|
@ -133,7 +133,7 @@ void setToyota_2jz_vics(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
|
|||
engineConfiguration->vvtPins[0] = GPIOE_3; // VVT solenoid control
|
||||
|
||||
// Mazda VVT settings have nothing to do wit Toyota 2JZ settings but those are a good starting point for settings
|
||||
setMazdaNB2VVTSettings(PASS_CONFIG_PARAMETER_SIGNATURE);
|
||||
setMazdaNB2VVTSettings();
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -9,6 +9,6 @@
|
|||
|
||||
#include "engine_configuration.h"
|
||||
|
||||
void setToyota_jzs147EngineConfiguration(DECLARE_CONFIG_PARAMETER_SIGNATURE);
|
||||
void setToyota_2jz_vics(DECLARE_CONFIG_PARAMETER_SIGNATURE);
|
||||
void setToyota_jzs147EngineConfiguration();
|
||||
void setToyota_2jz_vics();
|
||||
|
||||
|
|
|
@ -14,10 +14,10 @@
|
|||
|
||||
// VW_ABA
|
||||
// set engine_type 32
|
||||
void setVwAba(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
|
||||
setFrankensoConfiguration(PASS_CONFIG_PARAMETER_SIGNATURE);
|
||||
void setVwAba() {
|
||||
setFrankensoConfiguration();
|
||||
|
||||
setWholeTimingTable_d(20 PASS_CONFIG_PARAMETER_SUFFIX);
|
||||
setWholeTimingTable_d(20);
|
||||
// set cranking_timing_angle 10
|
||||
engineConfiguration->crankingTimingAngle = 10;
|
||||
|
||||
|
@ -39,7 +39,7 @@ void setVwAba(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
|
|||
engineConfiguration->specs.displacement = 2.0;
|
||||
engineConfiguration->injector.flow = 320; // 30lb/h
|
||||
// set algorithm 3
|
||||
setAlgorithm(LM_SPEED_DENSITY PASS_CONFIG_PARAMETER_SUFFIX);
|
||||
setAlgorithm(LM_SPEED_DENSITY);
|
||||
engineConfiguration->map.sensor.type = MT_GM_3_BAR;
|
||||
|
||||
engineConfiguration->ignitionMode = IM_ONE_COIL;
|
||||
|
@ -55,27 +55,27 @@ void setVwAba(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
|
|||
|
||||
float mapRange = 110;
|
||||
|
||||
setEgoSensor(ES_PLX PASS_CONFIG_PARAMETER_SUFFIX);
|
||||
setFuelTablesLoadBin(20, mapRange PASS_CONFIG_PARAMETER_SUFFIX);
|
||||
setTimingLoadBin(20, mapRange PASS_CONFIG_PARAMETER_SUFFIX);
|
||||
setEgoSensor(ES_PLX);
|
||||
setFuelTablesLoadBin(20, mapRange);
|
||||
setTimingLoadBin(20, mapRange);
|
||||
|
||||
CONFIG(isSdCardEnabled) = false;
|
||||
engineConfiguration->tpsMin = 740;
|
||||
engineConfiguration->tpsMax = 135;
|
||||
}
|
||||
|
||||
void setHellen121Vag_5_cyl(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
|
||||
void setHellen121Vag_5_cyl() {
|
||||
engineConfiguration->specs.cylindersCount = 5;
|
||||
engineConfiguration->specs.displacement = 2.5;
|
||||
engineConfiguration->specs.firingOrder = FO_1_2_4_5_3;
|
||||
}
|
||||
|
||||
void setHellen121Vag_vr6_cyl(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
|
||||
void setHellen121Vag_vr6_cyl() {
|
||||
engineConfiguration->specs.cylindersCount = 6;
|
||||
engineConfiguration->specs.firingOrder = FO_1_5_3_6_2_4;
|
||||
}
|
||||
|
||||
void setHellen121Vag_v6_cyl(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
|
||||
void setHellen121Vag_v6_cyl() {
|
||||
engineConfiguration->specs.cylindersCount = 6;
|
||||
engineConfiguration->specs.displacement = 2.7;
|
||||
|
||||
|
@ -84,7 +84,7 @@ void setHellen121Vag_v6_cyl(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
|
|||
engineConfiguration->specs.firingOrder = FO_1_4_3_6_2_5;
|
||||
}
|
||||
|
||||
void setHellen121Vag_8_cyl(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
|
||||
void setHellen121Vag_8_cyl() {
|
||||
engineConfiguration->specs.cylindersCount = 8;
|
||||
engineConfiguration->specs.displacement = 4.2;
|
||||
engineConfiguration->specs.firingOrder = FO_1_5_4_8_6_3_7_2;
|
||||
|
|
|
@ -9,10 +9,10 @@
|
|||
|
||||
#include "engine_configuration.h"
|
||||
|
||||
void setVwAba(DECLARE_CONFIG_PARAMETER_SIGNATURE);
|
||||
void setVwAba();
|
||||
|
||||
|
||||
void setHellen121Vag_5_cyl(DECLARE_CONFIG_PARAMETER_SIGNATURE);
|
||||
void setHellen121Vag_vr6_cyl(DECLARE_CONFIG_PARAMETER_SIGNATURE);
|
||||
void setHellen121Vag_v6_cyl(DECLARE_CONFIG_PARAMETER_SIGNATURE);
|
||||
void setHellen121Vag_8_cyl(DECLARE_CONFIG_PARAMETER_SIGNATURE);
|
||||
void setHellen121Vag_5_cyl();
|
||||
void setHellen121Vag_vr6_cyl();
|
||||
void setHellen121Vag_v6_cyl();
|
||||
void setHellen121Vag_8_cyl();
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
* VW_B6
|
||||
* has to be microRusEFI 0.5.2
|
||||
*/
|
||||
void setVwPassatB6(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
|
||||
void setVwPassatB6() {
|
||||
#if (BOARD_TLE8888_COUNT > 0)
|
||||
setOperationMode(engineConfiguration, FOUR_STROKE_CRANK_SENSOR);
|
||||
engineConfiguration->trigger.type = TT_TOOTHED_WHEEL_60_2;
|
||||
|
@ -68,7 +68,7 @@ void setVwPassatB6(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
|
|||
CONFIG(isSdCardEnabled) = false;
|
||||
|
||||
CONFIG(mc33816spiDevice) = SPI_DEVICE_3;
|
||||
setBoschHDEV_5_injectors(PASS_CONFIG_PARAMETER_SIGNATURE);
|
||||
setBoschHDEV_5_injectors();
|
||||
// RED
|
||||
engineConfiguration->spi3mosiPin = GPIOC_12;
|
||||
// YELLOW
|
||||
|
@ -128,7 +128,7 @@ void setVwPassatB6(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
|
|||
// "7 - Lowside 1"
|
||||
// engineConfiguration->hpfpValvePin = TLE8888_PIN_6; // Disable for now
|
||||
|
||||
setBoschVAGETB(PASS_CONFIG_PARAMETER_SIGNATURE);
|
||||
setBoschVAGETB();
|
||||
|
||||
|
||||
engineConfiguration->injector.flow = 300;
|
||||
|
|
|
@ -7,4 +7,4 @@
|
|||
|
||||
#pragma once
|
||||
|
||||
void setVwPassatB6(DECLARE_CONFIG_PARAMETER_SIGNATURE);
|
||||
void setVwPassatB6();
|
||||
|
|
|
@ -76,7 +76,7 @@ static void setToothLogReady(bool value) {
|
|||
#endif // EFI_TUNER_STUDIO
|
||||
}
|
||||
|
||||
static void SetNextCompositeEntry(efitick_t timestamp DECLARE_ENGINE_PARAMETER_SUFFIX) {
|
||||
static void SetNextCompositeEntry(efitick_t timestamp) {
|
||||
uint32_t nowUs = NT2US(timestamp);
|
||||
|
||||
// TS uses big endian, grumble
|
||||
|
@ -106,7 +106,7 @@ static void SetNextCompositeEntry(efitick_t timestamp DECLARE_ENGINE_PARAMETER_S
|
|||
|
||||
}
|
||||
|
||||
void LogTriggerTooth(trigger_event_e tooth, efitick_t timestamp DECLARE_ENGINE_PARAMETER_SUFFIX) {
|
||||
void LogTriggerTooth(trigger_event_e tooth, efitick_t timestamp) {
|
||||
// bail if we aren't enabled
|
||||
if (!ToothLoggerEnabled) {
|
||||
return;
|
||||
|
@ -161,36 +161,36 @@ void LogTriggerTooth(trigger_event_e tooth, efitick_t timestamp DECLARE_ENGINE_P
|
|||
break;
|
||||
}
|
||||
|
||||
SetNextCompositeEntry(timestamp PASS_ENGINE_PARAMETER_SUFFIX);
|
||||
SetNextCompositeEntry(timestamp);
|
||||
}
|
||||
|
||||
void LogTriggerTopDeadCenter(efitick_t timestamp DECLARE_ENGINE_PARAMETER_SUFFIX) {
|
||||
void LogTriggerTopDeadCenter(efitick_t timestamp) {
|
||||
// bail if we aren't enabled
|
||||
if (!ToothLoggerEnabled) {
|
||||
return;
|
||||
}
|
||||
currentTdc = true;
|
||||
SetNextCompositeEntry(timestamp PASS_ENGINE_PARAMETER_SUFFIX);
|
||||
SetNextCompositeEntry(timestamp);
|
||||
currentTdc = false;
|
||||
SetNextCompositeEntry(timestamp + 10 PASS_ENGINE_PARAMETER_SUFFIX);
|
||||
SetNextCompositeEntry(timestamp + 10);
|
||||
}
|
||||
|
||||
void LogTriggerCoilState(efitick_t timestamp, bool state DECLARE_ENGINE_PARAMETER_SUFFIX) {
|
||||
void LogTriggerCoilState(efitick_t timestamp, bool state) {
|
||||
if (!ToothLoggerEnabled) {
|
||||
return;
|
||||
}
|
||||
currentCoilState = state;
|
||||
UNUSED(timestamp);
|
||||
//SetNextCompositeEntry(timestamp, trigger1, trigger2, trigger PASS_ENGINE_PARAMETER_SUFFIX);
|
||||
//SetNextCompositeEntry(timestamp, trigger1, trigger2, trigger);
|
||||
}
|
||||
|
||||
void LogTriggerInjectorState(efitick_t timestamp, bool state DECLARE_ENGINE_PARAMETER_SUFFIX) {
|
||||
void LogTriggerInjectorState(efitick_t timestamp, bool state) {
|
||||
if (!ToothLoggerEnabled) {
|
||||
return;
|
||||
}
|
||||
currentInjectorState = state;
|
||||
UNUSED(timestamp);
|
||||
//SetNextCompositeEntry(timestamp, trigger1, trigger2, trigger PASS_ENGINE_PARAMETER_SUFFIX);
|
||||
//SetNextCompositeEntry(timestamp, trigger1, trigger2, trigger);
|
||||
}
|
||||
|
||||
void EnableToothLogger() {
|
||||
|
|
|
@ -25,13 +25,13 @@ void EnableToothLogger();
|
|||
void DisableToothLogger();
|
||||
|
||||
// A new tooth has arrived! Log to the buffer if enabled.
|
||||
void LogTriggerTooth(trigger_event_e tooth, efitick_t timestamp DECLARE_ENGINE_PARAMETER_SUFFIX);
|
||||
void LogTriggerTooth(trigger_event_e tooth, efitick_t timestamp);
|
||||
|
||||
void LogTriggerTopDeadCenter(efitick_t timestamp DECLARE_ENGINE_PARAMETER_SUFFIX);
|
||||
void LogTriggerTopDeadCenter(efitick_t timestamp);
|
||||
|
||||
void LogTriggerCoilState(efitick_t timestamp, bool state DECLARE_ENGINE_PARAMETER_SUFFIX);
|
||||
void LogTriggerCoilState(efitick_t timestamp, bool state);
|
||||
|
||||
void LogTriggerInjectorState(efitick_t timestamp, bool state DECLARE_ENGINE_PARAMETER_SUFFIX);
|
||||
void LogTriggerInjectorState(efitick_t timestamp, bool state);
|
||||
|
||||
struct ToothLoggerBuffer
|
||||
{
|
||||
|
|
|
@ -211,7 +211,7 @@ static void handlePageSelectCommand(TsChannelBase *tsChannel, ts_response_format
|
|||
* On the contrary, 'hard parameters' are waiting for the Burn button to be clicked and configuration version
|
||||
* would be increased and much more complicated logic would be executed.
|
||||
*/
|
||||
static void onlineApplyWorkingCopyBytes(uint32_t offset, int count DECLARE_ENGINE_PARAMETER_SUFFIX) {
|
||||
static void onlineApplyWorkingCopyBytes(uint32_t offset, int count) {
|
||||
if (offset >= sizeof(engine_configuration_s)) {
|
||||
int maxSize = sizeof(persistent_config_s) - offset;
|
||||
if (count > maxSize) {
|
||||
|
@ -306,7 +306,7 @@ bool rebootForPresetPending = false;
|
|||
* @note See also handleWriteValueCommand
|
||||
*/
|
||||
void handleWriteChunkCommand(TsChannelBase* tsChannel, ts_response_format_e mode, uint16_t offset, uint16_t count,
|
||||
void *content DECLARE_ENGINE_PARAMETER_SUFFIX) {
|
||||
void *content) {
|
||||
tsState.writeChunkCommandCounter++;
|
||||
|
||||
efiPrintf("WRITE CHUNK mode=%d o=%d s=%d", mode, offset, count);
|
||||
|
@ -319,7 +319,7 @@ void handleWriteChunkCommand(TsChannelBase* tsChannel, ts_response_format_e mode
|
|||
if (!rebootForPresetPending) {
|
||||
uint8_t * addr = (uint8_t *) (getWorkingPageAddr() + offset);
|
||||
memcpy(addr, content, count);
|
||||
onlineApplyWorkingCopyBytes(offset, count PASS_ENGINE_PARAMETER_SUFFIX);
|
||||
onlineApplyWorkingCopyBytes(offset, count);
|
||||
}
|
||||
|
||||
sendOkResponse(tsChannel, mode);
|
||||
|
@ -398,7 +398,7 @@ static void handlePageReadCommand(TsChannelBase* tsChannel, ts_response_format_e
|
|||
|
||||
void requestBurn(void) {
|
||||
#if !EFI_UNIT_TEST
|
||||
onBurnRequest(PASS_ENGINE_PARAMETER_SIGNATURE);
|
||||
onBurnRequest();
|
||||
|
||||
#if EFI_INTERNAL_FLASH
|
||||
setNeedToWriteConfiguration();
|
||||
|
@ -415,7 +415,7 @@ static void sendResponseCode(ts_response_format_e mode, TsChannelBase *tsChannel
|
|||
/**
|
||||
* 'Burn' command is a command to commit the changes
|
||||
*/
|
||||
void handleBurnCommand(TsChannelBase* tsChannel, ts_response_format_e mode DECLARE_ENGINE_PARAMETER_SUFFIX) {
|
||||
void handleBurnCommand(TsChannelBase* tsChannel, ts_response_format_e mode) {
|
||||
efitimems_t nowMs = currentTimeMillis();
|
||||
tsState.burnCommandCounter++;
|
||||
|
||||
|
|
|
@ -48,7 +48,7 @@ bool handlePlainCommand(TsChannelBase* tsChannel, uint8_t command);
|
|||
*/
|
||||
void handleQueryCommand(TsChannelBase* tsChannel, ts_response_format_e mode);
|
||||
|
||||
void updateTunerStudioState(TunerStudioOutputChannels *tsOutputChannels DECLARE_ENGINE_PARAMETER_SUFFIX);
|
||||
void updateTunerStudioState(TunerStudioOutputChannels *tsOutputChannels);
|
||||
void printTsStats(void);
|
||||
void requestBurn(void);
|
||||
|
||||
|
@ -86,5 +86,5 @@ public:
|
|||
|
||||
#endif /* EFI_TUNER_STUDIO */
|
||||
|
||||
void handleWriteChunkCommand(TsChannelBase* tsChannel, ts_response_format_e mode, uint16_t offset, uint16_t count, void *content DECLARE_ENGINE_PARAMETER_SUFFIX);
|
||||
void handleBurnCommand(TsChannelBase* tsChannel, ts_response_format_e mode DECLARE_ENGINE_PARAMETER_SUFFIX);
|
||||
void handleWriteChunkCommand(TsChannelBase* tsChannel, ts_response_format_e mode, uint16_t offset, uint16_t count, void *content);
|
||||
void handleBurnCommand(TsChannelBase* tsChannel, ts_response_format_e mode);
|
||||
|
|
|
@ -135,13 +135,13 @@ static uint64_t binaryLogCount = 0;
|
|||
* This is useful if we are changing engine mode dynamically
|
||||
* For example http://rusefi.com/forum/viewtopic.php?f=5&t=1085
|
||||
*/
|
||||
static int packEngineMode(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
|
||||
static int packEngineMode() {
|
||||
return (engineConfiguration->fuelAlgorithm << 4) +
|
||||
(engineConfiguration->injectionMode << 2) +
|
||||
engineConfiguration->ignitionMode;
|
||||
}
|
||||
|
||||
static float getAirFlowGauge(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
|
||||
static float getAirFlowGauge() {
|
||||
return Sensor::get(SensorType::Maf).value_or(engine->engineState.airFlow);
|
||||
}
|
||||
|
||||
|
@ -312,7 +312,7 @@ static void showFuelInfo2(float rpm, float engineLoad) {
|
|||
|
||||
#if EFI_ENGINE_CONTROL
|
||||
static void showFuelInfo() {
|
||||
showFuelInfo2((float) GET_RPM(), getFuelingLoad(PASS_ENGINE_PARAMETER_SIGNATURE));
|
||||
showFuelInfo2((float) GET_RPM(), getFuelingLoad());
|
||||
}
|
||||
#endif
|
||||
|
||||
|
@ -592,8 +592,8 @@ static void updateFuelCorrections() {
|
|||
}
|
||||
|
||||
static void updateFuelLoads() {
|
||||
tsOutputChannels.fuelingLoad = getFuelingLoad(PASS_ENGINE_PARAMETER_SIGNATURE);
|
||||
tsOutputChannels.ignitionLoad = getIgnitionLoad(PASS_ENGINE_PARAMETER_SIGNATURE);
|
||||
tsOutputChannels.fuelingLoad = getFuelingLoad();
|
||||
tsOutputChannels.ignitionLoad = getIgnitionLoad();
|
||||
tsOutputChannels.veTableYAxis = ENGINE(engineState.currentVeLoad);
|
||||
tsOutputChannels.afrTableYAxis = ENGINE(engineState.currentAfrLoad);
|
||||
}
|
||||
|
@ -634,7 +634,7 @@ static void updateIgnition(int rpm) {
|
|||
// 60
|
||||
tsOutputChannels.sparkDwell = ENGINE(engineState.sparkDwell);
|
||||
|
||||
tsOutputChannels.coilDutyCycle = getCoilDutyCycle(rpm PASS_ENGINE_PARAMETER_SUFFIX);
|
||||
tsOutputChannels.coilDutyCycle = getCoilDutyCycle(rpm);
|
||||
|
||||
tsOutputChannels.knockRetard = ENGINE(knockController).getKnockRetard();
|
||||
}
|
||||
|
@ -681,7 +681,7 @@ static void updateTpsDebug() {
|
|||
tsOutputChannels.debugFloatField5 = 100 * Sensor::getOrZero(SensorType::Tps1Primary) / Sensor::getOrZero(SensorType::Tps1Secondary);
|
||||
}
|
||||
|
||||
void updateTunerStudioState(TunerStudioOutputChannels *tsOutputChannels DECLARE_ENGINE_PARAMETER_SUFFIX) {
|
||||
void updateTunerStudioState(TunerStudioOutputChannels *tsOutputChannels) {
|
||||
#if EFI_SHAFT_POSITION_INPUT
|
||||
int rpm = Sensor::get(SensorType::Rpm).Value;
|
||||
#else /* EFI_SHAFT_POSITION_INPUT */
|
||||
|
@ -707,7 +707,7 @@ void updateTunerStudioState(TunerStudioOutputChannels *tsOutputChannels DECLARE_
|
|||
tsOutputChannels->rpmAcceleration = engine->rpmCalculator.getRpmAcceleration();
|
||||
// offset 108
|
||||
// For air-interpolated tCharge mode, we calculate a decent massAirFlow approximation, so we can show it to users even without MAF sensor!
|
||||
tsOutputChannels->massAirFlow = getAirFlowGauge(PASS_ENGINE_PARAMETER_SIGNATURE);
|
||||
tsOutputChannels->massAirFlow = getAirFlowGauge();
|
||||
// offset 116
|
||||
// TPS acceleration
|
||||
tsOutputChannels->deltaTps = engine->tpsAccelEnrichment.getMaxDelta();
|
||||
|
@ -718,7 +718,7 @@ void updateTunerStudioState(TunerStudioOutputChannels *tsOutputChannels DECLARE_
|
|||
// 68
|
||||
// 140
|
||||
#if EFI_ENGINE_CONTROL
|
||||
tsOutputChannels->injectorDutyCycle = getInjectorDutyCycle(rpm PASS_ENGINE_PARAMETER_SUFFIX);
|
||||
tsOutputChannels->injectorDutyCycle = getInjectorDutyCycle(rpm);
|
||||
#endif
|
||||
|
||||
// 224
|
||||
|
@ -726,7 +726,7 @@ void updateTunerStudioState(TunerStudioOutputChannels *tsOutputChannels DECLARE_
|
|||
tsOutputChannels->timeSeconds = timeSeconds;
|
||||
|
||||
// 252
|
||||
tsOutputChannels->engineMode = packEngineMode(PASS_ENGINE_PARAMETER_SIGNATURE);
|
||||
tsOutputChannels->engineMode = packEngineMode();
|
||||
// 120
|
||||
tsOutputChannels->firmwareVersion = getRusEfiVersion();
|
||||
|
||||
|
@ -739,7 +739,7 @@ void updateTunerStudioState(TunerStudioOutputChannels *tsOutputChannels DECLARE_
|
|||
tsOutputChannels->accelerationYaw = engine->sensors.accelerometer.yaw;
|
||||
|
||||
#if EFI_DYNO_VIEW
|
||||
tsOutputChannels->VssAcceleration = getDynoviewAcceleration(PASS_ENGINE_PARAMETER_SIGNATURE);
|
||||
tsOutputChannels->VssAcceleration = getDynoviewAcceleration();
|
||||
#endif
|
||||
|
||||
tsOutputChannels->turboSpeed = Sensor::getOrZero(SensorType::TurbochargerSpeed);
|
||||
|
@ -849,8 +849,8 @@ void updateTunerStudioState(TunerStudioOutputChannels *tsOutputChannels DECLARE_
|
|||
break;
|
||||
#endif /* EFI_CAN_SUPPORT */
|
||||
case DBG_ANALOG_INPUTS:
|
||||
tsOutputChannels->debugFloatField4 = isAdcChannelValid(engineConfiguration->map.sensor.hwChannel) ? getVoltageDivided("map", engineConfiguration->map.sensor.hwChannel PASS_ENGINE_PARAMETER_SUFFIX) : 0.0f;
|
||||
tsOutputChannels->debugFloatField7 = isAdcChannelValid(engineConfiguration->afr.hwChannel) ? getVoltageDivided("ego", engineConfiguration->afr.hwChannel PASS_ENGINE_PARAMETER_SUFFIX) : 0.0f;
|
||||
tsOutputChannels->debugFloatField4 = isAdcChannelValid(engineConfiguration->map.sensor.hwChannel) ? getVoltageDivided("map", engineConfiguration->map.sensor.hwChannel) : 0.0f;
|
||||
tsOutputChannels->debugFloatField7 = isAdcChannelValid(engineConfiguration->afr.hwChannel) ? getVoltageDivided("ego", engineConfiguration->afr.hwChannel) : 0.0f;
|
||||
break;
|
||||
case DBG_ANALOG_INPUTS2:
|
||||
updateTpsDebug();
|
||||
|
@ -885,7 +885,7 @@ void updateTunerStudioState(TunerStudioOutputChannels *tsOutputChannels DECLARE_
|
|||
}
|
||||
}
|
||||
|
||||
void updateCurrentEnginePhase(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
|
||||
void updateCurrentEnginePhase() {
|
||||
if (auto phase = engine->triggerCentral.getCurrentEnginePhase(getTimeNowNt())) {
|
||||
tsOutputChannels.currentEnginePhase = phase.Value - tdcPosition();
|
||||
} else {
|
||||
|
@ -895,7 +895,7 @@ void updateCurrentEnginePhase(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
|
|||
|
||||
void prepareTunerStudioOutputs(void) {
|
||||
// sensor state for EFI Analytics Tuner Studio
|
||||
updateTunerStudioState(&tsOutputChannels PASS_ENGINE_PARAMETER_SUFFIX);
|
||||
updateTunerStudioState(&tsOutputChannels);
|
||||
}
|
||||
|
||||
#endif /* EFI_TUNER_STUDIO */
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
|
||||
void updateDevConsoleState(void);
|
||||
void prepareTunerStudioOutputs(void);
|
||||
void updateCurrentEnginePhase(DECLARE_ENGINE_PARAMETER_SIGNATURE);
|
||||
void updateCurrentEnginePhase();
|
||||
void startStatusThreads(void);
|
||||
void initStatusLoop(void);
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@ static Deadband<200> maxRpmDeadband;
|
|||
static Deadband<5> maxCltDeadband;
|
||||
static Deadband<5> maxTpsDeadband;
|
||||
|
||||
bool AcState::getAcState(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
|
||||
bool AcState::getAcState() {
|
||||
latest_usage_ac_control = getTimeNowSeconds();
|
||||
auto rpm = Sensor::getOrZero(SensorType::Rpm);
|
||||
|
||||
|
@ -51,8 +51,8 @@ bool AcState::getAcState(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
|
|||
return acButtonState;
|
||||
}
|
||||
|
||||
bool AcState::updateAc(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
|
||||
bool isEnabled = getAcState(PASS_ENGINE_PARAMETER_SIGNATURE);
|
||||
bool AcState::updateAc() {
|
||||
bool isEnabled = getAcState();
|
||||
|
||||
enginePins.acRelay.setValue(isEnabled);
|
||||
|
||||
|
|
|
@ -6,8 +6,8 @@
|
|||
class AcState final : public ac_control_s {
|
||||
public:
|
||||
// Returns true if AC is currently active
|
||||
bool updateAc(DECLARE_ENGINE_PARAMETER_SIGNATURE);
|
||||
bool updateAc();
|
||||
|
||||
private:
|
||||
bool getAcState(DECLARE_ENGINE_PARAMETER_SIGNATURE);
|
||||
bool getAcState();
|
||||
};
|
||||
|
|
|
@ -130,7 +130,7 @@ void onConfigurationChangeAlternatorCallback(engine_configuration_s *previousCon
|
|||
shouldResetPid = !alternatorPid.isSame(&previousConfiguration->alternatorControl);
|
||||
}
|
||||
|
||||
void initAlternatorCtrl(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
|
||||
void initAlternatorCtrl() {
|
||||
addConsoleAction("altinfo", showAltInfo);
|
||||
if (!isBrainPinValid(CONFIG(alternatorControlPin)))
|
||||
return;
|
||||
|
|
|
@ -143,7 +143,7 @@ void BoostController::setOutput(expected<float> output) {
|
|||
m_pwm->setSimplePwmDutyCycle(duty);
|
||||
}
|
||||
|
||||
setEtbWastegatePosition(percent PASS_ENGINE_PARAMETER_SUFFIX);
|
||||
setEtbWastegatePosition(percent);
|
||||
}
|
||||
|
||||
void BoostController::update() {
|
||||
|
@ -162,7 +162,7 @@ void updateBoostControl() {
|
|||
}
|
||||
}
|
||||
|
||||
void setDefaultBoostParameters(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
|
||||
void setDefaultBoostParameters() {
|
||||
engineConfiguration->boostPwmFrequency = 33;
|
||||
engineConfiguration->boostPid.offset = 0;
|
||||
engineConfiguration->boostPid.pFactor = 0.5;
|
||||
|
@ -210,7 +210,7 @@ void onConfigurationChangeBoostCallback(engine_configuration_s *previousConfigur
|
|||
boostController.onConfigurationChange(&previousConfiguration->boostPid);
|
||||
}
|
||||
|
||||
void initBoostCtrl(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
|
||||
void initBoostCtrl() {
|
||||
// todo: why do we have 'isBoostControlEnabled' setting exactly?
|
||||
// 'initAuxPid' is an example of a subsystem without explicit enable
|
||||
if (!CONFIG(isBoostControlEnabled)) {
|
||||
|
|
|
@ -42,8 +42,8 @@ private:
|
|||
};
|
||||
|
||||
void startBoostPin();
|
||||
void initBoostCtrl(DECLARE_ENGINE_PARAMETER_SIGNATURE);
|
||||
void setDefaultBoostParameters(DECLARE_CONFIG_PARAMETER_SIGNATURE);
|
||||
void initBoostCtrl();
|
||||
void setDefaultBoostParameters();
|
||||
void onConfigurationChangeBoostCallback(engine_configuration_s *previousConfiguration);
|
||||
|
||||
void updateBoostControl();
|
||||
|
|
|
@ -114,7 +114,7 @@ public:
|
|||
|
||||
static DcHardware dcHardware[ETB_COUNT + DC_PER_STEPPER];
|
||||
|
||||
DcMotor* initDcMotor(const dc_io& io, size_t index, bool useTwoWires DECLARE_ENGINE_PARAMETER_SUFFIX) {
|
||||
DcMotor* initDcMotor(const dc_io& io, size_t index, bool useTwoWires) {
|
||||
auto& hw = dcHardware[index];
|
||||
|
||||
hw.start(
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
|
||||
class DcMotor;
|
||||
|
||||
DcMotor* initDcMotor(const dc_io& io, size_t index, bool useTwoWires DECLARE_ENGINE_PARAMETER_SUFFIX);
|
||||
DcMotor* initDcMotor(const dc_io& io, size_t index, bool useTwoWires);
|
||||
|
||||
// Manual control of motors for use by console commands
|
||||
void setDcMotorFrequency(size_t index, int hz);
|
||||
|
|
|
@ -102,7 +102,7 @@ static const float hardCodedetbHitachiBiasBins[8] = {0.0, 19.0, 21.0, 22.0, 23.0
|
|||
static const float hardCodedetbHitachiBiasValues[8] = {-18.0, -17.0, -15.0, 0.0, 16.0, 20.0, 20.0, 20.0};
|
||||
|
||||
/* Generated by TS2C on Thu Aug 20 21:10:02 EDT 2020*/
|
||||
void setHitachiEtbBiasBins(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
|
||||
void setHitachiEtbBiasBins() {
|
||||
copyArray(engineConfiguration->etbBiasBins, hardCodedetbHitachiBiasBins);
|
||||
copyArray(engineConfiguration->etbBiasValues, hardCodedetbHitachiBiasValues);
|
||||
}
|
||||
|
@ -703,7 +703,7 @@ static void showEthInfo() {
|
|||
#endif /* EFI_PROD_CODE */
|
||||
}
|
||||
|
||||
static void etbPidReset(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
|
||||
static void etbPidReset() {
|
||||
for (int i = 0 ; i < ETB_COUNT; i++) {
|
||||
if (auto controller = engine->etbControllers[i]) {
|
||||
controller->reset();
|
||||
|
@ -813,7 +813,7 @@ static const float boschBiasValues[] = {
|
|||
-15, -15, -10, 0, 19, 20, 26, 28
|
||||
};
|
||||
|
||||
void setBoschVAGETB(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
|
||||
void setBoschVAGETB() {
|
||||
// set tps_min 890
|
||||
engineConfiguration->tpsMin = 890; // convert 12to10 bit (ADC/4)
|
||||
// set tps_max 70
|
||||
|
@ -828,12 +828,12 @@ void setBoschVAGETB(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
|
|||
engineConfiguration->etb.offset = 0;
|
||||
}
|
||||
|
||||
void setBoschVNH2SP30Curve(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
|
||||
void setBoschVNH2SP30Curve() {
|
||||
copyArray(CONFIG(etbBiasBins), boschBiasBins);
|
||||
copyArray(CONFIG(etbBiasValues), boschBiasValues);
|
||||
}
|
||||
|
||||
void setDefaultEtbParameters(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
|
||||
void setDefaultEtbParameters() {
|
||||
CONFIG(etbIdleThrottleRange) = 5;
|
||||
|
||||
setLinearCurve(config->pedalToTpsPedalBins, /*from*/0, /*to*/100, 1);
|
||||
|
@ -900,7 +900,7 @@ static const float defaultBiasValues[] = {
|
|||
-20, -18, -17, 0, 20, 21, 22, 25
|
||||
};
|
||||
|
||||
void setDefaultEtbBiasCurve(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
|
||||
void setDefaultEtbBiasCurve() {
|
||||
copyArray(CONFIG(etbBiasBins), defaultBiasBins);
|
||||
copyArray(CONFIG(etbBiasValues), defaultBiasValues);
|
||||
}
|
||||
|
@ -909,14 +909,14 @@ void unregisterEtbPins() {
|
|||
// todo: we probably need an implementation here?!
|
||||
}
|
||||
|
||||
static pid_s* getEtbPidForFunction(etb_function_e function DECLARE_ENGINE_PARAMETER_SUFFIX) {
|
||||
static pid_s* getEtbPidForFunction(etb_function_e function) {
|
||||
switch (function) {
|
||||
case ETB_Wastegate: return &CONFIG(etbWastegatePid);
|
||||
default: return &CONFIG(etb);
|
||||
}
|
||||
}
|
||||
|
||||
void doInitElectronicThrottle(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
|
||||
void doInitElectronicThrottle() {
|
||||
efiAssertVoid(OBD_PCM_Processor_Fault, engine->etbControllers != NULL, "etbControllers NULL");
|
||||
#if EFI_PROD_CODE
|
||||
addConsoleAction("ethinfo", showEthInfo);
|
||||
|
@ -925,7 +925,7 @@ void doInitElectronicThrottle(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
|
|||
|
||||
// this command is useful for real hardware test with known cheap hardware
|
||||
addConsoleAction("etb_test_hw", [](){
|
||||
set18919_AM810_pedal_position_sensor(PASS_CONFIG_PARAMETER_SIGNATURE);
|
||||
set18919_AM810_pedal_position_sensor();
|
||||
});
|
||||
|
||||
#endif /* EFI_PROD_CODE */
|
||||
|
@ -943,7 +943,7 @@ void doInitElectronicThrottle(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
|
|||
// do not touch HW pins if function not selected, this way Lua can use DC motor hardware pins directly
|
||||
continue;
|
||||
}
|
||||
auto motor = initDcMotor(engineConfiguration->etbIo[i], i, CONFIG(etb_use_two_wires) PASS_ENGINE_PARAMETER_SUFFIX);
|
||||
auto motor = initDcMotor(engineConfiguration->etbIo[i], i, CONFIG(etb_use_two_wires));
|
||||
|
||||
// If this motor is actually set up, init the etb
|
||||
if (motor)
|
||||
|
@ -953,10 +953,10 @@ void doInitElectronicThrottle(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
|
|||
continue;
|
||||
}
|
||||
|
||||
auto pid = getEtbPidForFunction(func PASS_ENGINE_PARAMETER_SUFFIX);
|
||||
auto pid = getEtbPidForFunction(func);
|
||||
|
||||
anyEtbConfigured |= controller->init(func, motor, pid, &pedal2tpsMap, shouldInitThrottles);
|
||||
engine->etbControllers[i]->inject(PASS_ENGINE_PARAMETER_SIGNATURE);
|
||||
engine->etbControllers[i]->inject();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -971,7 +971,7 @@ void doInitElectronicThrottle(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
|
|||
}
|
||||
|
||||
#if 0 && ! EFI_UNIT_TEST
|
||||
percent_t startupThrottlePosition = getTPS(PASS_ENGINE_PARAMETER_SIGNATURE);
|
||||
percent_t startupThrottlePosition = getTPS();
|
||||
if (absF(startupThrottlePosition - engineConfiguration->etbNeutralPosition) > STARTUP_NEUTRAL_POSITION_ERROR_THRESHOLD) {
|
||||
/**
|
||||
* Unexpected electronic throttle start-up position is worth a critical error
|
||||
|
@ -988,7 +988,7 @@ void doInitElectronicThrottle(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
|
|||
#endif
|
||||
}
|
||||
|
||||
void initElectronicThrottle(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
|
||||
void initElectronicThrottle() {
|
||||
if (hasFirmwareError()) {
|
||||
return;
|
||||
}
|
||||
|
@ -999,10 +999,10 @@ void initElectronicThrottle(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
|
|||
}
|
||||
#endif
|
||||
|
||||
doInitElectronicThrottle(PASS_ENGINE_PARAMETER_SIGNATURE);
|
||||
doInitElectronicThrottle();
|
||||
}
|
||||
|
||||
void setEtbIdlePosition(percent_t pos DECLARE_ENGINE_PARAMETER_SUFFIX) {
|
||||
void setEtbIdlePosition(percent_t pos) {
|
||||
if (!Sensor::hasSensor(SensorType::AcceleratorPedal)) {
|
||||
firmwareError(CUSTOM_NO_ETB_FOR_IDLE, "ETB idle does not work with unhappy accelerator pedal.");
|
||||
return;
|
||||
|
@ -1015,7 +1015,7 @@ void setEtbIdlePosition(percent_t pos DECLARE_ENGINE_PARAMETER_SUFFIX) {
|
|||
}
|
||||
}
|
||||
|
||||
void setEtbWastegatePosition(percent_t pos DECLARE_ENGINE_PARAMETER_SUFFIX) {
|
||||
void setEtbWastegatePosition(percent_t pos) {
|
||||
for (int i = 0; i < ETB_COUNT; i++) {
|
||||
if (auto etb = engine->etbControllers[i]) {
|
||||
etb->setWastegatePosition(pos);
|
||||
|
@ -1023,24 +1023,24 @@ void setEtbWastegatePosition(percent_t pos DECLARE_ENGINE_PARAMETER_SUFFIX) {
|
|||
}
|
||||
}
|
||||
|
||||
void set18919_AM810_pedal_position_sensor(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
|
||||
void set18919_AM810_pedal_position_sensor() {
|
||||
engineConfiguration->throttlePedalUpVoltage = 0.1;
|
||||
engineConfiguration->throttlePedalWOTVoltage = 4.5;
|
||||
engineConfiguration->throttlePedalSecondaryUpVoltage = 0.1;
|
||||
engineConfiguration->throttlePedalSecondaryWOTVoltage = 2.2;
|
||||
}
|
||||
|
||||
void setToyota89281_33010_pedal_position_sensor(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
|
||||
void setToyota89281_33010_pedal_position_sensor() {
|
||||
engineConfiguration->throttlePedalUpVoltage = 0;
|
||||
engineConfiguration->throttlePedalWOTVoltage = 4.1;
|
||||
engineConfiguration->throttlePedalSecondaryUpVoltage = 0.73;
|
||||
engineConfiguration->throttlePedalSecondaryWOTVoltage = 4.9;
|
||||
}
|
||||
|
||||
void setHitachiEtbCalibration(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
|
||||
setToyota89281_33010_pedal_position_sensor(PASS_CONFIG_PARAMETER_SIGNATURE);
|
||||
void setHitachiEtbCalibration() {
|
||||
setToyota89281_33010_pedal_position_sensor();
|
||||
|
||||
setHitachiEtbBiasBins(PASS_CONFIG_PARAMETER_SIGNATURE);
|
||||
setHitachiEtbBiasBins();
|
||||
|
||||
engineConfiguration->etb.pFactor = 2.7999;
|
||||
engineConfiguration->etb.iFactor = 25.5;
|
||||
|
@ -1057,8 +1057,8 @@ void setHitachiEtbCalibration(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
|
|||
CONFIG(tps1SecondaryMax) = CONFIG(tps2SecondaryMax) = 161;
|
||||
}
|
||||
|
||||
void setProteusHitachiEtbDefaults(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
|
||||
setHitachiEtbCalibration(PASS_CONFIG_PARAMETER_SIGNATURE);
|
||||
void setProteusHitachiEtbDefaults() {
|
||||
setHitachiEtbCalibration();
|
||||
|
||||
// EFI_ADC_12: "Analog Volt 3"
|
||||
engineConfiguration->tps1_2AdcChannel = EFI_ADC_12;
|
||||
|
|
|
@ -11,22 +11,22 @@
|
|||
#include "closed_loop_controller.h"
|
||||
#include "rusefi_types.h"
|
||||
|
||||
void initElectronicThrottle(DECLARE_ENGINE_PARAMETER_SIGNATURE);
|
||||
void doInitElectronicThrottle(DECLARE_ENGINE_PARAMETER_SIGNATURE);
|
||||
void initElectronicThrottle();
|
||||
void doInitElectronicThrottle();
|
||||
|
||||
void setEtbIdlePosition(percent_t pos DECLARE_ENGINE_PARAMETER_SUFFIX);
|
||||
void setEtbWastegatePosition(percent_t pos DECLARE_ENGINE_PARAMETER_SUFFIX);
|
||||
void setHitachiEtbCalibration(DECLARE_CONFIG_PARAMETER_SIGNATURE);
|
||||
void setEtbIdlePosition(percent_t pos);
|
||||
void setEtbWastegatePosition(percent_t pos);
|
||||
void setHitachiEtbCalibration();
|
||||
|
||||
// these two sensors use same plug but have different calibrations and even rotate in different directions
|
||||
void set18919_AM810_pedal_position_sensor(DECLARE_CONFIG_PARAMETER_SIGNATURE);
|
||||
void setToyota89281_33010_pedal_position_sensor(DECLARE_CONFIG_PARAMETER_SIGNATURE);
|
||||
void set18919_AM810_pedal_position_sensor();
|
||||
void setToyota89281_33010_pedal_position_sensor();
|
||||
|
||||
void setBoschVAGETB(DECLARE_CONFIG_PARAMETER_SIGNATURE);
|
||||
void setBoschVAGETB();
|
||||
|
||||
void setDefaultEtbBiasCurve(DECLARE_CONFIG_PARAMETER_SIGNATURE);
|
||||
void setDefaultEtbParameters(DECLARE_CONFIG_PARAMETER_SIGNATURE);
|
||||
void setBoschVNH2SP30Curve(DECLARE_CONFIG_PARAMETER_SIGNATURE);
|
||||
void setDefaultEtbBiasCurve();
|
||||
void setDefaultEtbParameters();
|
||||
void setBoschVNH2SP30Curve();
|
||||
void setEtbPFactor(float value);
|
||||
void setEtbIFactor(float value);
|
||||
void setEtbDFactor(float value);
|
||||
|
@ -34,7 +34,7 @@ void setEtbOffset(int value);
|
|||
void setThrottleDutyCycle(percent_t level);
|
||||
void onConfigurationChangeElectronicThrottleCallback(engine_configuration_s *previousConfiguration);
|
||||
void unregisterEtbPins();
|
||||
void setProteusHitachiEtbDefaults(DECLARE_CONFIG_PARAMETER_SIGNATURE);
|
||||
void setProteusHitachiEtbDefaults();
|
||||
|
||||
void etbAutocal(size_t throttleIndex);
|
||||
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue