don't require EXTERN_ENGINE in every file (#2969)
* move enginePins * no more extern engine * uses * more * extern config too * put this where it belongs * include correct header * merge
This commit is contained in:
parent
f87d1c425e
commit
2ce7777865
|
@ -15,8 +15,6 @@
|
||||||
#include "tps.h"
|
#include "tps.h"
|
||||||
#include "trigger_input.h"
|
#include "trigger_input.h"
|
||||||
|
|
||||||
EXTERN_ENGINE;
|
|
||||||
|
|
||||||
void setBoardDefaultConfiguration(void) {
|
void setBoardDefaultConfiguration(void) {
|
||||||
setOperationMode(engineConfiguration, FOUR_STROKE_CRANK_SENSOR);
|
setOperationMode(engineConfiguration, FOUR_STROKE_CRANK_SENSOR);
|
||||||
|
|
||||||
|
|
|
@ -17,8 +17,6 @@
|
||||||
#include "fsio_impl.h"
|
#include "fsio_impl.h"
|
||||||
#include "engine_configuration.h"
|
#include "engine_configuration.h"
|
||||||
|
|
||||||
EXTERN_ENGINE;
|
|
||||||
|
|
||||||
static void hellenWbo() {
|
static void hellenWbo() {
|
||||||
engineConfiguration->enableAemXSeries = true;
|
engineConfiguration->enableAemXSeries = true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -17,8 +17,6 @@
|
||||||
#include "fsio_impl.h"
|
#include "fsio_impl.h"
|
||||||
#include "engine_configuration.h"
|
#include "engine_configuration.h"
|
||||||
|
|
||||||
EXTERN_ENGINE;
|
|
||||||
|
|
||||||
static void hellenWbo() {
|
static void hellenWbo() {
|
||||||
engineConfiguration->enableAemXSeries = true;
|
engineConfiguration->enableAemXSeries = true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -17,8 +17,6 @@
|
||||||
#include "fsio_impl.h"
|
#include "fsio_impl.h"
|
||||||
#include "engine_configuration.h"
|
#include "engine_configuration.h"
|
||||||
|
|
||||||
EXTERN_ENGINE;
|
|
||||||
|
|
||||||
static void hellenWbo() {
|
static void hellenWbo() {
|
||||||
engineConfiguration->enableAemXSeries = true;
|
engineConfiguration->enableAemXSeries = true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -17,8 +17,6 @@
|
||||||
#include "fsio_impl.h"
|
#include "fsio_impl.h"
|
||||||
#include "engine_configuration.h"
|
#include "engine_configuration.h"
|
||||||
|
|
||||||
EXTERN_ENGINE;
|
|
||||||
|
|
||||||
static void setInjectorPins() {
|
static void setInjectorPins() {
|
||||||
engineConfiguration->injectionPins[0] = GPIOG_7;
|
engineConfiguration->injectionPins[0] = GPIOG_7;
|
||||||
engineConfiguration->injectionPins[1] = GPIOG_8;
|
engineConfiguration->injectionPins[1] = GPIOG_8;
|
||||||
|
|
|
@ -17,8 +17,6 @@
|
||||||
#include "fsio_impl.h"
|
#include "fsio_impl.h"
|
||||||
#include "engine_configuration.h"
|
#include "engine_configuration.h"
|
||||||
|
|
||||||
EXTERN_ENGINE;
|
|
||||||
|
|
||||||
static void hellenWbo() {
|
static void hellenWbo() {
|
||||||
engineConfiguration->enableAemXSeries = true;
|
engineConfiguration->enableAemXSeries = true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -14,8 +14,6 @@
|
||||||
#include "engine_math.h"
|
#include "engine_math.h"
|
||||||
#include "tps.h"
|
#include "tps.h"
|
||||||
|
|
||||||
EXTERN_ENGINE;
|
|
||||||
|
|
||||||
#if 0
|
#if 0
|
||||||
char __debugBuffer[80];
|
char __debugBuffer[80];
|
||||||
int __debugEnabled = 0;
|
int __debugEnabled = 0;
|
||||||
|
|
|
@ -25,8 +25,6 @@
|
||||||
#include "fsio_impl.h"
|
#include "fsio_impl.h"
|
||||||
#include "engine_configuration.h"
|
#include "engine_configuration.h"
|
||||||
|
|
||||||
EXTERN_ENGINE;
|
|
||||||
|
|
||||||
static void setInjectorPins() {
|
static void setInjectorPins() {
|
||||||
engineConfiguration->injectionPins[0] = TLE8888_PIN_1;
|
engineConfiguration->injectionPins[0] = TLE8888_PIN_1;
|
||||||
engineConfiguration->injectionPins[1] = TLE8888_PIN_2;
|
engineConfiguration->injectionPins[1] = TLE8888_PIN_2;
|
||||||
|
|
|
@ -13,8 +13,6 @@
|
||||||
#include "fsio_impl.h"
|
#include "fsio_impl.h"
|
||||||
#include "engine_configuration.h"
|
#include "engine_configuration.h"
|
||||||
|
|
||||||
EXTERN_ENGINE;
|
|
||||||
|
|
||||||
// Warning! This is a test config!
|
// Warning! This is a test config!
|
||||||
|
|
||||||
#undef SERIAL_SPEED
|
#undef SERIAL_SPEED
|
||||||
|
|
|
@ -14,8 +14,6 @@
|
||||||
#include "fsio_impl.h"
|
#include "fsio_impl.h"
|
||||||
#include "engine_configuration.h"
|
#include "engine_configuration.h"
|
||||||
|
|
||||||
EXTERN_ENGINE;
|
|
||||||
|
|
||||||
#ifdef STM32F469xx
|
#ifdef STM32F469xx
|
||||||
static bool is469 = true;
|
static bool is469 = true;
|
||||||
#else
|
#else
|
||||||
|
|
|
@ -11,8 +11,6 @@
|
||||||
#include "allsensors.h"
|
#include "allsensors.h"
|
||||||
#include "fsio_impl.h"
|
#include "fsio_impl.h"
|
||||||
|
|
||||||
EXTERN_ENGINE;
|
|
||||||
|
|
||||||
static const brain_pin_e injPins[] = {
|
static const brain_pin_e injPins[] = {
|
||||||
GPIOD_7,
|
GPIOD_7,
|
||||||
GPIOG_9,
|
GPIOG_9,
|
||||||
|
|
|
@ -34,8 +34,6 @@
|
||||||
#include "fsio_impl.h"
|
#include "fsio_impl.h"
|
||||||
#include "engine_configuration.h"
|
#include "engine_configuration.h"
|
||||||
|
|
||||||
EXTERN_ENGINE;
|
|
||||||
|
|
||||||
// An example of how to configure complex features on the board.
|
// An example of how to configure complex features on the board.
|
||||||
// Generally these should be local (static) functions, one function per chip.
|
// Generally these should be local (static) functions, one function per chip.
|
||||||
|
|
||||||
|
|
|
@ -16,8 +16,6 @@
|
||||||
#include "smart_gpio.h"
|
#include "smart_gpio.h"
|
||||||
#include "drivers/gpio/mc33810.h"
|
#include "drivers/gpio/mc33810.h"
|
||||||
|
|
||||||
EXTERN_ENGINE;
|
|
||||||
|
|
||||||
void setPinConfigurationOverrides(void) {
|
void setPinConfigurationOverrides(void) {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -18,8 +18,6 @@
|
||||||
#include "allsensors.h"
|
#include "allsensors.h"
|
||||||
#include "advance_map.h"
|
#include "advance_map.h"
|
||||||
|
|
||||||
EXTERN_CONFIG;
|
|
||||||
|
|
||||||
static void setDefault139qmbMaps(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
|
static void setDefault139qmbMaps(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
|
||||||
setTimingLoadBin(1.2, 4.4 PASS_CONFIG_PARAMETER_SUFFIX);
|
setTimingLoadBin(1.2, 4.4 PASS_CONFIG_PARAMETER_SUFFIX);
|
||||||
setTimingRpmBin(1000, 11000 PASS_CONFIG_PARAMETER_SUFFIX);
|
setTimingRpmBin(1000, 11000 PASS_CONFIG_PARAMETER_SUFFIX);
|
||||||
|
|
|
@ -80,8 +80,6 @@
|
||||||
#include "electronic_throttle.h"
|
#include "electronic_throttle.h"
|
||||||
#endif // EFI_ELECTRONIC_THROTTLE_BODY
|
#endif // EFI_ELECTRONIC_THROTTLE_BODY
|
||||||
|
|
||||||
EXTERN_CONFIG;
|
|
||||||
|
|
||||||
void m73engine(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
|
void m73engine(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
|
||||||
// 13641435991 injector
|
// 13641435991 injector
|
||||||
engineConfiguration->injector.flow = 180; // cc/min, who knows if this number is real - no good source of info
|
engineConfiguration->injector.flow = 180; // cc/min, who knows if this number is real - no good source of info
|
||||||
|
|
|
@ -63,8 +63,6 @@
|
||||||
#include "bmw_m73.h"
|
#include "bmw_m73.h"
|
||||||
#include "fsio_impl.h"
|
#include "fsio_impl.h"
|
||||||
|
|
||||||
EXTERN_CONFIG;
|
|
||||||
|
|
||||||
void setEngineBMW_M73_microRusEfi(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
|
void setEngineBMW_M73_microRusEfi(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
|
||||||
// 13641435991 injector
|
// 13641435991 injector
|
||||||
engineConfiguration->injector.flow = 180; // cc/min, who knows if this number is real - no good source of info
|
engineConfiguration->injector.flow = 180; // cc/min, who knows if this number is real - no good source of info
|
||||||
|
|
|
@ -12,8 +12,6 @@
|
||||||
#include "engine_math.h"
|
#include "engine_math.h"
|
||||||
#include "custom_engine.h"
|
#include "custom_engine.h"
|
||||||
|
|
||||||
EXTERN_CONFIG;
|
|
||||||
|
|
||||||
void setCamaro4(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
|
void setCamaro4(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
|
||||||
setFrankensoConfiguration(PASS_CONFIG_PARAMETER_SIGNATURE);
|
setFrankensoConfiguration(PASS_CONFIG_PARAMETER_SIGNATURE);
|
||||||
|
|
||||||
|
|
|
@ -39,8 +39,6 @@ static const uint8_t default_tps_advance_table[16][16] = {
|
||||||
//static const float rpmSteps[16] = {400, 800, 1200, 1600, 2000, 2400, 2800, 3200, 3600, 4000, 4400, 4800, 5200, 5600, 6000, 6400};
|
//static const float rpmSteps[16] = {400, 800, 1200, 1600, 2000, 2400, 2800, 3200, 3600, 4000, 4400, 4800, 5200, 5600, 6000, 6400};
|
||||||
//static const float mapSteps[16] = {25, 30, 35, 40, 45, 50, 55, 60, 65, 70, 75, 80, 85, 90, 95, 100};
|
//static const float mapSteps[16] = {25, 30, 35, 40, 45, 50, 55, 60, 65, 70, 75, 80, 85, 90, 95, 100};
|
||||||
|
|
||||||
EXTERN_CONFIG;
|
|
||||||
|
|
||||||
void setCitroenBerlingoTU3JPConfiguration(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
|
void setCitroenBerlingoTU3JPConfiguration(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
|
||||||
setDefaultFrankensoConfiguration(PASS_CONFIG_PARAMETER_SIGNATURE);
|
setDefaultFrankensoConfiguration(PASS_CONFIG_PARAMETER_SIGNATURE);
|
||||||
|
|
||||||
|
|
|
@ -26,8 +26,6 @@
|
||||||
#include "scheduler.h"
|
#include "scheduler.h"
|
||||||
#endif /* EFI_PROD_CODE */
|
#endif /* EFI_PROD_CODE */
|
||||||
|
|
||||||
EXTERN_ENGINE;
|
|
||||||
|
|
||||||
|
|
||||||
#if EFI_PROD_CODE
|
#if EFI_PROD_CODE
|
||||||
static int periodIndex = 0;
|
static int periodIndex = 0;
|
||||||
|
|
|
@ -86,8 +86,6 @@ static const uint8_t veDodgeNeon2003Table[16][16] = {
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
EXTERN_CONFIG;
|
|
||||||
|
|
||||||
void setDodgeNeon1995EngineConfiguration(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
|
void setDodgeNeon1995EngineConfiguration(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
|
||||||
setDefaultFrankensoConfiguration(PASS_CONFIG_PARAMETER_SIGNATURE);
|
setDefaultFrankensoConfiguration(PASS_CONFIG_PARAMETER_SIGNATURE);
|
||||||
|
|
||||||
|
|
|
@ -13,8 +13,6 @@
|
||||||
#include "allsensors.h"
|
#include "allsensors.h"
|
||||||
#include "engine_math.h"
|
#include "engine_math.h"
|
||||||
|
|
||||||
EXTERN_CONFIG;
|
|
||||||
|
|
||||||
void setDodgeRam1996(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
|
void setDodgeRam1996(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
|
||||||
setFrankensoConfiguration(PASS_CONFIG_PARAMETER_SIGNATURE);
|
setFrankensoConfiguration(PASS_CONFIG_PARAMETER_SIGNATURE);
|
||||||
|
|
||||||
|
|
|
@ -8,8 +8,6 @@
|
||||||
#include "engine_template.h"
|
#include "engine_template.h"
|
||||||
#include "custom_engine.h"
|
#include "custom_engine.h"
|
||||||
|
|
||||||
EXTERN_CONFIG;
|
|
||||||
|
|
||||||
void setEngineTemplateConfiguration(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
|
void setEngineTemplateConfiguration(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
|
||||||
setFrankensoConfiguration(PASS_CONFIG_PARAMETER_SIGNATURE);
|
setFrankensoConfiguration(PASS_CONFIG_PARAMETER_SIGNATURE);
|
||||||
}
|
}
|
||||||
|
|
|
@ -16,8 +16,6 @@
|
||||||
#include "engine_math.h"
|
#include "engine_math.h"
|
||||||
#include "allsensors.h"
|
#include "allsensors.h"
|
||||||
|
|
||||||
EXTERN_CONFIG;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Default values for persistent properties
|
* @brief Default values for persistent properties
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -40,8 +40,6 @@ static const int8_t default_aspire_timing_table[16][16] = {
|
||||||
};
|
};
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
EXTERN_CONFIG;
|
|
||||||
|
|
||||||
static void setDefaultAspireMaps(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
|
static void setDefaultAspireMaps(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
|
||||||
setTimingLoadBin(1.2, 4.4 PASS_CONFIG_PARAMETER_SUFFIX);
|
setTimingLoadBin(1.2, 4.4 PASS_CONFIG_PARAMETER_SUFFIX);
|
||||||
setTimingRpmBin(800, 7000 PASS_CONFIG_PARAMETER_SUFFIX);
|
setTimingRpmBin(800, 7000 PASS_CONFIG_PARAMETER_SUFFIX);
|
||||||
|
|
|
@ -62,8 +62,6 @@ static const uint8_t racingFestivaVeTable[16][16] = {
|
||||||
{/* 15 160.000 *//* 0 800.0*/100, /* 1 1200.0*/100, /* 2 1600.0*/100, /* 3 2000.0*/100, /* 4 2400.0*/100, /* 5 2800.0*/120, /* 6 3200.0*/120, /* 7 3600.0*/120, /* 8 4100.0*/120, /* 9 4500.0*/120, /* 10 4900.0*/120, /* 11 5300.0*/120, /* 12 5700.0*/120, /* 13 6100.0*/120, /* 14 6500.0*/120, /* 15 7000.0*/120, },
|
{/* 15 160.000 *//* 0 800.0*/100, /* 1 1200.0*/100, /* 2 1600.0*/100, /* 3 2000.0*/100, /* 4 2400.0*/100, /* 5 2800.0*/120, /* 6 3200.0*/120, /* 7 3600.0*/120, /* 8 4100.0*/120, /* 9 4500.0*/120, /* 10 4900.0*/120, /* 11 5300.0*/120, /* 12 5700.0*/120, /* 13 6100.0*/120, /* 14 6500.0*/120, /* 15 7000.0*/120, },
|
||||||
};
|
};
|
||||||
|
|
||||||
EXTERN_CONFIG;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* pin 1I/W9 - extra +5v
|
* pin 1I/W9 - extra +5v
|
||||||
* set engine_type 14
|
* set engine_type 14
|
||||||
|
|
|
@ -34,8 +34,6 @@ static const uint8_t default_custom_timing_table[16][16] = {
|
||||||
};
|
};
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
EXTERN_CONFIG;
|
|
||||||
|
|
||||||
static void setDefaultCustomMaps(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
|
static void setDefaultCustomMaps(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
|
||||||
setTimingLoadBin(0,100 PASS_CONFIG_PARAMETER_SUFFIX);
|
setTimingLoadBin(0,100 PASS_CONFIG_PARAMETER_SUFFIX);
|
||||||
setTimingRpmBin(0,7000 PASS_CONFIG_PARAMETER_SUFFIX);
|
setTimingRpmBin(0,7000 PASS_CONFIG_PARAMETER_SUFFIX);
|
||||||
|
|
|
@ -35,8 +35,6 @@
|
||||||
#include "advance_map.h"
|
#include "advance_map.h"
|
||||||
#include "custom_engine.h"
|
#include "custom_engine.h"
|
||||||
|
|
||||||
EXTERN_CONFIG;
|
|
||||||
|
|
||||||
static void setHondaAccordConfigurationCommon(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
|
static void setHondaAccordConfigurationCommon(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
|
||||||
engineConfiguration->map.sensor.type = MT_DENSO183;
|
engineConfiguration->map.sensor.type = MT_DENSO183;
|
||||||
|
|
||||||
|
|
|
@ -11,8 +11,6 @@
|
||||||
#include "custom_engine.h"
|
#include "custom_engine.h"
|
||||||
#include "fsio_impl.h"
|
#include "fsio_impl.h"
|
||||||
|
|
||||||
EXTERN_CONFIG;
|
|
||||||
|
|
||||||
#if (BOARD_TLE8888_COUNT > 0)
|
#if (BOARD_TLE8888_COUNT > 0)
|
||||||
void setLadaKalina(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
|
void setLadaKalina(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
|
||||||
/* MRE uses TLE8888_PIN_21 for fuel pump */
|
/* MRE uses TLE8888_PIN_21 for fuel pump */
|
||||||
|
|
|
@ -8,8 +8,6 @@
|
||||||
|
|
||||||
#include "m111.h"
|
#include "m111.h"
|
||||||
|
|
||||||
EXTERN_CONFIG;
|
|
||||||
|
|
||||||
void setM111EngineConfiguration(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
|
void setM111EngineConfiguration(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -15,8 +15,6 @@
|
||||||
#include "fsio_impl.h"
|
#include "fsio_impl.h"
|
||||||
#include "settings.h"
|
#include "settings.h"
|
||||||
|
|
||||||
EXTERN_CONFIG;
|
|
||||||
|
|
||||||
void setMazda626EngineConfiguration(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
|
void setMazda626EngineConfiguration(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
|
||||||
setFrankensoConfiguration(PASS_CONFIG_PARAMETER_SIGNATURE);
|
setFrankensoConfiguration(PASS_CONFIG_PARAMETER_SIGNATURE);
|
||||||
|
|
||||||
|
|
|
@ -75,8 +75,6 @@ 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 } };
|
+29, /*12 5760.0*/+28, /*13 6173.0*/+28, /*14 6586.0*/+27, /*15 7000.0*/+27 } };
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
EXTERN_ENGINE;
|
|
||||||
|
|
||||||
static void commonMiataNa(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
|
static void commonMiataNa(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
|
||||||
engineConfiguration->trigger.type = TT_MAZDA_MIATA_NA;
|
engineConfiguration->trigger.type = TT_MAZDA_MIATA_NA;
|
||||||
engineConfiguration->engineChartSize = 100;
|
engineConfiguration->engineChartSize = 100;
|
||||||
|
|
|
@ -18,8 +18,6 @@
|
||||||
#include "mazda_miata_1_6.h"
|
#include "mazda_miata_1_6.h"
|
||||||
#include "mazda_miata_base_maps.h"
|
#include "mazda_miata_base_maps.h"
|
||||||
|
|
||||||
EXTERN_CONFIG;
|
|
||||||
|
|
||||||
static const float hardCodedmafDecodingBins[256] = {0.099999905, 0.19999981, 0.29999924, 0.39999962, 0.5, 0.5999985, 0.70000076, 0.79999924, 0.9000015, 1.0, 1.0999985, 1.199997, 1.300003, 1.4000015, 1.5, 1.5999985, 1.699997, 1.800003, 1.9000015, 2.0, 2.100006, 2.2000122, 2.2999878, 2.399994, 2.5, 2.600006, 2.7000122, 2.7999878, 2.899994, 3.0, 3.100006, 3.2000122, 3.2999878, 3.399994, 3.5, 3.600006, 3.7000122, 3.7999878, 3.899994, 4.0, 4.0999756, 4.200012, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988};
|
static const float hardCodedmafDecodingBins[256] = {0.099999905, 0.19999981, 0.29999924, 0.39999962, 0.5, 0.5999985, 0.70000076, 0.79999924, 0.9000015, 1.0, 1.0999985, 1.199997, 1.300003, 1.4000015, 1.5, 1.5999985, 1.699997, 1.800003, 1.9000015, 2.0, 2.100006, 2.2000122, 2.2999878, 2.399994, 2.5, 2.600006, 2.7000122, 2.7999878, 2.899994, 3.0, 3.100006, 3.2000122, 3.2999878, 3.399994, 3.5, 3.600006, 3.7000122, 3.7999878, 3.899994, 4.0, 4.0999756, 4.200012, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988, 4.299988};
|
||||||
|
|
||||||
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};
|
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};
|
||||||
|
|
|
@ -8,8 +8,6 @@
|
||||||
#include "engine_configuration.h"
|
#include "engine_configuration.h"
|
||||||
#include "table_helper.h"
|
#include "table_helper.h"
|
||||||
|
|
||||||
EXTERN_CONFIG;
|
|
||||||
|
|
||||||
// todo: use these defaults wider? make them global defaults maybe?
|
// todo: use these defaults wider? make them global defaults maybe?
|
||||||
static const float hardCodedcrankingFuelBins[8] = {-20.0, -10.0, 3.6799927, 22.77002, 34.049805, 49.95996, 65.0, 90.0};
|
static const float hardCodedcrankingFuelBins[8] = {-20.0, -10.0, 3.6799927, 22.77002, 34.049805, 49.95996, 65.0, 90.0};
|
||||||
static const float hardCodedcrankingFuelCoef[8] = {2.7999878, 2.2000122, 1.6900024, 1.2900009, 1.199997, 1.050003, 1.0, 1.0};
|
static const float hardCodedcrankingFuelCoef[8] = {2.7999878, 2.2000122, 1.6900024, 1.2900009, 1.199997, 1.050003, 1.0, 1.0};
|
||||||
|
|
|
@ -20,8 +20,6 @@
|
||||||
#include "ego.h"
|
#include "ego.h"
|
||||||
#include "thermistors.h"
|
#include "thermistors.h"
|
||||||
|
|
||||||
EXTERN_CONFIG;
|
|
||||||
|
|
||||||
// todo: why would this not work?
|
// todo: why would this not work?
|
||||||
//extern const float mazda_miata_nb2_RpmBins[FUEL_RPM_COUNT];
|
//extern const float mazda_miata_nb2_RpmBins[FUEL_RPM_COUNT];
|
||||||
//extern const float mazda_miata_nb2_LoadBins[FUEL_LOAD_COUNT];
|
//extern const float mazda_miata_nb2_LoadBins[FUEL_LOAD_COUNT];
|
||||||
|
|
|
@ -13,8 +13,6 @@
|
||||||
#include "custom_engine.h"
|
#include "custom_engine.h"
|
||||||
#include "mazda_miata_1_6.h"
|
#include "mazda_miata_1_6.h"
|
||||||
|
|
||||||
EXTERN_CONFIG;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 1994, 1995 NA
|
* 1994, 1995 NA
|
||||||
* Note that ODB-II car have different wiring!
|
* Note that ODB-II car have different wiring!
|
||||||
|
|
|
@ -15,8 +15,6 @@
|
||||||
#include "mazda_miata_nb.h"
|
#include "mazda_miata_nb.h"
|
||||||
#include "thermistors.h"
|
#include "thermistors.h"
|
||||||
|
|
||||||
EXTERN_CONFIG;
|
|
||||||
|
|
||||||
void setMazdaMiataNb1EngineConfiguration(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
|
void setMazdaMiataNb1EngineConfiguration(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
|
||||||
setDefaultFrankensoConfiguration(PASS_CONFIG_PARAMETER_SIGNATURE);
|
setDefaultFrankensoConfiguration(PASS_CONFIG_PARAMETER_SIGNATURE);
|
||||||
|
|
||||||
|
|
|
@ -54,8 +54,6 @@
|
||||||
#include "mazda_miata_base_maps.h"
|
#include "mazda_miata_base_maps.h"
|
||||||
#include "hip9011_logic.h"
|
#include "hip9011_logic.h"
|
||||||
|
|
||||||
EXTERN_CONFIG;
|
|
||||||
|
|
||||||
static const float injectorLagBins[VBAT_INJECTOR_CURVE_SIZE] = {
|
static const float injectorLagBins[VBAT_INJECTOR_CURVE_SIZE] = {
|
||||||
6.0, 8.0, 10.0, 11.0,
|
6.0, 8.0, 10.0, 11.0,
|
||||||
12.0, 13.0, 14.0, 15.0
|
12.0, 13.0, 14.0, 15.0
|
||||||
|
|
|
@ -14,8 +14,6 @@
|
||||||
#include "engine_configuration.h"
|
#include "engine_configuration.h"
|
||||||
#include "cj125.h"
|
#include "cj125.h"
|
||||||
|
|
||||||
EXTERN_ENGINE;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* set engine_type 102
|
* set engine_type 102
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -14,8 +14,6 @@
|
||||||
#include "mitsubishi.h"
|
#include "mitsubishi.h"
|
||||||
#include "allsensors.h"
|
#include "allsensors.h"
|
||||||
|
|
||||||
EXTERN_CONFIG;
|
|
||||||
|
|
||||||
void setMitsubishiConfiguration(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
|
void setMitsubishiConfiguration(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
|
||||||
setDefaultFrankensoConfiguration(PASS_CONFIG_PARAMETER_SIGNATURE);
|
setDefaultFrankensoConfiguration(PASS_CONFIG_PARAMETER_SIGNATURE);
|
||||||
|
|
||||||
|
|
|
@ -12,8 +12,6 @@
|
||||||
|
|
||||||
#include "nissan_primera.h"
|
#include "nissan_primera.h"
|
||||||
|
|
||||||
EXTERN_CONFIG;
|
|
||||||
|
|
||||||
void setNissanPrimeraEngineConfiguration(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
|
void setNissanPrimeraEngineConfiguration(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
|
||||||
setDefaultFrankensoConfiguration(PASS_CONFIG_PARAMETER_SIGNATURE);
|
setDefaultFrankensoConfiguration(PASS_CONFIG_PARAMETER_SIGNATURE);
|
||||||
|
|
||||||
|
|
|
@ -7,8 +7,6 @@
|
||||||
|
|
||||||
#include "nissan_vq.h"
|
#include "nissan_vq.h"
|
||||||
|
|
||||||
EXTERN_CONFIG;
|
|
||||||
|
|
||||||
void setHellen121nissan(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
|
void setHellen121nissan(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
|
||||||
engineConfiguration->trigger.type = TT_NISSAN_VQ;
|
engineConfiguration->trigger.type = TT_NISSAN_VQ;
|
||||||
|
|
||||||
|
|
|
@ -12,8 +12,6 @@
|
||||||
#include "allsensors.h"
|
#include "allsensors.h"
|
||||||
#include "engine_math.h"
|
#include "engine_math.h"
|
||||||
|
|
||||||
EXTERN_CONFIG;
|
|
||||||
|
|
||||||
void setSachs(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
|
void setSachs(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
|
||||||
setDefaultFrankensoConfiguration(PASS_CONFIG_PARAMETER_SIGNATURE);
|
setDefaultFrankensoConfiguration(PASS_CONFIG_PARAMETER_SIGNATURE);
|
||||||
|
|
||||||
|
|
|
@ -12,8 +12,6 @@
|
||||||
#include "custom_engine.h"
|
#include "custom_engine.h"
|
||||||
#include "allsensors.h"
|
#include "allsensors.h"
|
||||||
|
|
||||||
EXTERN_CONFIG;
|
|
||||||
|
|
||||||
void setSubaru2003Wrx(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
|
void setSubaru2003Wrx(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
|
||||||
setFrankenso_01_LCD(engineConfiguration);
|
setFrankenso_01_LCD(engineConfiguration);
|
||||||
setFrankenso0_1_joystick(engineConfiguration);
|
setFrankenso0_1_joystick(engineConfiguration);
|
||||||
|
|
|
@ -15,8 +15,6 @@
|
||||||
#include "test_engine.h"
|
#include "test_engine.h"
|
||||||
#include "engine_math.h"
|
#include "engine_math.h"
|
||||||
|
|
||||||
EXTERN_CONFIG;
|
|
||||||
|
|
||||||
// TEST_ENGINE
|
// TEST_ENGINE
|
||||||
void setTestEngineConfiguration(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
|
void setTestEngineConfiguration(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
|
||||||
setDefaultFrankensoConfiguration(PASS_CONFIG_PARAMETER_SIGNATURE);
|
setDefaultFrankensoConfiguration(PASS_CONFIG_PARAMETER_SIGNATURE);
|
||||||
|
|
|
@ -22,8 +22,6 @@
|
||||||
#include "thermistors.h"
|
#include "thermistors.h"
|
||||||
#include "mazda_miata_vvt.h"
|
#include "mazda_miata_vvt.h"
|
||||||
|
|
||||||
EXTERN_CONFIG;
|
|
||||||
|
|
||||||
static void common2jz(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
|
static void common2jz(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
|
||||||
setFrankensoConfiguration(PASS_CONFIG_PARAMETER_SIGNATURE); // default pinout
|
setFrankensoConfiguration(PASS_CONFIG_PARAMETER_SIGNATURE); // default pinout
|
||||||
|
|
||||||
|
|
|
@ -13,8 +13,6 @@
|
||||||
#include "ego.h"
|
#include "ego.h"
|
||||||
#include "engine_math.h"
|
#include "engine_math.h"
|
||||||
|
|
||||||
EXTERN_CONFIG;
|
|
||||||
|
|
||||||
// VW_ABA
|
// VW_ABA
|
||||||
// set engine_type 32
|
// set engine_type 32
|
||||||
void setVwAba(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
|
void setVwAba(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
|
||||||
|
|
|
@ -11,8 +11,6 @@
|
||||||
#include "table_helper.h"
|
#include "table_helper.h"
|
||||||
#include "map.h"
|
#include "map.h"
|
||||||
|
|
||||||
EXTERN_CONFIG;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* set engine_type 62
|
* set engine_type 62
|
||||||
* VW_B6
|
* VW_B6
|
||||||
|
|
|
@ -44,8 +44,6 @@ static THD_WORKING_AREA(btThreadStack, UTILITY_THREAD_STACK_SIZE);
|
||||||
static thread_t *btThread = nullptr;
|
static thread_t *btThread = nullptr;
|
||||||
static thread_reference_t btThreadRef = nullptr; // used by thread suspend/resume as a flag
|
static thread_reference_t btThreadRef = nullptr; // used by thread suspend/resume as a flag
|
||||||
|
|
||||||
EXTERN_ENGINE;
|
|
||||||
|
|
||||||
|
|
||||||
// Main communication code
|
// Main communication code
|
||||||
// We assume that the user has disconnected the software before starting the code.
|
// We assume that the user has disconnected the software before starting the code.
|
||||||
|
|
|
@ -12,8 +12,6 @@
|
||||||
|
|
||||||
#if EFI_TOOTH_LOGGER
|
#if EFI_TOOTH_LOGGER
|
||||||
|
|
||||||
EXTERN_ENGINE;
|
|
||||||
|
|
||||||
#include <cstddef>
|
#include <cstddef>
|
||||||
#include "efitime.h"
|
#include "efitime.h"
|
||||||
#include "efilib.h"
|
#include "efilib.h"
|
||||||
|
|
|
@ -97,8 +97,6 @@
|
||||||
|
|
||||||
#if EFI_TUNER_STUDIO
|
#if EFI_TUNER_STUDIO
|
||||||
|
|
||||||
EXTERN_ENGINE;
|
|
||||||
|
|
||||||
/* 1S */
|
/* 1S */
|
||||||
#define TS_COMMUNICATION_TIMEOUT TIME_MS2I(1000)
|
#define TS_COMMUNICATION_TIMEOUT TIME_MS2I(1000)
|
||||||
|
|
||||||
|
|
|
@ -13,8 +13,6 @@
|
||||||
#include "rusEfiFunctionalTest.h"
|
#include "rusEfiFunctionalTest.h"
|
||||||
#endif // EFI_SIMULATOR
|
#endif // EFI_SIMULATOR
|
||||||
|
|
||||||
EXTERN_ENGINE;
|
|
||||||
|
|
||||||
#if EFI_PROD_CODE || EFI_SIMULATOR
|
#if EFI_PROD_CODE || EFI_SIMULATOR
|
||||||
size_t TsChannelBase::read(uint8_t* buffer, size_t size) {
|
size_t TsChannelBase::read(uint8_t* buffer, size_t size) {
|
||||||
return readTimeout(buffer, size, SR5_READ_TIMEOUT);
|
return readTimeout(buffer, size, SR5_READ_TIMEOUT);
|
||||||
|
|
|
@ -11,8 +11,6 @@
|
||||||
#include "tunerstudio_io.h"
|
#include "tunerstudio_io.h"
|
||||||
#include "connector_uart_dma.h"
|
#include "connector_uart_dma.h"
|
||||||
|
|
||||||
EXTERN_ENGINE;
|
|
||||||
|
|
||||||
#if (!defined(TS_NO_PRIMARY) && (defined(TS_PRIMARY_UART) || defined(TS_PRIMARY_SERIAL)))
|
#if (!defined(TS_NO_PRIMARY) && (defined(TS_PRIMARY_UART) || defined(TS_PRIMARY_SERIAL)))
|
||||||
#define HAS_PRIMARY true
|
#define HAS_PRIMARY true
|
||||||
#else
|
#else
|
||||||
|
|
|
@ -45,8 +45,6 @@
|
||||||
#include "rusEfiFunctionalTest.h"
|
#include "rusEfiFunctionalTest.h"
|
||||||
#endif /*EFI_SIMULATOR */
|
#endif /*EFI_SIMULATOR */
|
||||||
|
|
||||||
EXTERN_ENGINE;
|
|
||||||
|
|
||||||
bool consoleByteArrived = false;
|
bool consoleByteArrived = false;
|
||||||
|
|
||||||
void onDataArrived(bool valid) {
|
void onDataArrived(bool valid) {
|
||||||
|
|
|
@ -141,8 +141,6 @@ static uint64_t binaryLogCount = 0;
|
||||||
|
|
||||||
#endif /* EFI_FILE_LOGGING */
|
#endif /* EFI_FILE_LOGGING */
|
||||||
|
|
||||||
EXTERN_ENGINE;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This is useful if we are changing engine mode dynamically
|
* This is useful if we are changing engine mode dynamically
|
||||||
* For example http://rusefi.com/forum/viewtopic.php?f=5&t=1085
|
* For example http://rusefi.com/forum/viewtopic.php?f=5&t=1085
|
||||||
|
|
|
@ -6,8 +6,6 @@
|
||||||
#include "sensor.h"
|
#include "sensor.h"
|
||||||
#include "tunerstudio_outputs.h"
|
#include "tunerstudio_outputs.h"
|
||||||
|
|
||||||
EXTERN_ENGINE;
|
|
||||||
|
|
||||||
// Deadbands to prevent rapid switching on/off of AC
|
// Deadbands to prevent rapid switching on/off of AC
|
||||||
static Deadband<200> maxRpmDeadband;
|
static Deadband<200> maxRpmDeadband;
|
||||||
static Deadband<5> maxCltDeadband;
|
static Deadband<5> maxCltDeadband;
|
||||||
|
|
|
@ -29,8 +29,6 @@
|
||||||
#error "Unexpected OS ACCESS HERE"
|
#error "Unexpected OS ACCESS HERE"
|
||||||
#endif /* HAS_OS_ACCESS */
|
#endif /* HAS_OS_ACCESS */
|
||||||
|
|
||||||
EXTERN_ENGINE;
|
|
||||||
|
|
||||||
static SimplePwm alternatorControl("alt");
|
static SimplePwm alternatorControl("alt");
|
||||||
static PidIndustrial alternatorPid(&persistentState.persistentConfiguration.engineConfiguration.alternatorControl);
|
static PidIndustrial alternatorPid(&persistentState.persistentConfiguration.engineConfiguration.alternatorControl);
|
||||||
|
|
||||||
|
|
|
@ -25,8 +25,6 @@
|
||||||
#error "Unexpected OS ACCESS HERE"
|
#error "Unexpected OS ACCESS HERE"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
EXTERN_ENGINE;
|
|
||||||
|
|
||||||
static boostOpenLoop_Map3D_t boostMapOpen;
|
static boostOpenLoop_Map3D_t boostMapOpen;
|
||||||
static boostOpenLoop_Map3D_t boostMapClosed;
|
static boostOpenLoop_Map3D_t boostMapClosed;
|
||||||
static SimplePwm boostPwmControl("boost");
|
static SimplePwm boostPwmControl("boost");
|
||||||
|
|
|
@ -17,8 +17,6 @@
|
||||||
#include "efi_gpio.h"
|
#include "efi_gpio.h"
|
||||||
#include "pwm_generator_logic.h"
|
#include "pwm_generator_logic.h"
|
||||||
|
|
||||||
EXTERN_ENGINE;
|
|
||||||
|
|
||||||
class DcHardware {
|
class DcHardware {
|
||||||
private:
|
private:
|
||||||
OutputPin m_pinEnable;
|
OutputPin m_pinEnable;
|
||||||
|
|
|
@ -95,8 +95,6 @@
|
||||||
|
|
||||||
static pedal2tps_t pedal2tpsMap;
|
static pedal2tps_t pedal2tpsMap;
|
||||||
|
|
||||||
EXTERN_ENGINE;
|
|
||||||
|
|
||||||
constexpr float etbPeriodSeconds = 1.0f / ETB_LOOP_FREQUENCY;
|
constexpr float etbPeriodSeconds = 1.0f / ETB_LOOP_FREQUENCY;
|
||||||
|
|
||||||
static bool startupPositionError = false;
|
static bool startupPositionError = false;
|
||||||
|
|
|
@ -5,8 +5,6 @@
|
||||||
#include "efi_gpio.h"
|
#include "efi_gpio.h"
|
||||||
#include "sensor.h"
|
#include "sensor.h"
|
||||||
|
|
||||||
EXTERN_ENGINE;
|
|
||||||
|
|
||||||
static void fanControl(bool acActive, OutputPin& pin, int8_t fanOnTemp, int8_t fanOffTemp, bool enableWithAc, bool disableWhenStopped DECLARE_ENGINE_PARAMETER_SUFFIX) {
|
static void fanControl(bool acActive, OutputPin& pin, int8_t fanOnTemp, int8_t fanOffTemp, bool enableWithAc, bool disableWhenStopped DECLARE_ENGINE_PARAMETER_SUFFIX) {
|
||||||
auto [cltValid, clt] = Sensor::get(SensorType::Clt);
|
auto [cltValid, clt] = Sensor::get(SensorType::Clt);
|
||||||
|
|
||||||
|
|
|
@ -6,8 +6,6 @@
|
||||||
#include "gppwm_channel.h"
|
#include "gppwm_channel.h"
|
||||||
#include "pwm_generator_logic.h"
|
#include "pwm_generator_logic.h"
|
||||||
|
|
||||||
EXTERN_ENGINE;
|
|
||||||
|
|
||||||
static GppwmChannel channels[GPPWM_CHANNELS];
|
static GppwmChannel channels[GPPWM_CHANNELS];
|
||||||
static OutputPin pins[GPPWM_CHANNELS];
|
static OutputPin pins[GPPWM_CHANNELS];
|
||||||
static SimplePwm outputs[GPPWM_CHANNELS];
|
static SimplePwm outputs[GPPWM_CHANNELS];
|
||||||
|
|
|
@ -8,8 +8,6 @@
|
||||||
#include "sensor.h"
|
#include "sensor.h"
|
||||||
#include "engine_math.h"
|
#include "engine_math.h"
|
||||||
|
|
||||||
EXTERN_ENGINE;
|
|
||||||
|
|
||||||
expected<float> readGppwmChannel(gppwm_channel_e channel DECLARE_ENGINE_PARAMETER_SUFFIX) {
|
expected<float> readGppwmChannel(gppwm_channel_e channel DECLARE_ENGINE_PARAMETER_SUFFIX) {
|
||||||
switch (channel) {
|
switch (channel) {
|
||||||
case GPPWM_Tps:
|
case GPPWM_Tps:
|
||||||
|
|
|
@ -26,8 +26,6 @@ static DualHBridgeStepper iacHbridgeHw;
|
||||||
StepperMotor iacMotor;
|
StepperMotor iacMotor;
|
||||||
#endif /* EFI_UNIT_TEST */
|
#endif /* EFI_UNIT_TEST */
|
||||||
|
|
||||||
EXTERN_ENGINE;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* When the IAC position value change is insignificant (lower than this threshold), leave the poor valve alone
|
* When the IAC position value change is insignificant (lower than this threshold), leave the poor valve alone
|
||||||
* todo: why do we have this logic? is this ever useful?
|
* todo: why do we have this logic? is this ever useful?
|
||||||
|
|
|
@ -47,8 +47,6 @@
|
||||||
#include "stepper.h"
|
#include "stepper.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
EXTERN_ENGINE;
|
|
||||||
|
|
||||||
// todo: move all static vars to engine->engineState.idle?
|
// todo: move all static vars to engine->engineState.idle?
|
||||||
|
|
||||||
static bool shouldResetPid = false;
|
static bool shouldResetPid = false;
|
||||||
|
|
|
@ -19,8 +19,6 @@ static SimplePwm pwmTest[5];
|
||||||
|
|
||||||
extern OutputPin warningLedPin;
|
extern OutputPin warningLedPin;
|
||||||
|
|
||||||
EXTERN_ENGINE;
|
|
||||||
|
|
||||||
static void startPwmTest(int freq) {
|
static void startPwmTest(int freq) {
|
||||||
efiPrintf("running pwm test @%d", freq);
|
efiPrintf("running pwm test @%d", freq);
|
||||||
|
|
||||||
|
|
|
@ -20,8 +20,6 @@
|
||||||
#error "Unexpected OS ACCESS HERE"
|
#error "Unexpected OS ACCESS HERE"
|
||||||
#endif /* HAS_OS_ACCESS */
|
#endif /* HAS_OS_ACCESS */
|
||||||
|
|
||||||
EXTERN_ENGINE;
|
|
||||||
|
|
||||||
static fsio8_Map3D_u8t vvtTable1;
|
static fsio8_Map3D_u8t vvtTable1;
|
||||||
static fsio8_Map3D_u8t vvtTable2;
|
static fsio8_Map3D_u8t vvtTable2;
|
||||||
|
|
||||||
|
|
|
@ -32,8 +32,6 @@
|
||||||
#include "tunerstudio_outputs.h"
|
#include "tunerstudio_outputs.h"
|
||||||
#endif /* EFI_TUNER_STUDIO */
|
#endif /* EFI_TUNER_STUDIO */
|
||||||
|
|
||||||
EXTERN_ENGINE;
|
|
||||||
|
|
||||||
static tps_tps_Map3D_t tpsTpsMap;
|
static tps_tps_Map3D_t tpsTpsMap;
|
||||||
|
|
||||||
void WallFuel::resetWF() {
|
void WallFuel::resetWF() {
|
||||||
|
|
|
@ -31,8 +31,6 @@
|
||||||
|
|
||||||
#if EFI_ENGINE_CONTROL
|
#if EFI_ENGINE_CONTROL
|
||||||
|
|
||||||
EXTERN_ENGINE;
|
|
||||||
|
|
||||||
static ign_Map3D_t advanceMap;
|
static ign_Map3D_t advanceMap;
|
||||||
static ign_Map3D_t iatAdvanceCorrectionMap;
|
static ign_Map3D_t iatAdvanceCorrectionMap;
|
||||||
|
|
||||||
|
|
|
@ -2,8 +2,6 @@
|
||||||
#include "sensor.h"
|
#include "sensor.h"
|
||||||
#include "idle_thread.h"
|
#include "idle_thread.h"
|
||||||
|
|
||||||
EXTERN_ENGINE;
|
|
||||||
|
|
||||||
AirmassVeModelBase::AirmassVeModelBase(const ValueProvider3D& veTable) : m_veTable(&veTable) {}
|
AirmassVeModelBase::AirmassVeModelBase(const ValueProvider3D& veTable) : m_veTable(&veTable) {}
|
||||||
|
|
||||||
float AirmassVeModelBase::getVeLoadAxis(float passedLoad) const {
|
float AirmassVeModelBase::getVeLoadAxis(float passedLoad) const {
|
||||||
|
|
|
@ -3,8 +3,6 @@
|
||||||
#include "maf_airmass.h"
|
#include "maf_airmass.h"
|
||||||
#include "maf.h"
|
#include "maf.h"
|
||||||
|
|
||||||
EXTERN_ENGINE;
|
|
||||||
|
|
||||||
AirmassResult MafAirmass::getAirmass(int rpm) {
|
AirmassResult MafAirmass::getAirmass(int rpm) {
|
||||||
float maf = Sensor::get(SensorType::Maf).value_or(0) + engine->engineLoadAccelEnrichment.getEngineLoadEnrichment(PASS_ENGINE_PARAMETER_SIGNATURE);
|
float maf = Sensor::get(SensorType::Maf).value_or(0) + engine->engineLoadAccelEnrichment.getEngineLoadEnrichment(PASS_ENGINE_PARAMETER_SIGNATURE);
|
||||||
return getAirmassImpl(maf, rpm);
|
return getAirmassImpl(maf, rpm);
|
||||||
|
|
|
@ -3,8 +3,6 @@
|
||||||
#include "speed_density_airmass.h"
|
#include "speed_density_airmass.h"
|
||||||
#include "perf_trace.h"
|
#include "perf_trace.h"
|
||||||
|
|
||||||
EXTERN_ENGINE;
|
|
||||||
|
|
||||||
AirmassResult SpeedDensityAirmass::getAirmass(int rpm) {
|
AirmassResult SpeedDensityAirmass::getAirmass(int rpm) {
|
||||||
ScopePerf perf(PE::GetSpeedDensityFuel);
|
ScopePerf perf(PE::GetSpeedDensityFuel);
|
||||||
|
|
||||||
|
|
|
@ -10,8 +10,6 @@
|
||||||
#include "global.h"
|
#include "global.h"
|
||||||
#include "speed_density_base.h"
|
#include "speed_density_base.h"
|
||||||
|
|
||||||
EXTERN_ENGINE;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Derived via:
|
* Derived via:
|
||||||
* (8.31 J K mol^-1) <- ideal gas constant R
|
* (8.31 J K mol^-1) <- ideal gas constant R
|
||||||
|
|
|
@ -1,8 +1,6 @@
|
||||||
#include "defaults.h"
|
#include "defaults.h"
|
||||||
#include "engine_configuration.h"
|
#include "engine_configuration.h"
|
||||||
|
|
||||||
EXTERN_CONFIG;
|
|
||||||
|
|
||||||
static void setDefaultAlternatorParameters(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
|
static void setDefaultAlternatorParameters(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
|
||||||
engineConfiguration->alternatorOffAboveTps = 120;
|
engineConfiguration->alternatorOffAboveTps = 120;
|
||||||
|
|
||||||
|
|
|
@ -2,8 +2,6 @@
|
||||||
#include "engine_configuration.h"
|
#include "engine_configuration.h"
|
||||||
#include "table_helper.h"
|
#include "table_helper.h"
|
||||||
|
|
||||||
EXTERN_CONFIG;
|
|
||||||
|
|
||||||
void setDefaultCranking(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
|
void setDefaultCranking(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
|
||||||
engineConfiguration->cranking.rpm = 550;
|
engineConfiguration->cranking.rpm = 550;
|
||||||
|
|
||||||
|
|
|
@ -3,8 +3,6 @@
|
||||||
#include "table_helper.h"
|
#include "table_helper.h"
|
||||||
#include "mazda_miata_vvt.h"
|
#include "mazda_miata_vvt.h"
|
||||||
|
|
||||||
EXTERN_CONFIG;
|
|
||||||
|
|
||||||
static void setBosch02880155868(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
|
static void setBosch02880155868(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
|
||||||
// http://www.boschdealer.com/specsheets/0280155868cs.jpg
|
// http://www.boschdealer.com/specsheets/0280155868cs.jpg
|
||||||
engineConfiguration->injector.battLagCorrBins[0] = 6;
|
engineConfiguration->injector.battLagCorrBins[0] = 6;
|
||||||
|
|
|
@ -3,8 +3,6 @@
|
||||||
#include "engine_math.h"
|
#include "engine_math.h"
|
||||||
#include "table_helper.h"
|
#include "table_helper.h"
|
||||||
|
|
||||||
EXTERN_CONFIG;
|
|
||||||
|
|
||||||
static void setDefaultMultisparkParameters(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
|
static void setDefaultMultisparkParameters(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
|
||||||
// 1ms spark + 2ms dwell
|
// 1ms spark + 2ms dwell
|
||||||
engineConfiguration->multisparkSparkDuration = 1000;
|
engineConfiguration->multisparkSparkDuration = 1000;
|
||||||
|
|
|
@ -17,8 +17,6 @@
|
||||||
extern TunerStudioOutputChannels tsOutputChannels;
|
extern TunerStudioOutputChannels tsOutputChannels;
|
||||||
#endif /* EFI_TUNER_STUDIO */
|
#endif /* EFI_TUNER_STUDIO */
|
||||||
|
|
||||||
EXTERN_ENGINE;
|
|
||||||
|
|
||||||
DynoView dynoInstance;
|
DynoView dynoInstance;
|
||||||
|
|
||||||
void DynoView::update(vssSrc src) {
|
void DynoView::update(vssSrc src) {
|
||||||
|
|
|
@ -55,8 +55,6 @@
|
||||||
#include "gpio/tle8888.h"
|
#include "gpio/tle8888.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
EXTERN_ENGINE;
|
|
||||||
|
|
||||||
#if EFI_ENGINE_SNIFFER
|
#if EFI_ENGINE_SNIFFER
|
||||||
#include "engine_sniffer.h"
|
#include "engine_sniffer.h"
|
||||||
extern int waveChartUsedSize;
|
extern int waveChartUsedSize;
|
||||||
|
|
|
@ -404,4 +404,8 @@ void doScheduleStopEngine(DECLARE_ENGINE_PARAMETER_SIGNATURE);
|
||||||
|
|
||||||
#define HW_CHECK_RPM 200
|
#define HW_CHECK_RPM 200
|
||||||
|
|
||||||
|
// These externs aren't needed for unit tests - everything is injected instead
|
||||||
|
#if !EFI_UNIT_TEST
|
||||||
|
extern Engine ___engine;
|
||||||
|
extern Engine *engine;
|
||||||
|
#endif // EFI_UNIT_TEST
|
||||||
|
|
|
@ -30,8 +30,6 @@
|
||||||
#include "status_loop.h"
|
#include "status_loop.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
EXTERN_ENGINE;
|
|
||||||
|
|
||||||
WarningCodeState::WarningCodeState() {
|
WarningCodeState::WarningCodeState() {
|
||||||
clear();
|
clear();
|
||||||
}
|
}
|
||||||
|
|
|
@ -107,8 +107,6 @@
|
||||||
#include "tunerstudio.h"
|
#include "tunerstudio.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
EXTERN_ENGINE;
|
|
||||||
|
|
||||||
//#define TS_DEFAULT_SPEED 115200
|
//#define TS_DEFAULT_SPEED 115200
|
||||||
#define TS_DEFAULT_SPEED 38400
|
#define TS_DEFAULT_SPEED 38400
|
||||||
|
|
||||||
|
|
|
@ -59,3 +59,31 @@ void rememberCurrentConfiguration(DECLARE_ENGINE_PARAMETER_SIGNATURE);
|
||||||
|
|
||||||
void setBoardDefaultConfiguration(void);
|
void setBoardDefaultConfiguration(void);
|
||||||
void setBoardConfigOverrides(void);
|
void setBoardConfigOverrides(void);
|
||||||
|
|
||||||
|
#if !EFI_UNIT_TEST
|
||||||
|
extern engine_configuration_s *engineConfiguration;
|
||||||
|
extern persistent_config_container_s persistentState;
|
||||||
|
extern persistent_config_s *config;
|
||||||
|
#endif // EFI_UNIT_TEST
|
||||||
|
|
||||||
|
/**
|
||||||
|
* & is reference in C++ (not C)
|
||||||
|
* Ref is a pointer that:
|
||||||
|
* you access with dot instead of arrow
|
||||||
|
* Cannot be null
|
||||||
|
* This is about EFI_ACTIVE_CONFIGURATION_IN_FLASH
|
||||||
|
*/
|
||||||
|
extern engine_configuration_s & activeConfiguration;
|
||||||
|
|
||||||
|
#if ! EFI_ACTIVE_CONFIGURATION_IN_FLASH
|
||||||
|
// We store a special changeable copy of configuration is RAM, so we can just compare them
|
||||||
|
#define isConfigurationChanged(x) (engineConfiguration->x != activeConfiguration.x)
|
||||||
|
#else
|
||||||
|
// We cannot call prepareVoidConfiguration() for activeConfiguration if it's stored in flash,
|
||||||
|
// so we need to tell the firmware that it's "void" (i.e. zeroed, invalid) by setting a special flag variable,
|
||||||
|
// and then we consider 'x' as changed if it's just non-zero.
|
||||||
|
extern bool isActiveConfigurationVoid;
|
||||||
|
#define isConfigurationChanged(x) ((engineConfiguration->x != activeConfiguration.x) || (isActiveConfigurationVoid && engineConfiguration->x != 0))
|
||||||
|
#endif /* EFI_ACTIVE_CONFIGURATION_IN_FLASH */
|
||||||
|
|
||||||
|
#define isPinOrModeChanged(pin, mode) (isConfigurationChanged(pin) || isConfigurationChanged(mode))
|
||||||
|
|
|
@ -1,8 +1,6 @@
|
||||||
#include "fuel_computer.h"
|
#include "fuel_computer.h"
|
||||||
#include "map.h"
|
#include "map.h"
|
||||||
|
|
||||||
EXTERN_ENGINE;
|
|
||||||
|
|
||||||
mass_t FuelComputerBase::getCycleFuel(mass_t airmass, int rpm, float load) const {
|
mass_t FuelComputerBase::getCycleFuel(mass_t airmass, int rpm, float load) const {
|
||||||
load = getTargetLambdaLoadAxis(load);
|
load = getTargetLambdaLoadAxis(load);
|
||||||
|
|
||||||
|
|
|
@ -2,8 +2,6 @@
|
||||||
#include "tunerstudio_outputs.h"
|
#include "tunerstudio_outputs.h"
|
||||||
#include "map.h"
|
#include "map.h"
|
||||||
|
|
||||||
EXTERN_ENGINE;
|
|
||||||
|
|
||||||
void InjectorModelBase::prepare() {
|
void InjectorModelBase::prepare() {
|
||||||
m_massFlowRate = getInjectorMassFlowRate();
|
m_massFlowRate = getInjectorMassFlowRate();
|
||||||
float deadtime = getDeadtime();
|
float deadtime = getDeadtime();
|
||||||
|
|
|
@ -40,8 +40,6 @@
|
||||||
#include "speed_density_base.h"
|
#include "speed_density_base.h"
|
||||||
#include "lua_hooks.h"
|
#include "lua_hooks.h"
|
||||||
|
|
||||||
EXTERN_ENGINE;
|
|
||||||
|
|
||||||
static fuel_Map3D_t fuelPhaseMap;
|
static fuel_Map3D_t fuelPhaseMap;
|
||||||
extern fuel_Map3D_t veMap;
|
extern fuel_Map3D_t veMap;
|
||||||
extern lambda_Map3D_t lambdaMap;
|
extern lambda_Map3D_t lambdaMap;
|
||||||
|
|
|
@ -33,8 +33,6 @@ LaunchControlBase launchInstance;
|
||||||
extern TunerStudioOutputChannels tsOutputChannels;
|
extern TunerStudioOutputChannels tsOutputChannels;
|
||||||
#endif /* EFI_TUNER_STUDIO */
|
#endif /* EFI_TUNER_STUDIO */
|
||||||
|
|
||||||
EXTERN_ENGINE;
|
|
||||||
|
|
||||||
static int retardThresholdRpm;
|
static int retardThresholdRpm;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -58,8 +58,6 @@
|
||||||
#include "gpio/tle8888.h"
|
#include "gpio/tle8888.h"
|
||||||
#endif // BOARD_TLE8888_COUNT
|
#endif // BOARD_TLE8888_COUNT
|
||||||
|
|
||||||
EXTERN_ENGINE;
|
|
||||||
|
|
||||||
static bool isRunningBench = false;
|
static bool isRunningBench = false;
|
||||||
|
|
||||||
bool isRunningBenchTest(void) {
|
bool isRunningBenchTest(void) {
|
||||||
|
|
|
@ -8,8 +8,6 @@
|
||||||
#include "buttonshift.h"
|
#include "buttonshift.h"
|
||||||
#include "engine.h"
|
#include "engine.h"
|
||||||
|
|
||||||
EXTERN_ENGINE;
|
|
||||||
|
|
||||||
ButtonShiftController buttonShiftController;
|
ButtonShiftController buttonShiftController;
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -19,8 +19,6 @@
|
||||||
#include "vehicle_speed.h"
|
#include "vehicle_speed.h"
|
||||||
#include "rtc_helper.h"
|
#include "rtc_helper.h"
|
||||||
#include "fuel_math.h"
|
#include "fuel_math.h"
|
||||||
EXTERN_ENGINE;
|
|
||||||
|
|
||||||
// CAN Bus ID for broadcast
|
// CAN Bus ID for broadcast
|
||||||
/**
|
/**
|
||||||
* e46 data is from http://forums.bimmerforums.com/forum/showthread.php?1887229
|
* e46 data is from http://forums.bimmerforums.com/forum/showthread.php?1887229
|
||||||
|
|
|
@ -11,9 +11,6 @@
|
||||||
#include "global.h"
|
#include "global.h"
|
||||||
#include "engine.h"
|
#include "engine.h"
|
||||||
|
|
||||||
EXTERN_ENGINE
|
|
||||||
;
|
|
||||||
|
|
||||||
typedef float fsio_table_8x8_f32t_linear[FSIO_TABLE_8 * FSIO_TABLE_8];
|
typedef float fsio_table_8x8_f32t_linear[FSIO_TABLE_8 * FSIO_TABLE_8];
|
||||||
|
|
||||||
bool acceptCanRx(int sid DECLARE_ENGINE_PARAMETER_SUFFIX) {
|
bool acceptCanRx(int sid DECLARE_ENGINE_PARAMETER_SUFFIX) {
|
||||||
|
|
|
@ -19,8 +19,6 @@
|
||||||
#include "thread_priority.h"
|
#include "thread_priority.h"
|
||||||
#include "rusefi_wideband.h"
|
#include "rusefi_wideband.h"
|
||||||
|
|
||||||
EXTERN_ENGINE;
|
|
||||||
|
|
||||||
extern CanListener* canListeners_head;
|
extern CanListener* canListeners_head;
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -20,8 +20,6 @@
|
||||||
#include "spark_logic.h"
|
#include "spark_logic.h"
|
||||||
#include "vehicle_speed.h"
|
#include "vehicle_speed.h"
|
||||||
|
|
||||||
EXTERN_ENGINE;
|
|
||||||
|
|
||||||
struct Status {
|
struct Status {
|
||||||
uint16_t warningCounter;
|
uint16_t warningCounter;
|
||||||
uint16_t lastErrorCode;
|
uint16_t lastErrorCode;
|
||||||
|
|
|
@ -15,8 +15,6 @@
|
||||||
#include "vehicle_speed.h"
|
#include "vehicle_speed.h"
|
||||||
#include "dynoview.h"
|
#include "dynoview.h"
|
||||||
|
|
||||||
EXTERN_ENGINE;
|
|
||||||
|
|
||||||
static bool isInit = false;
|
static bool isInit = false;
|
||||||
static uint16_t filterCanID = 0;
|
static uint16_t filterCanID = 0;
|
||||||
static efitick_t frameTime;
|
static efitick_t frameTime;
|
||||||
|
|
|
@ -37,8 +37,6 @@
|
||||||
#include "fuel_math.h"
|
#include "fuel_math.h"
|
||||||
#include "thermistors.h"
|
#include "thermistors.h"
|
||||||
|
|
||||||
EXTERN_ENGINE;
|
|
||||||
|
|
||||||
static const int16_t supportedPids0120[] = {
|
static const int16_t supportedPids0120[] = {
|
||||||
PID_MONITOR_STATUS,
|
PID_MONITOR_STATUS,
|
||||||
PID_FUEL_SYSTEM_STATUS,
|
PID_FUEL_SYSTEM_STATUS,
|
||||||
|
|
|
@ -12,8 +12,6 @@
|
||||||
// This array contains the firmware image for the wideband contoller
|
// This array contains the firmware image for the wideband contoller
|
||||||
#include "wideband_firmware/for_rusefi/wideband_image.h"
|
#include "wideband_firmware/for_rusefi/wideband_image.h"
|
||||||
|
|
||||||
EXTERN_ENGINE;
|
|
||||||
|
|
||||||
#define EVT_BOOTLOADER_ACK EVENT_MASK(0)
|
#define EVT_BOOTLOADER_ACK EVENT_MASK(0)
|
||||||
|
|
||||||
static thread_t* waitingBootloaderThread = nullptr;
|
static thread_t* waitingBootloaderThread = nullptr;
|
||||||
|
|
|
@ -75,20 +75,6 @@
|
||||||
#define DISPLAY_SENSOR(x) {}
|
#define DISPLAY_SENSOR(x) {}
|
||||||
#define DISPLAY_IF(x) x
|
#define DISPLAY_IF(x) x
|
||||||
|
|
||||||
#if ! EFI_ACTIVE_CONFIGURATION_IN_FLASH
|
|
||||||
// We store a special changeable copy of configuration is RAM, so we can just compare them
|
|
||||||
#define isConfigurationChanged(x) (engineConfiguration->x != activeConfiguration.x)
|
|
||||||
#else
|
|
||||||
// We cannot call prepareVoidConfiguration() for activeConfiguration if it's stored in flash,
|
|
||||||
// so we need to tell the firmware that it's "void" (i.e. zeroed, invalid) by setting a special flag variable,
|
|
||||||
// and then we consider 'x' as changed if it's just non-zero.
|
|
||||||
extern bool isActiveConfigurationVoid;
|
|
||||||
#define isConfigurationChanged(x) ((engineConfiguration->x != activeConfiguration.x) || (isActiveConfigurationVoid && engineConfiguration->x != 0))
|
|
||||||
#endif /* EFI_ACTIVE_CONFIGURATION_IN_FLASH */
|
|
||||||
|
|
||||||
#define isPinOrModeChanged(pin, mode) (isConfigurationChanged(pin) || isConfigurationChanged(mode))
|
|
||||||
|
|
||||||
|
|
||||||
#ifndef FIRMWARE_ID
|
#ifndef FIRMWARE_ID
|
||||||
#define FIRMWARE_ID "source"
|
#define FIRMWARE_ID "source"
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -19,7 +19,6 @@
|
||||||
class Engine;
|
class Engine;
|
||||||
#endif // def __cplusplus
|
#endif // def __cplusplus
|
||||||
|
|
||||||
|
|
||||||
struct engine_configuration_s;
|
struct engine_configuration_s;
|
||||||
struct persistent_config_s;
|
struct persistent_config_s;
|
||||||
|
|
||||||
|
@ -49,12 +48,9 @@ struct persistent_config_s;
|
||||||
#define PASS_ENGINE_PARAMETER_SIGNATURE engine, PASS_CONFIG_PARAMETER_SIGNATURE
|
#define PASS_ENGINE_PARAMETER_SIGNATURE engine, PASS_CONFIG_PARAMETER_SIGNATURE
|
||||||
#define PASS_ENGINE_PARAMETER_SUFFIX , PASS_ENGINE_PARAMETER_SIGNATURE
|
#define PASS_ENGINE_PARAMETER_SUFFIX , PASS_ENGINE_PARAMETER_SIGNATURE
|
||||||
|
|
||||||
#define EXTERN_ENGINE extern EnginePins enginePins; \
|
#define EXTERN_ENGINE extern engine_configuration_s & activeConfiguration
|
||||||
extern engine_configuration_s & activeConfiguration
|
|
||||||
#endif // def __cplusplus
|
#endif // def __cplusplus
|
||||||
|
|
||||||
#define EXTERN_CONFIG
|
|
||||||
|
|
||||||
#define DEFINE_CONFIG_PARAM(x, y) , x y
|
#define DEFINE_CONFIG_PARAM(x, y) , x y
|
||||||
#define PASS_CONFIG_PARAM(x) , x
|
#define PASS_CONFIG_PARAM(x) , x
|
||||||
|
|
||||||
|
@ -88,12 +84,6 @@ struct persistent_config_s;
|
||||||
// Pass this after some other parameters are passed
|
// Pass this after some other parameters are passed
|
||||||
#define PASS_ENGINE_PARAMETER_SUFFIX
|
#define PASS_ENGINE_PARAMETER_SUFFIX
|
||||||
|
|
||||||
#define EXTERN_ENGINE \
|
|
||||||
extern Engine ___engine; \
|
|
||||||
extern Engine *engine; \
|
|
||||||
EXTERN_CONFIG \
|
|
||||||
extern EnginePins enginePins \
|
|
||||||
|
|
||||||
#define ENGINE(x) ___engine.x
|
#define ENGINE(x) ___engine.x
|
||||||
#endif // def __cplusplus
|
#endif // def __cplusplus
|
||||||
|
|
||||||
|
@ -107,23 +97,6 @@ struct persistent_config_s;
|
||||||
*/
|
*/
|
||||||
#define CONFIG(x) persistentState.persistentConfiguration.engineConfiguration.x
|
#define CONFIG(x) persistentState.persistentConfiguration.engineConfiguration.x
|
||||||
|
|
||||||
/**
|
|
||||||
* & is reference in C++ (not C)
|
|
||||||
* Ref is a pointer that:
|
|
||||||
* you access with dot instead of arrow
|
|
||||||
* Cannot be null
|
|
||||||
* This is about EFI_ACTIVE_CONFIGURATION_IN_FLASH
|
|
||||||
*/
|
|
||||||
#define EXTERN_CONFIG \
|
|
||||||
EXTERN_ENGINE_CONFIGURATION \
|
|
||||||
extern engine_configuration_s & activeConfiguration; \
|
|
||||||
|
|
||||||
#define EXTERN_ENGINE_CONFIGURATION \
|
|
||||||
extern engine_configuration_s *engineConfiguration; \
|
|
||||||
extern persistent_config_container_s persistentState; \
|
|
||||||
extern persistent_config_s *config;
|
|
||||||
|
|
||||||
|
|
||||||
#define DEFINE_CONFIG_PARAM(x, y)
|
#define DEFINE_CONFIG_PARAM(x, y)
|
||||||
#define CONFIG_PARAM(x) CONFIG(x)
|
#define CONFIG_PARAM(x) CONFIG(x)
|
||||||
#define PASS_CONFIG_PARAM(x)
|
#define PASS_CONFIG_PARAM(x)
|
||||||
|
|
|
@ -16,8 +16,6 @@ static critical_msg_t criticalErrorMessageBuffer;
|
||||||
#include "HD44780.h"
|
#include "HD44780.h"
|
||||||
#endif /* EFI_HD44780_LCD */
|
#endif /* EFI_HD44780_LCD */
|
||||||
|
|
||||||
EXTERN_ENGINE;
|
|
||||||
|
|
||||||
extern int warningEnabled;
|
extern int warningEnabled;
|
||||||
|
|
||||||
bool hasFirmwareErrorFlag = false;
|
bool hasFirmwareErrorFlag = false;
|
||||||
|
|
|
@ -21,8 +21,6 @@
|
||||||
#include "fsio_core.h"
|
#include "fsio_core.h"
|
||||||
#include "fsio_impl.h"
|
#include "fsio_impl.h"
|
||||||
|
|
||||||
EXTERN_ENGINE;
|
|
||||||
|
|
||||||
LENameOrdinalPair * LE_FIRST = nullptr;
|
LENameOrdinalPair * LE_FIRST = nullptr;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -16,8 +16,6 @@
|
||||||
#include "allsensors.h"
|
#include "allsensors.h"
|
||||||
#include "sensor.h"
|
#include "sensor.h"
|
||||||
|
|
||||||
EXTERN_ENGINE;
|
|
||||||
|
|
||||||
#if EFI_PROD_CODE
|
#if EFI_PROD_CODE
|
||||||
|
|
||||||
// todo: that's about bench test mode, wrong header for sure!
|
// todo: that's about bench test mode, wrong header for sure!
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue