better macro name
This commit is contained in:
parent
2a9f3cdede
commit
74a359077c
|
@ -11,6 +11,6 @@
|
||||||
|
|
||||||
#include "engine.h"
|
#include "engine.h"
|
||||||
|
|
||||||
void setGy6139qmbDefaultEngineConfiguration(DECLARE_ENGINE_PARAMETER_F);
|
void setGy6139qmbDefaultEngineConfiguration(DECLARE_ENGINE_PARAMETER_SIGNATURE);
|
||||||
|
|
||||||
#endif /* GY6_139QMB_H_ */
|
#endif /* GY6_139QMB_H_ */
|
||||||
|
|
|
@ -10,6 +10,6 @@
|
||||||
|
|
||||||
#include "engine.h"
|
#include "engine.h"
|
||||||
|
|
||||||
void setBmwE34(DECLARE_ENGINE_PARAMETER_F);
|
void setBmwE34(DECLARE_ENGINE_PARAMETER_SIGNATURE);
|
||||||
|
|
||||||
#endif /* BMW_E34_H_ */
|
#endif /* BMW_E34_H_ */
|
||||||
|
|
|
@ -10,6 +10,6 @@
|
||||||
|
|
||||||
#include "engine.h"
|
#include "engine.h"
|
||||||
|
|
||||||
void set1973c20(DECLARE_ENGINE_PARAMETER_F);
|
void set1973c20(DECLARE_ENGINE_PARAMETER_SIGNATURE);
|
||||||
|
|
||||||
#endif /* CONFIG_ENGINES_CHEVROLET_C20_1973_H_ */
|
#endif /* CONFIG_ENGINES_CHEVROLET_C20_1973_H_ */
|
||||||
|
|
|
@ -10,6 +10,6 @@
|
||||||
|
|
||||||
#include "engine.h"
|
#include "engine.h"
|
||||||
|
|
||||||
void setCamaro4(DECLARE_ENGINE_PARAMETER_F);
|
void setCamaro4(DECLARE_ENGINE_PARAMETER_SIGNATURE);
|
||||||
|
|
||||||
#endif /* CONFIG_ENGINES_CHEVROLET_CAMARO_4_H_ */
|
#endif /* CONFIG_ENGINES_CHEVROLET_CAMARO_4_H_ */
|
||||||
|
|
|
@ -10,6 +10,6 @@
|
||||||
|
|
||||||
#include "engine.h"
|
#include "engine.h"
|
||||||
|
|
||||||
void setCitroenBerlingoTU3JPConfiguration(DECLARE_ENGINE_PARAMETER_F);
|
void setCitroenBerlingoTU3JPConfiguration(DECLARE_ENGINE_PARAMETER_SIGNATURE);
|
||||||
|
|
||||||
#endif /* CITROENBERLINGOTU3JP_H_ */
|
#endif /* CITROENBERLINGOTU3JP_H_ */
|
||||||
|
|
|
@ -9,10 +9,10 @@
|
||||||
|
|
||||||
#include "engine.h"
|
#include "engine.h"
|
||||||
|
|
||||||
void setCustomEngineConfiguration(DECLARE_ENGINE_PARAMETER_F);
|
void setCustomEngineConfiguration(DECLARE_ENGINE_PARAMETER_SIGNATURE);
|
||||||
void setFrankenso_01_LCD(board_configuration_s *boardConfiguration);
|
void setFrankenso_01_LCD(board_configuration_s *boardConfiguration);
|
||||||
void disableLCD(board_configuration_s *boardConfiguration);
|
void disableLCD(board_configuration_s *boardConfiguration);
|
||||||
|
|
||||||
void setFrankensoBoardTestConfiguration(DECLARE_ENGINE_PARAMETER_F);
|
void setFrankensoBoardTestConfiguration(DECLARE_ENGINE_PARAMETER_SIGNATURE);
|
||||||
|
|
||||||
#endif /* CONFIG_ENGINES_CUSTOM_ENGINE_H_ */
|
#endif /* CONFIG_ENGINES_CUSTOM_ENGINE_H_ */
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
|
|
||||||
EXTERN_ENGINE;
|
EXTERN_ENGINE;
|
||||||
|
|
||||||
void setDaihatsu(DECLARE_ENGINE_PARAMETER_F) {
|
void setDaihatsu(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
|
||||||
engineConfiguration->trigger.type = TT_36_2_2_2;
|
engineConfiguration->trigger.type = TT_36_2_2_2;
|
||||||
|
|
||||||
engineConfiguration->specs.cylindersCount = 3;
|
engineConfiguration->specs.cylindersCount = 3;
|
||||||
|
|
|
@ -7,4 +7,4 @@
|
||||||
|
|
||||||
#include "engine.h"
|
#include "engine.h"
|
||||||
|
|
||||||
void setDaihatsu(DECLARE_ENGINE_PARAMETER_F);
|
void setDaihatsu(DECLARE_ENGINE_PARAMETER_SIGNATURE);
|
||||||
|
|
|
@ -13,14 +13,14 @@
|
||||||
|
|
||||||
#include "engine.h"
|
#include "engine.h"
|
||||||
|
|
||||||
void setDodgeNeon1995EngineConfiguration(DECLARE_ENGINE_PARAMETER_F);
|
void setDodgeNeon1995EngineConfiguration(DECLARE_ENGINE_PARAMETER_SIGNATURE);
|
||||||
|
|
||||||
void setDodgeNeonNGCEngineConfiguration(DECLARE_ENGINE_PARAMETER_F);
|
void setDodgeNeonNGCEngineConfiguration(DECLARE_ENGINE_PARAMETER_SIGNATURE);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* testing or broken CAM sensor option
|
* testing or broken CAM sensor option
|
||||||
*/
|
*/
|
||||||
void setDodgeNeonNGCEngineConfigurationCrankBased(DECLARE_ENGINE_PARAMETER_F);
|
void setDodgeNeonNGCEngineConfigurationCrankBased(DECLARE_ENGINE_PARAMETER_SIGNATURE);
|
||||||
|
|
||||||
|
|
||||||
#endif /* EFI_SUPPORT_DODGE_NEON */
|
#endif /* EFI_SUPPORT_DODGE_NEON */
|
||||||
|
|
|
@ -10,6 +10,6 @@
|
||||||
|
|
||||||
#include "engine.h"
|
#include "engine.h"
|
||||||
|
|
||||||
void setDodgeRam1996(DECLARE_ENGINE_PARAMETER_F);
|
void setDodgeRam1996(DECLARE_ENGINE_PARAMETER_SIGNATURE);
|
||||||
|
|
||||||
#endif /* CONFIG_ENGINES_DODGE_RAM_H_ */
|
#endif /* CONFIG_ENGINES_DODGE_RAM_H_ */
|
||||||
|
|
|
@ -10,6 +10,6 @@
|
||||||
|
|
||||||
#include "engine.h"
|
#include "engine.h"
|
||||||
|
|
||||||
void setDodgeStratus(DECLARE_ENGINE_PARAMETER_F);
|
void setDodgeStratus(DECLARE_ENGINE_PARAMETER_SIGNATURE);
|
||||||
|
|
||||||
#endif /* CONFIG_ENGINES_DODGE_STRATUS_H_ */
|
#endif /* CONFIG_ENGINES_DODGE_STRATUS_H_ */
|
||||||
|
|
|
@ -10,6 +10,6 @@
|
||||||
|
|
||||||
EXTERN_ENGINE;
|
EXTERN_ENGINE;
|
||||||
|
|
||||||
void setEngineTemplateConfiguration(DECLARE_ENGINE_PARAMETER_F) {
|
void setEngineTemplateConfiguration(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
|
||||||
setCustomEngineConfiguration(PASS_ENGINE_PARAMETER_F);
|
setCustomEngineConfiguration(PASS_ENGINE_PARAMETER_SIGNATURE);
|
||||||
}
|
}
|
||||||
|
|
|
@ -9,6 +9,6 @@
|
||||||
#define CONFIG_ENGINES_ENGINE_TEMPLATE_H_
|
#define CONFIG_ENGINES_ENGINE_TEMPLATE_H_
|
||||||
|
|
||||||
#include "engine.h"
|
#include "engine.h"
|
||||||
void setEngineTemplateConfiguration(DECLARE_ENGINE_PARAMETER_F);
|
void setEngineTemplateConfiguration(DECLARE_ENGINE_PARAMETER_SIGNATURE);
|
||||||
|
|
||||||
#endif /* CONFIG_ENGINES_ENGINE_TEMPLATE_H_ */
|
#endif /* CONFIG_ENGINES_ENGINE_TEMPLATE_H_ */
|
||||||
|
|
|
@ -10,6 +10,6 @@
|
||||||
|
|
||||||
#include "engine_configuration.h"
|
#include "engine_configuration.h"
|
||||||
|
|
||||||
void setFordInline6(DECLARE_ENGINE_PARAMETER_F);
|
void setFordInline6(DECLARE_ENGINE_PARAMETER_SIGNATURE);
|
||||||
|
|
||||||
#endif /* FORD_1995_INLINE_6_H_ */
|
#endif /* FORD_1995_INLINE_6_H_ */
|
||||||
|
|
|
@ -14,6 +14,6 @@
|
||||||
|
|
||||||
#include "engine.h"
|
#include "engine.h"
|
||||||
|
|
||||||
void setFordAspireEngineConfiguration(DECLARE_ENGINE_PARAMETER_F);
|
void setFordAspireEngineConfiguration(DECLARE_ENGINE_PARAMETER_SIGNATURE);
|
||||||
|
|
||||||
#endif /* FORD_ASPIRE_H_ */
|
#endif /* FORD_ASPIRE_H_ */
|
||||||
|
|
|
@ -10,6 +10,6 @@
|
||||||
|
|
||||||
#include "engine.h"
|
#include "engine.h"
|
||||||
|
|
||||||
void setFordEscortGt(DECLARE_ENGINE_PARAMETER_F);
|
void setFordEscortGt(DECLARE_ENGINE_PARAMETER_SIGNATURE);
|
||||||
|
|
||||||
#endif /* CONFIG_ENGINES_FORD_FESTIVA_H_ */
|
#endif /* CONFIG_ENGINES_FORD_FESTIVA_H_ */
|
||||||
|
|
|
@ -18,7 +18,7 @@
|
||||||
|
|
||||||
EXTERN_ENGINE;
|
EXTERN_ENGINE;
|
||||||
|
|
||||||
void setFordFiestaDefaultEngineConfiguration(DECLARE_ENGINE_PARAMETER_F) {
|
void setFordFiestaDefaultEngineConfiguration(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
|
||||||
engineConfiguration->rpmHardLimit = 7000;
|
engineConfiguration->rpmHardLimit = 7000;
|
||||||
setOperationMode(engineConfiguration, FOUR_STROKE_CRANK_SENSOR);
|
setOperationMode(engineConfiguration, FOUR_STROKE_CRANK_SENSOR);
|
||||||
|
|
||||||
|
|
|
@ -11,7 +11,7 @@
|
||||||
|
|
||||||
#include "engine.h"
|
#include "engine.h"
|
||||||
|
|
||||||
void setFordFiestaDefaultEngineConfiguration(DECLARE_ENGINE_PARAMETER_F);
|
void setFordFiestaDefaultEngineConfiguration(DECLARE_ENGINE_PARAMETER_SIGNATURE);
|
||||||
|
|
||||||
#endif /* EFI_SUPPORT_FORD_FIESTA */
|
#endif /* EFI_SUPPORT_FORD_FIESTA */
|
||||||
#endif /* FORD_FIESTA_H_ */
|
#endif /* FORD_FIESTA_H_ */
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
|
|
||||||
EXTERN_ENGINE;
|
EXTERN_ENGINE;
|
||||||
|
|
||||||
void setGeoStormConfiguration(DECLARE_ENGINE_PARAMETER_F) {
|
void setGeoStormConfiguration(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
|
||||||
setCustomEngineConfiguration(PASS_ENGINE_PARAMETER_F);
|
setCustomEngineConfiguration(PASS_ENGINE_PARAMETER_SIGNATURE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -9,6 +9,6 @@
|
||||||
#define CONFIG_ENGINES_GEO_STORM_H_
|
#define CONFIG_ENGINES_GEO_STORM_H_
|
||||||
|
|
||||||
#include "engine.h"
|
#include "engine.h"
|
||||||
void setGeoStormConfiguration(DECLARE_ENGINE_PARAMETER_F);
|
void setGeoStormConfiguration(DECLARE_ENGINE_PARAMETER_SIGNATURE);
|
||||||
|
|
||||||
#endif /* CONFIG_ENGINES_GEO_STORM_H_ */
|
#endif /* CONFIG_ENGINES_GEO_STORM_H_ */
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
EXTERN_ENGINE
|
EXTERN_ENGINE
|
||||||
;
|
;
|
||||||
|
|
||||||
void setGm2_2(DECLARE_ENGINE_PARAMETER_F) {
|
void setGm2_2(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
|
||||||
setOperationMode(engineConfiguration, FOUR_STROKE_CAM_SENSOR);
|
setOperationMode(engineConfiguration, FOUR_STROKE_CAM_SENSOR);
|
||||||
engineConfiguration->trigger.type = TT_ONE_PLUS_TOOTHED_WHEEL_60_2;
|
engineConfiguration->trigger.type = TT_ONE_PLUS_TOOTHED_WHEEL_60_2;
|
||||||
|
|
||||||
|
|
|
@ -10,6 +10,6 @@
|
||||||
|
|
||||||
#include "engine.h"
|
#include "engine.h"
|
||||||
|
|
||||||
void setGm2_2(DECLARE_ENGINE_PARAMETER_F);
|
void setGm2_2(DECLARE_ENGINE_PARAMETER_SIGNATURE);
|
||||||
|
|
||||||
#endif /* CONFIG_ENGINES_GM_2_2_H_ */
|
#endif /* CONFIG_ENGINES_GM_2_2_H_ */
|
||||||
|
|
|
@ -9,6 +9,6 @@
|
||||||
#define CONFIG_ENGINES_HONDA_600_H_
|
#define CONFIG_ENGINES_HONDA_600_H_
|
||||||
|
|
||||||
#include "engine.h"
|
#include "engine.h"
|
||||||
void setHonda600(DECLARE_ENGINE_PARAMETER_F);
|
void setHonda600(DECLARE_ENGINE_PARAMETER_SIGNATURE);
|
||||||
|
|
||||||
#endif /* CONFIG_ENGINES_HONDA_600_H_ */
|
#endif /* CONFIG_ENGINES_HONDA_600_H_ */
|
||||||
|
|
|
@ -10,12 +10,12 @@
|
||||||
|
|
||||||
#include "engine.h"
|
#include "engine.h"
|
||||||
|
|
||||||
void setHondaAccordConfigurationTwoWires(DECLARE_ENGINE_PARAMETER_F);
|
void setHondaAccordConfigurationTwoWires(DECLARE_ENGINE_PARAMETER_SIGNATURE);
|
||||||
void setHondaAccordConfigurationThreeWires(DECLARE_ENGINE_PARAMETER_F);
|
void setHondaAccordConfigurationThreeWires(DECLARE_ENGINE_PARAMETER_SIGNATURE);
|
||||||
void setHondaAccordConfigurationDip(DECLARE_ENGINE_PARAMETER_F);
|
void setHondaAccordConfigurationDip(DECLARE_ENGINE_PARAMETER_SIGNATURE);
|
||||||
void setHondaAccordConfiguration1_24(DECLARE_ENGINE_PARAMETER_F);
|
void setHondaAccordConfiguration1_24(DECLARE_ENGINE_PARAMETER_SIGNATURE);
|
||||||
void setHondaAccordConfiguration1_24_shifted(DECLARE_ENGINE_PARAMETER_F);
|
void setHondaAccordConfiguration1_24_shifted(DECLARE_ENGINE_PARAMETER_SIGNATURE);
|
||||||
void setHondaCivic4_0_both(DECLARE_ENGINE_PARAMETER_F);
|
void setHondaCivic4_0_both(DECLARE_ENGINE_PARAMETER_SIGNATURE);
|
||||||
void setHondaCivic4_0_rise(DECLARE_ENGINE_PARAMETER_F);
|
void setHondaCivic4_0_rise(DECLARE_ENGINE_PARAMETER_SIGNATURE);
|
||||||
|
|
||||||
#endif /* HONDA_ACCORD_H_ */
|
#endif /* HONDA_ACCORD_H_ */
|
||||||
|
|
|
@ -10,6 +10,6 @@
|
||||||
|
|
||||||
#include "engine.h"
|
#include "engine.h"
|
||||||
|
|
||||||
void setLadaKalina(DECLARE_ENGINE_PARAMETER_F);
|
void setLadaKalina(DECLARE_ENGINE_PARAMETER_SIGNATURE);
|
||||||
|
|
||||||
#endif /* CONFIG_ENGINES_LADA_KALINA_H_ */
|
#endif /* CONFIG_ENGINES_LADA_KALINA_H_ */
|
||||||
|
|
|
@ -11,6 +11,6 @@
|
||||||
|
|
||||||
#include "engine.h"
|
#include "engine.h"
|
||||||
|
|
||||||
void setMazda626EngineConfiguration(DECLARE_ENGINE_PARAMETER_F);
|
void setMazda626EngineConfiguration(DECLARE_ENGINE_PARAMETER_SIGNATURE);
|
||||||
|
|
||||||
#endif /* CONFIG_ENGINES_MAZDA_626_H_ */
|
#endif /* CONFIG_ENGINES_MAZDA_626_H_ */
|
||||||
|
|
|
@ -15,9 +15,9 @@
|
||||||
#include "engine.h"
|
#include "engine.h"
|
||||||
|
|
||||||
void common079721_2351(engine_configuration_s *engineConfiguration, board_configuration_s *boardConfiguration);
|
void common079721_2351(engine_configuration_s *engineConfiguration, board_configuration_s *boardConfiguration);
|
||||||
void setMiata1990(DECLARE_ENGINE_PARAMETER_F);
|
void setMiata1990(DECLARE_ENGINE_PARAMETER_SIGNATURE);
|
||||||
void setMiata1994_d(DECLARE_ENGINE_PARAMETER_F);
|
void setMiata1994_d(DECLARE_ENGINE_PARAMETER_SIGNATURE);
|
||||||
void setMiata1994_s(DECLARE_ENGINE_PARAMETER_F);
|
void setMiata1994_s(DECLARE_ENGINE_PARAMETER_SIGNATURE);
|
||||||
void setMiata1996(DECLARE_ENGINE_PARAMETER_F);
|
void setMiata1996(DECLARE_ENGINE_PARAMETER_SIGNATURE);
|
||||||
|
|
||||||
#endif /* MAZDA_MIATA_H_ */
|
#endif /* MAZDA_MIATA_H_ */
|
||||||
|
|
|
@ -9,6 +9,6 @@
|
||||||
#define CONFIG_ENGINES_MAZDA_MIATA_1_6_H_
|
#define CONFIG_ENGINES_MAZDA_MIATA_1_6_H_
|
||||||
|
|
||||||
#include "engine.h"
|
#include "engine.h"
|
||||||
void setMiataNA_1_6_Configuration(DECLARE_ENGINE_PARAMETER_F);
|
void setMiataNA_1_6_Configuration(DECLARE_ENGINE_PARAMETER_SIGNATURE);
|
||||||
|
|
||||||
#endif /* CONFIG_ENGINES_MAZDA_MIATA_1_6_H_ */
|
#endif /* CONFIG_ENGINES_MAZDA_MIATA_1_6_H_ */
|
||||||
|
|
|
@ -10,6 +10,6 @@
|
||||||
|
|
||||||
#include "engine.h"
|
#include "engine.h"
|
||||||
|
|
||||||
void setMazdaMiataNb1EngineConfiguration(DECLARE_ENGINE_PARAMETER_F);
|
void setMazdaMiataNb1EngineConfiguration(DECLARE_ENGINE_PARAMETER_SIGNATURE);
|
||||||
|
|
||||||
#endif /* MAZDA_MIATA_NB1_H_ */
|
#endif /* MAZDA_MIATA_NB1_H_ */
|
||||||
|
|
|
@ -12,10 +12,10 @@
|
||||||
|
|
||||||
#include "engine.h"
|
#include "engine.h"
|
||||||
|
|
||||||
void setMazdaMiataNbInjectorLag(DECLARE_ENGINE_PARAMETER_F);
|
void setMazdaMiataNbInjectorLag(DECLARE_ENGINE_PARAMETER_SIGNATURE);
|
||||||
void setMazdaMiataNbTpsTps(DECLARE_ENGINE_PARAMETER_F);
|
void setMazdaMiataNbTpsTps(DECLARE_ENGINE_PARAMETER_SIGNATURE);
|
||||||
|
|
||||||
void setMazdaMiata2003EngineConfiguration(DECLARE_ENGINE_PARAMETER_F);
|
void setMazdaMiata2003EngineConfiguration(DECLARE_ENGINE_PARAMETER_SIGNATURE);
|
||||||
void setMazdaMiata2003EngineConfigurationNewBoard(DECLARE_ENGINE_PARAMETER_F);
|
void setMazdaMiata2003EngineConfigurationNewBoard(DECLARE_ENGINE_PARAMETER_SIGNATURE);
|
||||||
|
|
||||||
#endif /* CONFIG_ENGINES_MAZDA_MIATA_VVT_H_ */
|
#endif /* CONFIG_ENGINES_MAZDA_MIATA_VVT_H_ */
|
||||||
|
|
|
@ -9,6 +9,6 @@
|
||||||
|
|
||||||
#include "engine.h"
|
#include "engine.h"
|
||||||
|
|
||||||
void setMitsubishiConfiguration(DECLARE_ENGINE_PARAMETER_F);
|
void setMitsubishiConfiguration(DECLARE_ENGINE_PARAMETER_SIGNATURE);
|
||||||
|
|
||||||
#endif /* MITSUBISHI_H_ */
|
#endif /* MITSUBISHI_H_ */
|
||||||
|
|
|
@ -9,7 +9,7 @@
|
||||||
|
|
||||||
#include "prometheus.h"
|
#include "prometheus.h"
|
||||||
|
|
||||||
void setPrometheusDefaults(DECLARE_ENGINE_PARAMETER_F) {
|
void setPrometheusDefaults(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -9,6 +9,6 @@
|
||||||
#define CONFIG_ENGINES_PROMETHEUS_H_
|
#define CONFIG_ENGINES_PROMETHEUS_H_
|
||||||
|
|
||||||
#include "engine.h"
|
#include "engine.h"
|
||||||
void setPrometheusDefaults(DECLARE_ENGINE_PARAMETER_F);
|
void setPrometheusDefaults(DECLARE_ENGINE_PARAMETER_SIGNATURE);
|
||||||
|
|
||||||
#endif /* CONFIG_ENGINES_PROMETHEUS_H_ */
|
#endif /* CONFIG_ENGINES_PROMETHEUS_H_ */
|
||||||
|
|
|
@ -10,6 +10,6 @@
|
||||||
#include "engine.h"
|
#include "engine.h"
|
||||||
|
|
||||||
void setFrankenstein_01_LCD(board_configuration_s *boardConfiguration);
|
void setFrankenstein_01_LCD(board_configuration_s *boardConfiguration);
|
||||||
void setRoverv8(DECLARE_ENGINE_PARAMETER_F);
|
void setRoverv8(DECLARE_ENGINE_PARAMETER_SIGNATURE);
|
||||||
|
|
||||||
#endif /* ROVER_V8_H_ */
|
#endif /* ROVER_V8_H_ */
|
||||||
|
|
|
@ -9,6 +9,6 @@
|
||||||
|
|
||||||
#include "engine.h"
|
#include "engine.h"
|
||||||
|
|
||||||
void setSachs(DECLARE_ENGINE_PARAMETER_F);
|
void setSachs(DECLARE_ENGINE_PARAMETER_SIGNATURE);
|
||||||
|
|
||||||
#endif /* CONFIG_ENGINES_SACHS_H_ */
|
#endif /* CONFIG_ENGINES_SACHS_H_ */
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
|
|
||||||
EXTERN_ENGINE;
|
EXTERN_ENGINE;
|
||||||
|
|
||||||
void setSubaru2003Wrx(DECLARE_ENGINE_PARAMETER_F) {
|
void setSubaru2003Wrx(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
|
||||||
setFrankenso_01_LCD(boardConfiguration);
|
setFrankenso_01_LCD(boardConfiguration);
|
||||||
setFrankenso0_1_joystick(engineConfiguration);
|
setFrankenso0_1_joystick(engineConfiguration);
|
||||||
|
|
||||||
|
|
|
@ -9,6 +9,6 @@
|
||||||
|
|
||||||
#include "engine.h"
|
#include "engine.h"
|
||||||
|
|
||||||
void setSubaru2003Wrx(DECLARE_ENGINE_PARAMETER_F);
|
void setSubaru2003Wrx(DECLARE_ENGINE_PARAMETER_SIGNATURE);
|
||||||
|
|
||||||
#endif /* SUBARU_H_ */
|
#endif /* SUBARU_H_ */
|
||||||
|
|
|
@ -11,7 +11,7 @@
|
||||||
|
|
||||||
EXTERN_ENGINE;
|
EXTERN_ENGINE;
|
||||||
|
|
||||||
void setSuzukiVitara(DECLARE_ENGINE_PARAMETER_F) {
|
void setSuzukiVitara(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
|
||||||
engineConfiguration->trigger.type = TT_MAZDA_SOHC_4;
|
engineConfiguration->trigger.type = TT_MAZDA_SOHC_4;
|
||||||
engineConfiguration->specs.cylindersCount = 4;
|
engineConfiguration->specs.cylindersCount = 4;
|
||||||
engineConfiguration->specs.displacement = 1.590;
|
engineConfiguration->specs.displacement = 1.590;
|
||||||
|
|
|
@ -10,6 +10,6 @@
|
||||||
|
|
||||||
#include "engine.h"
|
#include "engine.h"
|
||||||
|
|
||||||
void setSuzukiVitara(DECLARE_ENGINE_PARAMETER_F);
|
void setSuzukiVitara(DECLARE_ENGINE_PARAMETER_SIGNATURE);
|
||||||
|
|
||||||
#endif /* CONFIG_ENGINES_SUZUKI_VITARA_H_ */
|
#endif /* CONFIG_ENGINES_SUZUKI_VITARA_H_ */
|
||||||
|
|
|
@ -9,10 +9,10 @@
|
||||||
|
|
||||||
#include "engine_configuration.h"
|
#include "engine_configuration.h"
|
||||||
|
|
||||||
void setTestEngineConfiguration(DECLARE_ENGINE_PARAMETER_F);
|
void setTestEngineConfiguration(DECLARE_ENGINE_PARAMETER_SIGNATURE);
|
||||||
void setTestVVTEngineConfiguration(DECLARE_ENGINE_PARAMETER_F);
|
void setTestVVTEngineConfiguration(DECLARE_ENGINE_PARAMETER_SIGNATURE);
|
||||||
|
|
||||||
void setTestEngineIssue366both(DECLARE_ENGINE_PARAMETER_F);
|
void setTestEngineIssue366both(DECLARE_ENGINE_PARAMETER_SIGNATURE);
|
||||||
void setTestEngineIssue366rise(DECLARE_ENGINE_PARAMETER_F);
|
void setTestEngineIssue366rise(DECLARE_ENGINE_PARAMETER_SIGNATURE);
|
||||||
|
|
||||||
#endif /* TEST_ENGINE_H_ */
|
#endif /* TEST_ENGINE_H_ */
|
||||||
|
|
|
@ -23,8 +23,8 @@
|
||||||
|
|
||||||
EXTERN_ENGINE;
|
EXTERN_ENGINE;
|
||||||
|
|
||||||
static void common2jz(DECLARE_ENGINE_PARAMETER_F) {
|
static void common2jz(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
|
||||||
setCustomEngineConfiguration(PASS_ENGINE_PARAMETER_F); // default pinout
|
setCustomEngineConfiguration(PASS_ENGINE_PARAMETER_SIGNATURE); // default pinout
|
||||||
|
|
||||||
engineConfiguration->specs.displacement = 3.0;
|
engineConfiguration->specs.displacement = 3.0;
|
||||||
engineConfiguration->specs.cylindersCount = 6;
|
engineConfiguration->specs.cylindersCount = 6;
|
||||||
|
@ -67,8 +67,8 @@ static void common2jz(DECLARE_ENGINE_PARAMETER_F) {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void setToyota_jzs147EngineConfiguration(DECLARE_ENGINE_PARAMETER_F) {
|
void setToyota_jzs147EngineConfiguration(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
|
||||||
common2jz(PASS_ENGINE_PARAMETER_F);
|
common2jz(PASS_ENGINE_PARAMETER_SIGNATURE);
|
||||||
|
|
||||||
setOperationMode(engineConfiguration, FOUR_STROKE_CAM_SENSOR);
|
setOperationMode(engineConfiguration, FOUR_STROKE_CAM_SENSOR);
|
||||||
engineConfiguration->trigger.type = TT_2JZ_1_12;
|
engineConfiguration->trigger.type = TT_2JZ_1_12;
|
||||||
|
@ -95,8 +95,8 @@ void setToyota_jzs147EngineConfiguration(DECLARE_ENGINE_PARAMETER_F) {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void setToyota_2jz_vics(DECLARE_ENGINE_PARAMETER_F) {
|
void setToyota_2jz_vics(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
|
||||||
common2jz(PASS_ENGINE_PARAMETER_F);
|
common2jz(PASS_ENGINE_PARAMETER_SIGNATURE);
|
||||||
|
|
||||||
boardConfiguration->isSdCardEnabled = true;
|
boardConfiguration->isSdCardEnabled = true;
|
||||||
|
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
|
|
||||||
#include "engine.h"
|
#include "engine.h"
|
||||||
|
|
||||||
void setToyota_jzs147EngineConfiguration(DECLARE_ENGINE_PARAMETER_F);
|
void setToyota_jzs147EngineConfiguration(DECLARE_ENGINE_PARAMETER_SIGNATURE);
|
||||||
void setToyota_2jz_vics(DECLARE_ENGINE_PARAMETER_F);
|
void setToyota_2jz_vics(DECLARE_ENGINE_PARAMETER_SIGNATURE);
|
||||||
|
|
||||||
#endif /* CONFIG_ENGINES_TOYOTA_JZS147_H_ */
|
#endif /* CONFIG_ENGINES_TOYOTA_JZS147_H_ */
|
||||||
|
|
|
@ -10,6 +10,6 @@
|
||||||
|
|
||||||
#include "engine.h"
|
#include "engine.h"
|
||||||
|
|
||||||
void setVwAba(DECLARE_ENGINE_PARAMETER_F);
|
void setVwAba(DECLARE_ENGINE_PARAMETER_SIGNATURE);
|
||||||
|
|
||||||
#endif /* CONFIG_ENGINES_VW_H_ */
|
#endif /* CONFIG_ENGINES_VW_H_ */
|
||||||
|
|
|
@ -14,8 +14,8 @@
|
||||||
|
|
||||||
EXTERN_ENGINE;
|
EXTERN_ENGINE;
|
||||||
|
|
||||||
void setZil130(DECLARE_ENGINE_PARAMETER_F) {
|
void setZil130(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
|
||||||
setCustomEngineConfiguration(PASS_ENGINE_PARAMETER_F);
|
setCustomEngineConfiguration(PASS_ENGINE_PARAMETER_SIGNATURE);
|
||||||
|
|
||||||
engineConfiguration->specs.cylindersCount = 8;
|
engineConfiguration->specs.cylindersCount = 8;
|
||||||
|
|
||||||
|
|
|
@ -9,6 +9,6 @@
|
||||||
#define ZIL130_H_
|
#define ZIL130_H_
|
||||||
|
|
||||||
#include "engine.h"
|
#include "engine.h"
|
||||||
void setZil130(DECLARE_ENGINE_PARAMETER_F);
|
void setZil130(DECLARE_ENGINE_PARAMETER_SIGNATURE);
|
||||||
|
|
||||||
#endif /* ZIL130_H_ */
|
#endif /* ZIL130_H_ */
|
||||||
|
|
|
@ -388,7 +388,7 @@ void requestBurn(void) {
|
||||||
#if EFI_INTERNAL_FLASH || defined(__DOXYGEN__)
|
#if EFI_INTERNAL_FLASH || defined(__DOXYGEN__)
|
||||||
setNeedToWriteConfiguration();
|
setNeedToWriteConfiguration();
|
||||||
#endif
|
#endif
|
||||||
incrementGlobalConfigurationVersion(PASS_ENGINE_PARAMETER_F);
|
incrementGlobalConfigurationVersion(PASS_ENGINE_PARAMETER_SIGNATURE);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void sendResponseCode(ts_response_format_e mode, ts_channel_s *tsChannel, const uint8_t responseCode) {
|
static void sendResponseCode(ts_response_format_e mode, ts_channel_s *tsChannel, const uint8_t responseCode) {
|
||||||
|
|
|
@ -50,7 +50,7 @@ void handleBurnCommand(ts_channel_s *tsChannel, ts_response_format_e mode, uint1
|
||||||
void tunerStudioDebug(const char *msg);
|
void tunerStudioDebug(const char *msg);
|
||||||
void tunerStudioError(const char *msg);
|
void tunerStudioError(const char *msg);
|
||||||
|
|
||||||
void updateTunerStudioState(TunerStudioOutputChannels *tsOutputChannels DECLARE_ENGINE_PARAMETER_S);
|
void updateTunerStudioState(TunerStudioOutputChannels *tsOutputChannels DECLARE_ENGINE_PARAMETER_SUFFIX);
|
||||||
void printTsStats(void);
|
void printTsStats(void);
|
||||||
void requestBurn(void);
|
void requestBurn(void);
|
||||||
|
|
||||||
|
|
|
@ -25,20 +25,20 @@ public:
|
||||||
/**
|
/**
|
||||||
* @return Extra engine load value for fuel logic calculation
|
* @return Extra engine load value for fuel logic calculation
|
||||||
*/
|
*/
|
||||||
float getEngineLoadEnrichment(DECLARE_ENGINE_PARAMETER_F);
|
float getEngineLoadEnrichment(DECLARE_ENGINE_PARAMETER_SIGNATURE);
|
||||||
/**
|
/**
|
||||||
* @return Extra fuel squirt duration for TPS acceleration
|
* @return Extra fuel squirt duration for TPS acceleration
|
||||||
*/
|
*/
|
||||||
floatms_t getTpsEnrichment(DECLARE_ENGINE_PARAMETER_F);
|
floatms_t getTpsEnrichment(DECLARE_ENGINE_PARAMETER_SIGNATURE);
|
||||||
int getMaxDeltaIndex(DECLARE_ENGINE_PARAMETER_F);
|
int getMaxDeltaIndex(DECLARE_ENGINE_PARAMETER_SIGNATURE);
|
||||||
float getMaxDelta(DECLARE_ENGINE_PARAMETER_F);
|
float getMaxDelta(DECLARE_ENGINE_PARAMETER_SIGNATURE);
|
||||||
|
|
||||||
void onEngineCycle(DECLARE_ENGINE_PARAMETER_F);
|
void onEngineCycle(DECLARE_ENGINE_PARAMETER_SIGNATURE);
|
||||||
void onEngineCycleTps(DECLARE_ENGINE_PARAMETER_F);
|
void onEngineCycleTps(DECLARE_ENGINE_PARAMETER_SIGNATURE);
|
||||||
void reset();
|
void reset();
|
||||||
void setLength(int length);
|
void setLength(int length);
|
||||||
cyclic_buffer<float> cb;
|
cyclic_buffer<float> cb;
|
||||||
void onNewValue(float currentValue DECLARE_ENGINE_PARAMETER_S);
|
void onNewValue(float currentValue DECLARE_ENGINE_PARAMETER_SUFFIX);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
float previousValue;
|
float previousValue;
|
||||||
|
@ -51,7 +51,7 @@ public:
|
||||||
* @param target desired squirt duration
|
* @param target desired squirt duration
|
||||||
* @return total adjusted fuel squirt duration once wall wetting is taken into effect
|
* @return total adjusted fuel squirt duration once wall wetting is taken into effect
|
||||||
*/
|
*/
|
||||||
floatms_t adjust(int injectorIndex, floatms_t target DECLARE_ENGINE_PARAMETER_S);
|
floatms_t adjust(int injectorIndex, floatms_t target DECLARE_ENGINE_PARAMETER_SUFFIX);
|
||||||
floatms_t getWallFuel(int injectorIndex);
|
floatms_t getWallFuel(int injectorIndex);
|
||||||
void reset();
|
void reset();
|
||||||
private:
|
private:
|
||||||
|
@ -61,7 +61,7 @@ private:
|
||||||
floatms_t wallFuel[INJECTION_PIN_COUNT];
|
floatms_t wallFuel[INJECTION_PIN_COUNT];
|
||||||
};
|
};
|
||||||
|
|
||||||
void initAccelEnrichment(Logging *sharedLogger DECLARE_ENGINE_PARAMETER_S);
|
void initAccelEnrichment(Logging *sharedLogger DECLARE_ENGINE_PARAMETER_SUFFIX);
|
||||||
|
|
||||||
void setEngineLoadAccelLen(int len);
|
void setEngineLoadAccelLen(int len);
|
||||||
void setEngineLoadAccelThr(float value);
|
void setEngineLoadAccelThr(float value);
|
||||||
|
|
|
@ -10,11 +10,11 @@
|
||||||
|
|
||||||
#include "engine.h"
|
#include "engine.h"
|
||||||
|
|
||||||
angle_t getAdvance(int rpm, float engineLoad DECLARE_ENGINE_PARAMETER_S);
|
angle_t getAdvance(int rpm, float engineLoad DECLARE_ENGINE_PARAMETER_SUFFIX);
|
||||||
void setDefaultIatTimingCorrection(DECLARE_ENGINE_PARAMETER_F);
|
void setDefaultIatTimingCorrection(DECLARE_ENGINE_PARAMETER_SIGNATURE);
|
||||||
void prepareTimingMap(DECLARE_ENGINE_PARAMETER_F);
|
void prepareTimingMap(DECLARE_ENGINE_PARAMETER_SIGNATURE);
|
||||||
float getTopAdvanceForBore(chamber_style_e style, int octane, double compression, double bore);
|
float getTopAdvanceForBore(chamber_style_e style, int octane, double compression, double bore);
|
||||||
float getInitialAdvance(int rpm, float map, float advanceMax);
|
float getInitialAdvance(int rpm, float map, float advanceMax);
|
||||||
void buildTimingMap(float advanceMax DECLARE_ENGINE_PARAMETER_S);
|
void buildTimingMap(float advanceMax DECLARE_ENGINE_PARAMETER_SUFFIX);
|
||||||
|
|
||||||
#endif /* ADVANCE_H_ */
|
#endif /* ADVANCE_H_ */
|
||||||
|
|
|
@ -29,10 +29,10 @@
|
||||||
|
|
||||||
EXTERN_ENGINE;
|
EXTERN_ENGINE;
|
||||||
|
|
||||||
void initDataStructures(DECLARE_ENGINE_PARAMETER_F) {
|
void initDataStructures(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
|
||||||
prepareFuelMap(PASS_ENGINE_PARAMETER_F);
|
prepareFuelMap(PASS_ENGINE_PARAMETER_SIGNATURE);
|
||||||
prepareTimingMap(PASS_ENGINE_PARAMETER_F);
|
prepareTimingMap(PASS_ENGINE_PARAMETER_SIGNATURE);
|
||||||
initSpeedDensity(PASS_ENGINE_PARAMETER_F);
|
initSpeedDensity(PASS_ENGINE_PARAMETER_SIGNATURE);
|
||||||
}
|
}
|
||||||
|
|
||||||
void initAlgo(Logging *sharedLogger) {
|
void initAlgo(Logging *sharedLogger) {
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
|
|
||||||
#include "main.h"
|
#include "main.h"
|
||||||
#include "engine_configuration.h"
|
#include "engine_configuration.h"
|
||||||
void initDataStructures(DECLARE_ENGINE_PARAMETER_F);
|
void initDataStructures(DECLARE_ENGINE_PARAMETER_SIGNATURE);
|
||||||
void initAlgo(Logging *sharedLogger);
|
void initAlgo(Logging *sharedLogger);
|
||||||
|
|
||||||
#endif /* ALGO_H_ */
|
#endif /* ALGO_H_ */
|
||||||
|
|
|
@ -81,8 +81,8 @@ static msg_t auxPidThread(int param) {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
float value = engine->triggerCentral.vvtPosition; // getVBatt(PASS_ENGINE_PARAMETER_F); // that's temporary
|
float value = engine->triggerCentral.vvtPosition; // getVBatt(PASS_ENGINE_PARAMETER_SIGNATURE); // that's temporary
|
||||||
float targetValue = fsioTable1.getValue(rpm, getEngineLoadT(PASS_ENGINE_PARAMETER_F));
|
float targetValue = fsioTable1.getValue(rpm, getEngineLoadT(PASS_ENGINE_PARAMETER_SIGNATURE));
|
||||||
|
|
||||||
float pwm = auxPid.getValue(targetValue, value);
|
float pwm = auxPid.getValue(targetValue, value);
|
||||||
if (engineConfiguration->isVerboseAuxPid1) {
|
if (engineConfiguration->isVerboseAuxPid1) {
|
||||||
|
|
|
@ -43,8 +43,8 @@ public:
|
||||||
/**
|
/**
|
||||||
* this method schedules all fuel events for an engine cycle
|
* this method schedules all fuel events for an engine cycle
|
||||||
*/
|
*/
|
||||||
void addFuelEvents(DECLARE_ENGINE_PARAMETER_F);
|
void addFuelEvents(DECLARE_ENGINE_PARAMETER_SIGNATURE);
|
||||||
bool addFuelEventsForCylinder(int i DECLARE_ENGINE_PARAMETER_S);
|
bool addFuelEventsForCylinder(int i DECLARE_ENGINE_PARAMETER_SUFFIX);
|
||||||
|
|
||||||
InjectionEvent elements[MAX_INJECTION_OUTPUT_COUNT];
|
InjectionEvent elements[MAX_INJECTION_OUTPUT_COUNT];
|
||||||
bool isReady;
|
bool isReady;
|
||||||
|
@ -94,8 +94,8 @@ public:
|
||||||
class EngineState {
|
class EngineState {
|
||||||
public:
|
public:
|
||||||
EngineState();
|
EngineState();
|
||||||
void periodicFastCallback(DECLARE_ENGINE_PARAMETER_F);
|
void periodicFastCallback(DECLARE_ENGINE_PARAMETER_SIGNATURE);
|
||||||
void updateSlowSensors(DECLARE_ENGINE_PARAMETER_F);
|
void updateSlowSensors(DECLARE_ENGINE_PARAMETER_SIGNATURE);
|
||||||
|
|
||||||
|
|
||||||
efitick_t crankingTime;
|
efitick_t crankingTime;
|
||||||
|
@ -243,7 +243,7 @@ public:
|
||||||
Engine();
|
Engine();
|
||||||
void setConfig(persistent_config_s *config);
|
void setConfig(persistent_config_s *config);
|
||||||
void reset();
|
void reset();
|
||||||
injection_mode_e getCurrentInjectionMode(DECLARE_ENGINE_PARAMETER_F);
|
injection_mode_e getCurrentInjectionMode(DECLARE_ENGINE_PARAMETER_SIGNATURE);
|
||||||
|
|
||||||
OutputSignalPair fuelActuators[INJECTION_PIN_COUNT];
|
OutputSignalPair fuelActuators[INJECTION_PIN_COUNT];
|
||||||
IgnitionEventList ignitionEvents;
|
IgnitionEventList ignitionEvents;
|
||||||
|
@ -324,8 +324,8 @@ public:
|
||||||
*/
|
*/
|
||||||
floatms_t actualLastInjection;
|
floatms_t actualLastInjection;
|
||||||
|
|
||||||
void periodicFastCallback(DECLARE_ENGINE_PARAMETER_F);
|
void periodicFastCallback(DECLARE_ENGINE_PARAMETER_SIGNATURE);
|
||||||
void updateSlowSensors(DECLARE_ENGINE_PARAMETER_F);
|
void updateSlowSensors(DECLARE_ENGINE_PARAMETER_SIGNATURE);
|
||||||
|
|
||||||
bool clutchUpState;
|
bool clutchUpState;
|
||||||
bool clutchDownState;
|
bool clutchDownState;
|
||||||
|
@ -436,17 +436,17 @@ private:
|
||||||
class StartupFuelPumping {
|
class StartupFuelPumping {
|
||||||
public:
|
public:
|
||||||
StartupFuelPumping();
|
StartupFuelPumping();
|
||||||
void update(DECLARE_ENGINE_PARAMETER_F);
|
void update(DECLARE_ENGINE_PARAMETER_SIGNATURE);
|
||||||
bool isTpsAbove50;
|
bool isTpsAbove50;
|
||||||
int pumpsCounter;
|
int pumpsCounter;
|
||||||
private:
|
private:
|
||||||
void setPumpsCounter(int newValue);
|
void setPumpsCounter(int newValue);
|
||||||
};
|
};
|
||||||
|
|
||||||
void prepareShapes(DECLARE_ENGINE_PARAMETER_F);
|
void prepareShapes(DECLARE_ENGINE_PARAMETER_SIGNATURE);
|
||||||
void resetConfigurationExt(Logging * logger, engine_type_e engineType DECLARE_ENGINE_PARAMETER_S);
|
void resetConfigurationExt(Logging * logger, engine_type_e engineType DECLARE_ENGINE_PARAMETER_SUFFIX);
|
||||||
void applyNonPersistentConfiguration(Logging * logger DECLARE_ENGINE_PARAMETER_S);
|
void applyNonPersistentConfiguration(Logging * logger DECLARE_ENGINE_PARAMETER_SUFFIX);
|
||||||
void prepareOutputSignals(DECLARE_ENGINE_PARAMETER_F);
|
void prepareOutputSignals(DECLARE_ENGINE_PARAMETER_SIGNATURE);
|
||||||
void assertEngineReference(DECLARE_ENGINE_PARAMETER_F);
|
void assertEngineReference(DECLARE_ENGINE_PARAMETER_SIGNATURE);
|
||||||
|
|
||||||
#endif /* H_ENGINE_H_ */
|
#endif /* H_ENGINE_H_ */
|
||||||
|
|
|
@ -42,19 +42,19 @@ typedef struct {
|
||||||
} persistent_config_container_s;
|
} persistent_config_container_s;
|
||||||
|
|
||||||
void prepareVoidConfiguration(engine_configuration_s *activeConfiguration);
|
void prepareVoidConfiguration(engine_configuration_s *activeConfiguration);
|
||||||
void setDefaultConfiguration(DECLARE_ENGINE_PARAMETER_F);
|
void setDefaultConfiguration(DECLARE_ENGINE_PARAMETER_SIGNATURE);
|
||||||
void setAfrMap(afr_table_t table, float value);
|
void setAfrMap(afr_table_t table, float value);
|
||||||
void setMap(fuel_table_t table, float value);
|
void setMap(fuel_table_t table, float value);
|
||||||
void setWholeFuelMap(float value DECLARE_ENGINE_PARAMETER_S);
|
void setWholeFuelMap(float value DECLARE_ENGINE_PARAMETER_SUFFIX);
|
||||||
void setWholeIgnitionIatCorr(float value DECLARE_ENGINE_PARAMETER_S);
|
void setWholeIgnitionIatCorr(float value DECLARE_ENGINE_PARAMETER_SUFFIX);
|
||||||
void setFuelTablesLoadBin(float minValue, float maxValue DECLARE_ENGINE_PARAMETER_S);
|
void setFuelTablesLoadBin(float minValue, float maxValue DECLARE_ENGINE_PARAMETER_SUFFIX);
|
||||||
void setWholeIatCorrTimingTable(float value DECLARE_ENGINE_PARAMETER_S);
|
void setWholeIatCorrTimingTable(float value DECLARE_ENGINE_PARAMETER_SUFFIX);
|
||||||
void setWholeTimingTable(angle_t value DECLARE_ENGINE_PARAMETER_S);
|
void setWholeTimingTable(angle_t value DECLARE_ENGINE_PARAMETER_SUFFIX);
|
||||||
void setConstantDwell(floatms_t dwellMs DECLARE_ENGINE_PARAMETER_S);
|
void setConstantDwell(floatms_t dwellMs DECLARE_ENGINE_PARAMETER_SUFFIX);
|
||||||
void printFloatArray(const char *prefix, float array[], int size);
|
void printFloatArray(const char *prefix, float array[], int size);
|
||||||
|
|
||||||
void rememberCurrentConfiguration(void);
|
void rememberCurrentConfiguration(void);
|
||||||
void incrementGlobalConfigurationVersion(DECLARE_ENGINE_PARAMETER_F);
|
void incrementGlobalConfigurationVersion(DECLARE_ENGINE_PARAMETER_SIGNATURE);
|
||||||
int getGlobalConfigurationVersion(void);
|
int getGlobalConfigurationVersion(void);
|
||||||
|
|
||||||
void commonFrankensoAnalogInputs(engine_configuration_s *engineConfiguration);
|
void commonFrankensoAnalogInputs(engine_configuration_s *engineConfiguration);
|
||||||
|
|
|
@ -10,31 +10,31 @@
|
||||||
|
|
||||||
#include "engine.h"
|
#include "engine.h"
|
||||||
|
|
||||||
void prepareFuelMap(DECLARE_ENGINE_PARAMETER_F);
|
void prepareFuelMap(DECLARE_ENGINE_PARAMETER_SIGNATURE);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return total injection time into all cylinders, before CLT & IAT corrections
|
* @return total injection time into all cylinders, before CLT & IAT corrections
|
||||||
*/
|
*/
|
||||||
floatms_t getBaseFuel(int rpm DECLARE_ENGINE_PARAMETER_S);
|
floatms_t getBaseFuel(int rpm DECLARE_ENGINE_PARAMETER_SUFFIX);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return baseFuel with CLT and IAT corrections
|
* @return baseFuel with CLT and IAT corrections
|
||||||
*/
|
*/
|
||||||
floatms_t getRunningFuel(floatms_t baseFuel DECLARE_ENGINE_PARAMETER_S);
|
floatms_t getRunningFuel(floatms_t baseFuel DECLARE_ENGINE_PARAMETER_SUFFIX);
|
||||||
|
|
||||||
floatms_t getRealMafFuel(float airMass, int rpm DECLARE_ENGINE_PARAMETER_S);
|
floatms_t getRealMafFuel(float airMass, int rpm DECLARE_ENGINE_PARAMETER_SUFFIX);
|
||||||
|
|
||||||
floatms_t getBaseTableFuel(int rpm, float engineLoad);
|
floatms_t getBaseTableFuel(int rpm, float engineLoad);
|
||||||
float getBaroCorrection(DECLARE_ENGINE_PARAMETER_F);
|
float getBaroCorrection(DECLARE_ENGINE_PARAMETER_SIGNATURE);
|
||||||
int getNumberOfInjections(injection_mode_e mode DECLARE_ENGINE_PARAMETER_S);
|
int getNumberOfInjections(injection_mode_e mode DECLARE_ENGINE_PARAMETER_SUFFIX);
|
||||||
angle_t getinjectionOffset(float rpm DECLARE_ENGINE_PARAMETER_S);
|
angle_t getinjectionOffset(float rpm DECLARE_ENGINE_PARAMETER_SUFFIX);
|
||||||
float getIatFuelCorrection(float iat DECLARE_ENGINE_PARAMETER_S);
|
float getIatFuelCorrection(float iat DECLARE_ENGINE_PARAMETER_SUFFIX);
|
||||||
floatms_t getInjectorLag(float vBatt DECLARE_ENGINE_PARAMETER_S);
|
floatms_t getInjectorLag(float vBatt DECLARE_ENGINE_PARAMETER_SUFFIX);
|
||||||
float getCltFuelCorrection(DECLARE_ENGINE_PARAMETER_F);
|
float getCltFuelCorrection(DECLARE_ENGINE_PARAMETER_SIGNATURE);
|
||||||
angle_t getCltTimingCorrection(DECLARE_ENGINE_PARAMETER_F);
|
angle_t getCltTimingCorrection(DECLARE_ENGINE_PARAMETER_SIGNATURE);
|
||||||
floatms_t getCrankingFuel(DECLARE_ENGINE_PARAMETER_F);
|
floatms_t getCrankingFuel(DECLARE_ENGINE_PARAMETER_SIGNATURE);
|
||||||
floatms_t getCrankingFuel3(float coolantTemperature, uint32_t revolutionCounterSinceStart DECLARE_ENGINE_PARAMETER_S);
|
floatms_t getCrankingFuel3(float coolantTemperature, uint32_t revolutionCounterSinceStart DECLARE_ENGINE_PARAMETER_SUFFIX);
|
||||||
floatms_t getInjectionDuration(int rpm DECLARE_ENGINE_PARAMETER_S);
|
floatms_t getInjectionDuration(int rpm DECLARE_ENGINE_PARAMETER_SUFFIX);
|
||||||
percent_t getInjectorDutyCycle(int rpm DECLARE_ENGINE_PARAMETER_S);
|
percent_t getInjectorDutyCycle(int rpm DECLARE_ENGINE_PARAMETER_SUFFIX);
|
||||||
|
|
||||||
#endif /* FUEL_MAP_H_ */
|
#endif /* FUEL_MAP_H_ */
|
||||||
|
|
|
@ -21,9 +21,9 @@
|
||||||
class IdleValveState {
|
class IdleValveState {
|
||||||
public:
|
public:
|
||||||
IdleValveState();
|
IdleValveState();
|
||||||
void init(DECLARE_ENGINE_PARAMETER_F);
|
void init(DECLARE_ENGINE_PARAMETER_SIGNATURE);
|
||||||
void setTargetRpm(int targetRpm);
|
void setTargetRpm(int targetRpm);
|
||||||
percent_t getIdle(int currentRpm, efitimems_t now DECLARE_ENGINE_PARAMETER_S);
|
percent_t getIdle(int currentRpm, efitimems_t now DECLARE_ENGINE_PARAMETER_SUFFIX);
|
||||||
|
|
||||||
int time;
|
int time;
|
||||||
|
|
||||||
|
|
|
@ -85,7 +85,7 @@ static msg_t AltCtrlThread(int param) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
float vBatt = getVBatt(PASS_ENGINE_PARAMETER_F);
|
float vBatt = getVBatt(PASS_ENGINE_PARAMETER_SIGNATURE);
|
||||||
float targetVoltage = engineConfiguration->targetVBatt;
|
float targetVoltage = engineConfiguration->targetVBatt;
|
||||||
|
|
||||||
if (boardConfiguration->onOffAlternatorLogic) {
|
if (boardConfiguration->onOffAlternatorLogic) {
|
||||||
|
@ -123,7 +123,7 @@ void showAltInfo(void) {
|
||||||
engineConfiguration->alternatorDT);
|
engineConfiguration->alternatorDT);
|
||||||
scheduleMsg(logger, "p=%f/i=%f/d=%f offset=%f", engineConfiguration->alternatorControl.pFactor,
|
scheduleMsg(logger, "p=%f/i=%f/d=%f offset=%f", engineConfiguration->alternatorControl.pFactor,
|
||||||
0, 0, engineConfiguration->alternatorControl.offset); // todo: i & d
|
0, 0, engineConfiguration->alternatorControl.offset); // todo: i & d
|
||||||
scheduleMsg(logger, "vbatt=%f/duty=%f/target=%f", getVBatt(PASS_ENGINE_PARAMETER_F), currentAltDuty,
|
scheduleMsg(logger, "vbatt=%f/duty=%f/target=%f", getVBatt(PASS_ENGINE_PARAMETER_SIGNATURE), currentAltDuty,
|
||||||
engineConfiguration->targetVBatt);
|
engineConfiguration->targetVBatt);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -19,11 +19,11 @@ typedef Map3D<FSIO_TABLE_8, FSIO_TABLE_8, uint8_t> fsio8_Map3D_u8t;
|
||||||
|
|
||||||
|
|
||||||
float getLEValue(Engine *engine, calc_stack_t *s, le_action_e action);
|
float getLEValue(Engine *engine, calc_stack_t *s, le_action_e action);
|
||||||
void setFsio(int index, brain_pin_e pin, const char * exp DECLARE_ENGINE_PARAMETER_S);
|
void setFsio(int index, brain_pin_e pin, const char * exp DECLARE_ENGINE_PARAMETER_SUFFIX);
|
||||||
void setFsioExt(int index, brain_pin_e pin, const char * exp, int freq DECLARE_ENGINE_PARAMETER_S);
|
void setFsioExt(int index, brain_pin_e pin, const char * exp, int freq DECLARE_ENGINE_PARAMETER_SUFFIX);
|
||||||
|
|
||||||
void initFsioImpl(Logging *sharedLogger DECLARE_ENGINE_PARAMETER_S);
|
void initFsioImpl(Logging *sharedLogger DECLARE_ENGINE_PARAMETER_SUFFIX);
|
||||||
void runFsio(void);
|
void runFsio(void);
|
||||||
void applyFsioConfiguration(DECLARE_ENGINE_PARAMETER_F);
|
void applyFsioConfiguration(DECLARE_ENGINE_PARAMETER_SIGNATURE);
|
||||||
|
|
||||||
#endif /* LE_FUNCTIONS_H_ */
|
#endif /* LE_FUNCTIONS_H_ */
|
||||||
|
|
|
@ -72,7 +72,7 @@ static bool wasEtbBraking = false;
|
||||||
static msg_t etbThread(void *arg) {
|
static msg_t etbThread(void *arg) {
|
||||||
UNUSED(arg);
|
UNUSED(arg);
|
||||||
while (true) {
|
while (true) {
|
||||||
percent_t pedal = getPedalPosition(PASS_ENGINE_PARAMETER_F);
|
percent_t pedal = getPedalPosition(PASS_ENGINE_PARAMETER_SIGNATURE);
|
||||||
percent_t tps = getTPS();
|
percent_t tps = getTPS();
|
||||||
|
|
||||||
currentEtbDuty = pid.getValue(pedal, getTPS());
|
currentEtbDuty = pid.getValue(pedal, getTPS());
|
||||||
|
|
|
@ -15,9 +15,9 @@
|
||||||
#include "engine.h"
|
#include "engine.h"
|
||||||
|
|
||||||
char * getPinNameByAdcChannel(const char *msg, adc_channel_e hwChannel, char *buffer);
|
char * getPinNameByAdcChannel(const char *msg, adc_channel_e hwChannel, char *buffer);
|
||||||
void initPeriodicEvents(DECLARE_ENGINE_PARAMETER_F);
|
void initPeriodicEvents(DECLARE_ENGINE_PARAMETER_SIGNATURE);
|
||||||
void initEngineContoller(Logging *sharedLogger DECLARE_ENGINE_PARAMETER_S);
|
void initEngineContoller(Logging *sharedLogger DECLARE_ENGINE_PARAMETER_SUFFIX);
|
||||||
void commonInitEngineController(Logging *sharedLogger DECLARE_ENGINE_PARAMETER_S);
|
void commonInitEngineController(Logging *sharedLogger DECLARE_ENGINE_PARAMETER_SUFFIX);
|
||||||
|
|
||||||
void setVBattVoltage(float voltage);
|
void setVBattVoltage(float voltage);
|
||||||
void setMapVoltage(float voltage);
|
void setMapVoltage(float voltage);
|
||||||
|
|
|
@ -119,7 +119,7 @@ void initLcdController(void) {
|
||||||
static char * prepareVBattMapLine(char *buffer) {
|
static char * prepareVBattMapLine(char *buffer) {
|
||||||
char *ptr = buffer;
|
char *ptr = buffer;
|
||||||
*ptr++ = 'V';
|
*ptr++ = 'V';
|
||||||
ptr = ftoa(ptr, getVBatt(PASS_ENGINE_PARAMETER_F), 10.0f);
|
ptr = ftoa(ptr, getVBatt(PASS_ENGINE_PARAMETER_SIGNATURE), 10.0f);
|
||||||
|
|
||||||
ptr = appendStr(ptr, " M");
|
ptr = appendStr(ptr, " M");
|
||||||
ptr = ftoa(ptr, getRawMap(), 10.0f);
|
ptr = ftoa(ptr, getRawMap(), 10.0f);
|
||||||
|
@ -131,7 +131,7 @@ static char * prepareCltIatTpsLine(char *buffer) {
|
||||||
*ptr++ = 'C';
|
*ptr++ = 'C';
|
||||||
|
|
||||||
ptr = appendStr(ptr, " TP");
|
ptr = appendStr(ptr, " TP");
|
||||||
ptr = itoa10(ptr, (int) getTPS(PASS_ENGINE_PARAMETER_F));
|
ptr = itoa10(ptr, (int) getTPS(PASS_ENGINE_PARAMETER_SIGNATURE));
|
||||||
return ptr;
|
return ptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -232,10 +232,10 @@ static void showLine(lcd_line_e line, int screenY) {
|
||||||
#endif
|
#endif
|
||||||
return;
|
return;
|
||||||
case LL_CLT_TEMPERATURE:
|
case LL_CLT_TEMPERATURE:
|
||||||
lcdPrintf("Coolant %f", getCoolantTemperature(PASS_ENGINE_PARAMETER_F));
|
lcdPrintf("Coolant %f", getCoolantTemperature(PASS_ENGINE_PARAMETER_SIGNATURE));
|
||||||
return;
|
return;
|
||||||
case LL_IAT_TEMPERATURE:
|
case LL_IAT_TEMPERATURE:
|
||||||
lcdPrintf("Intake Air %f", getIntakeAirTemperature(PASS_ENGINE_PARAMETER_F));
|
lcdPrintf("Intake Air %f", getIntakeAirTemperature(PASS_ENGINE_PARAMETER_SIGNATURE));
|
||||||
return;
|
return;
|
||||||
case LL_ALGORITHM:
|
case LL_ALGORITHM:
|
||||||
lcdPrintf(getEngine_load_mode_e(engineConfiguration->fuelAlgorithm));
|
lcdPrintf(getEngine_load_mode_e(engineConfiguration->fuelAlgorithm));
|
||||||
|
@ -255,11 +255,11 @@ static void showLine(lcd_line_e line, int screenY) {
|
||||||
lcdPrintf("Throttle %s %f%%", buffer, getTPS());
|
lcdPrintf("Throttle %s %f%%", buffer, getTPS());
|
||||||
return;
|
return;
|
||||||
case LL_FUEL_CLT_CORRECTION:
|
case LL_FUEL_CLT_CORRECTION:
|
||||||
lcdPrintf("CLT corr %fv", getCltFuelCorrection(PASS_ENGINE_PARAMETER_F));
|
lcdPrintf("CLT corr %fv", getCltFuelCorrection(PASS_ENGINE_PARAMETER_SIGNATURE));
|
||||||
return;
|
return;
|
||||||
|
|
||||||
case LL_VBATT:
|
case LL_VBATT:
|
||||||
lcdPrintf("Battery %fv", getVBatt(PASS_ENGINE_PARAMETER_F));
|
lcdPrintf("Battery %fv", getVBatt(PASS_ENGINE_PARAMETER_SIGNATURE));
|
||||||
return;
|
return;
|
||||||
case LL_KNOCK:
|
case LL_KNOCK:
|
||||||
getPinNameByAdcChannel("hip", engineConfiguration->hipOutputChannel, buffer);
|
getPinNameByAdcChannel("hip", engineConfiguration->hipOutputChannel, buffer);
|
||||||
|
@ -276,14 +276,14 @@ static void showLine(lcd_line_e line, int screenY) {
|
||||||
return;
|
return;
|
||||||
#endif
|
#endif
|
||||||
case LL_AFR:
|
case LL_AFR:
|
||||||
if (hasAfrSensor(PASS_ENGINE_PARAMETER_F)) {
|
if (hasAfrSensor(PASS_ENGINE_PARAMETER_SIGNATURE)) {
|
||||||
lcdPrintf("AFR: %f", getAfr());
|
lcdPrintf("AFR: %f", getAfr());
|
||||||
} else {
|
} else {
|
||||||
lcdPrintf("AFR: none");
|
lcdPrintf("AFR: none");
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
case LL_MAP:
|
case LL_MAP:
|
||||||
if (hasMapSensor(PASS_ENGINE_PARAMETER_F)) {
|
if (hasMapSensor(PASS_ENGINE_PARAMETER_SIGNATURE)) {
|
||||||
lcdPrintf("MAP %f", getMap());
|
lcdPrintf("MAP %f", getMap());
|
||||||
} else {
|
} else {
|
||||||
lcdPrintf("MAP: none");
|
lcdPrintf("MAP: none");
|
||||||
|
@ -291,14 +291,14 @@ static void showLine(lcd_line_e line, int screenY) {
|
||||||
return;
|
return;
|
||||||
case LL_MAF_V:
|
case LL_MAF_V:
|
||||||
if (hasMafSensor()) {
|
if (hasMafSensor()) {
|
||||||
lcdPrintf("MAF: %fv", getMaf(PASS_ENGINE_PARAMETER_F));
|
lcdPrintf("MAF: %fv", getMaf(PASS_ENGINE_PARAMETER_SIGNATURE));
|
||||||
} else {
|
} else {
|
||||||
lcdPrintf("MAF: none");
|
lcdPrintf("MAF: none");
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
case LL_MAF_KG_HR:
|
case LL_MAF_KG_HR:
|
||||||
if (hasMafSensor()) {
|
if (hasMafSensor()) {
|
||||||
lcdPrintf("MAF: %f kg/hr", getRealMaf(PASS_ENGINE_PARAMETER_F));
|
lcdPrintf("MAF: %f kg/hr", getRealMaf(PASS_ENGINE_PARAMETER_SIGNATURE));
|
||||||
} else {
|
} else {
|
||||||
lcdPrintf("MAF: none");
|
lcdPrintf("MAF: none");
|
||||||
}
|
}
|
||||||
|
|
|
@ -14,7 +14,7 @@ Biquad::Biquad() {
|
||||||
z1 = z2 = 0;
|
z1 = z2 = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
void Biquad::initValue(float input DECLARE_ENGINE_PARAMETER_S) {
|
void Biquad::initValue(float input DECLARE_ENGINE_PARAMETER_SUFFIX) {
|
||||||
a0 = engineConfiguration->biQuad.a0;
|
a0 = engineConfiguration->biQuad.a0;
|
||||||
a1 = engineConfiguration->biQuad.a1;
|
a1 = engineConfiguration->biQuad.a1;
|
||||||
a2 = engineConfiguration->biQuad.a2;
|
a2 = engineConfiguration->biQuad.a2;
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
class Biquad {
|
class Biquad {
|
||||||
public:
|
public:
|
||||||
Biquad();
|
Biquad();
|
||||||
void initValue(float input DECLARE_ENGINE_PARAMETER_S);
|
void initValue(float input DECLARE_ENGINE_PARAMETER_SUFFIX);
|
||||||
float getValue(float input);
|
float getValue(float input);
|
||||||
|
|
||||||
float a0, a1, a2, b1, b2;
|
float a0, a1, a2, b1, b2;
|
||||||
|
|
|
@ -14,7 +14,7 @@
|
||||||
#include "table_helper.h"
|
#include "table_helper.h"
|
||||||
#include "engine.h"
|
#include "engine.h"
|
||||||
|
|
||||||
void setAlgorithm(engine_load_mode_e algo DECLARE_ENGINE_PARAMETER_S);
|
void setAlgorithm(engine_load_mode_e algo DECLARE_ENGINE_PARAMETER_SUFFIX);
|
||||||
|
|
||||||
|
|
||||||
#if EFI_ENABLE_ASSERTS
|
#if EFI_ENABLE_ASSERTS
|
||||||
|
@ -23,7 +23,7 @@ void setAlgorithm(engine_load_mode_e algo DECLARE_ENGINE_PARAMETER_S);
|
||||||
#define assertAngleRange(angle, msg) {}
|
#define assertAngleRange(angle, msg) {}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
void setInjectorLag(float value DECLARE_ENGINE_PARAMETER_S);
|
void setInjectorLag(float value DECLARE_ENGINE_PARAMETER_SUFFIX);
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -61,20 +61,20 @@ void setInjectorLag(float value DECLARE_ENGINE_PARAMETER_S);
|
||||||
#define getOneDegreeTimeNt(rpm) (US2NT(1000000) * 60.0f / 360 / (rpm))
|
#define getOneDegreeTimeNt(rpm) (US2NT(1000000) * 60.0f / 360 / (rpm))
|
||||||
|
|
||||||
floatms_t getCrankshaftRevolutionTimeMs(int rpm);
|
floatms_t getCrankshaftRevolutionTimeMs(int rpm);
|
||||||
floatms_t getEngineCycleDuration(int rpm DECLARE_ENGINE_PARAMETER_S);
|
floatms_t getEngineCycleDuration(int rpm DECLARE_ENGINE_PARAMETER_SUFFIX);
|
||||||
|
|
||||||
#define isCrankingR(rpm) ((rpm) > 0 && (rpm) < CONFIG(cranking.rpm))
|
#define isCrankingR(rpm) ((rpm) > 0 && (rpm) < CONFIG(cranking.rpm))
|
||||||
|
|
||||||
float getEngineLoadT(DECLARE_ENGINE_PARAMETER_F);
|
float getEngineLoadT(DECLARE_ENGINE_PARAMETER_SIGNATURE);
|
||||||
|
|
||||||
floatms_t getSparkDwell(int rpm DECLARE_ENGINE_PARAMETER_S);
|
floatms_t getSparkDwell(int rpm DECLARE_ENGINE_PARAMETER_SUFFIX);
|
||||||
|
|
||||||
int getCylinderId(int index DECLARE_ENGINE_PARAMETER_S);
|
int getCylinderId(int index DECLARE_ENGINE_PARAMETER_SUFFIX);
|
||||||
|
|
||||||
void setFuelRpmBin(float from, float to DECLARE_ENGINE_PARAMETER_S);
|
void setFuelRpmBin(float from, float to DECLARE_ENGINE_PARAMETER_SUFFIX);
|
||||||
void setFuelLoadBin(float from, float to DECLARE_ENGINE_PARAMETER_S);
|
void setFuelLoadBin(float from, float to DECLARE_ENGINE_PARAMETER_SUFFIX);
|
||||||
void setTimingRpmBin(float from, float to DECLARE_ENGINE_PARAMETER_S);
|
void setTimingRpmBin(float from, float to DECLARE_ENGINE_PARAMETER_SUFFIX);
|
||||||
void setTimingLoadBin(float from, float to DECLARE_ENGINE_PARAMETER_S);
|
void setTimingLoadBin(float from, float to DECLARE_ENGINE_PARAMETER_SUFFIX);
|
||||||
|
|
||||||
void setSingleCoilDwell(engine_configuration_s *engineConfiguration);
|
void setSingleCoilDwell(engine_configuration_s *engineConfiguration);
|
||||||
|
|
||||||
|
|
|
@ -27,7 +27,7 @@ baroCorr_Map3D_t baroCorrMap("baro");
|
||||||
#define tpMin 0
|
#define tpMin 0
|
||||||
#define tpMax 100
|
#define tpMax 100
|
||||||
// http://rusefi.com/math/t_charge.html
|
// http://rusefi.com/math/t_charge.html
|
||||||
float getTCharge(int rpm, float tps, float coolantTemp, float airTemp DECLARE_ENGINE_PARAMETER_S) {
|
float getTCharge(int rpm, float tps, float coolantTemp, float airTemp DECLARE_ENGINE_PARAMETER_SUFFIX) {
|
||||||
float minRpmKcurrentTPS = interpolate(tpMin, engineConfiguration->tChargeMinRpmMinTps, tpMax,
|
float minRpmKcurrentTPS = interpolate(tpMin, engineConfiguration->tChargeMinRpmMinTps, tpMax,
|
||||||
engineConfiguration->tChargeMinRpmMaxTps, tps);
|
engineConfiguration->tChargeMinRpmMaxTps, tps);
|
||||||
float maxRpmKcurrentTPS = interpolate(tpMin, engineConfiguration->tChargeMaxRpmMinTps, tpMax,
|
float maxRpmKcurrentTPS = interpolate(tpMin, engineConfiguration->tChargeMaxRpmMinTps, tpMax,
|
||||||
|
@ -81,7 +81,7 @@ EXTERN_ENGINE;
|
||||||
/**
|
/**
|
||||||
* @return per cylinder injection time, in Milliseconds
|
* @return per cylinder injection time, in Milliseconds
|
||||||
*/
|
*/
|
||||||
floatms_t getSpeedDensityFuel(DECLARE_ENGINE_PARAMETER_F) {
|
floatms_t getSpeedDensityFuel(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
|
||||||
/**
|
/**
|
||||||
* most of the values are pre-calculated for performance reasons
|
* most of the values are pre-calculated for performance reasons
|
||||||
*/
|
*/
|
||||||
|
@ -93,7 +93,7 @@ floatms_t getSpeedDensityFuel(DECLARE_ENGINE_PARAMETER_F) {
|
||||||
float map = getMap();
|
float map = getMap();
|
||||||
efiAssert(!cisnan(map), "NaN map", 0);
|
efiAssert(!cisnan(map), "NaN map", 0);
|
||||||
|
|
||||||
float adjustedMap = map + engine->engineLoadAccelEnrichment.getEngineLoadEnrichment(PASS_ENGINE_PARAMETER_F);
|
float adjustedMap = map + engine->engineLoadAccelEnrichment.getEngineLoadEnrichment(PASS_ENGINE_PARAMETER_SIGNATURE);
|
||||||
efiAssert(!cisnan(adjustedMap), "NaN adjustedMap", 0);
|
efiAssert(!cisnan(adjustedMap), "NaN adjustedMap", 0);
|
||||||
|
|
||||||
float airMass = getAirMass(engineConfiguration, ENGINE(engineState.currentVE), adjustedMap, tChargeK);
|
float airMass = getAirMass(engineConfiguration, ENGINE(engineState.currentVE), adjustedMap, tChargeK);
|
||||||
|
@ -114,7 +114,7 @@ static const baro_corr_table_t default_baro_corr = {
|
||||||
{1.141, 1.086, 1.039, 1}
|
{1.141, 1.086, 1.039, 1}
|
||||||
};
|
};
|
||||||
|
|
||||||
void setDefaultVETable(DECLARE_ENGINE_PARAMETER_F) {
|
void setDefaultVETable(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
|
||||||
setRpmTableBin(config->veRpmBins, FUEL_RPM_COUNT);
|
setRpmTableBin(config->veRpmBins, FUEL_RPM_COUNT);
|
||||||
veMap.setAll(80);
|
veMap.setAll(80);
|
||||||
|
|
||||||
|
@ -130,7 +130,7 @@ void setDefaultVETable(DECLARE_ENGINE_PARAMETER_F) {
|
||||||
memcpy(engineConfiguration->baroCorrTable, default_baro_corr, sizeof(default_baro_corr));
|
memcpy(engineConfiguration->baroCorrTable, default_baro_corr, sizeof(default_baro_corr));
|
||||||
}
|
}
|
||||||
|
|
||||||
void initSpeedDensity(DECLARE_ENGINE_PARAMETER_F) {
|
void initSpeedDensity(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
|
||||||
veMap.init(config->veTable, config->veLoadBins, config->veRpmBins);
|
veMap.init(config->veTable, config->veLoadBins, config->veRpmBins);
|
||||||
// ve2Map.init(engineConfiguration->ve2Table, engineConfiguration->ve2LoadBins, engineConfiguration->ve2RpmBins);
|
// ve2Map.init(engineConfiguration->ve2Table, engineConfiguration->ve2LoadBins, engineConfiguration->ve2RpmBins);
|
||||||
afrMap.init(config->afrTable, config->afrLoadBins, config->afrRpmBins);
|
afrMap.init(config->afrTable, config->afrLoadBins, config->afrRpmBins);
|
||||||
|
|
|
@ -9,7 +9,7 @@
|
||||||
|
|
||||||
#include "engine.h"
|
#include "engine.h"
|
||||||
|
|
||||||
float getTCharge(int rpm, float tps, float coolantTemp, float airTemp DECLARE_ENGINE_PARAMETER_S);
|
float getTCharge(int rpm, float tps, float coolantTemp, float airTemp DECLARE_ENGINE_PARAMETER_SUFFIX);
|
||||||
void setDetaultVETable(persistent_config_s *config);
|
void setDetaultVETable(persistent_config_s *config);
|
||||||
float getAirMass(engine_configuration_s *engineConfiguration, float VE, float MAP, float tempK);
|
float getAirMass(engine_configuration_s *engineConfiguration, float VE, float MAP, float tempK);
|
||||||
float sdMath(engine_configuration_s *engineConfiguration, float airMass, float AFR);
|
float sdMath(engine_configuration_s *engineConfiguration, float airMass, float AFR);
|
||||||
|
@ -18,8 +18,8 @@ float sdMath(engine_configuration_s *engineConfiguration, float airMass, float A
|
||||||
|
|
||||||
#define cc_minute_to_gramm_second(ccm) ((ccm) * 0.0119997981)
|
#define cc_minute_to_gramm_second(ccm) ((ccm) * 0.0119997981)
|
||||||
|
|
||||||
void setDefaultVETable(DECLARE_ENGINE_PARAMETER_F);
|
void setDefaultVETable(DECLARE_ENGINE_PARAMETER_SIGNATURE);
|
||||||
void initSpeedDensity(DECLARE_ENGINE_PARAMETER_F);
|
void initSpeedDensity(DECLARE_ENGINE_PARAMETER_SIGNATURE);
|
||||||
floatms_t getSpeedDensityFuel(DECLARE_ENGINE_PARAMETER_F);
|
floatms_t getSpeedDensityFuel(DECLARE_ENGINE_PARAMETER_SIGNATURE);
|
||||||
|
|
||||||
#endif /* SPEED_DENSITY_H_ */
|
#endif /* SPEED_DENSITY_H_ */
|
||||||
|
|
|
@ -25,8 +25,8 @@
|
||||||
#include "adc_math.h"
|
#include "adc_math.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
void initSensors(Logging *sharedLogger DECLARE_ENGINE_PARAMETER_S);
|
void initSensors(Logging *sharedLogger DECLARE_ENGINE_PARAMETER_SUFFIX);
|
||||||
|
|
||||||
bool getAcToggle(DECLARE_ENGINE_PARAMETER_F);
|
bool getAcToggle(DECLARE_ENGINE_PARAMETER_SIGNATURE);
|
||||||
|
|
||||||
#endif /*SENSORS_H_*/
|
#endif /*SENSORS_H_*/
|
||||||
|
|
|
@ -8,11 +8,11 @@
|
||||||
|
|
||||||
EXTERN_ENGINE;
|
EXTERN_ENGINE;
|
||||||
|
|
||||||
bool hasAfrSensor(DECLARE_ENGINE_PARAMETER_F) {
|
bool hasAfrSensor(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
|
||||||
return engineConfiguration->afr.hwChannel != EFI_ADC_NONE;
|
return engineConfiguration->afr.hwChannel != EFI_ADC_NONE;
|
||||||
}
|
}
|
||||||
|
|
||||||
float getAfr(DECLARE_ENGINE_PARAMETER_F) {
|
float getAfr(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
|
||||||
afr_sensor_s * sensor = &CONFIG(afr);
|
afr_sensor_s * sensor = &CONFIG(afr);
|
||||||
|
|
||||||
float volts = getVoltageDivided("ego", sensor->hwChannel);
|
float volts = getVoltageDivided("ego", sensor->hwChannel);
|
||||||
|
@ -65,7 +65,7 @@ static void initEgoSensor(afr_sensor_s *sensor, ego_sensor_e type) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void setEgoSensor(ego_sensor_e type DECLARE_ENGINE_PARAMETER_S) {
|
void setEgoSensor(ego_sensor_e type DECLARE_ENGINE_PARAMETER_SUFFIX) {
|
||||||
boardConfiguration->afr_type = type;
|
boardConfiguration->afr_type = type;
|
||||||
initEgoSensor(&engineConfiguration->afr, type);
|
initEgoSensor(&engineConfiguration->afr, type);
|
||||||
}
|
}
|
||||||
|
|
|
@ -14,8 +14,8 @@
|
||||||
#include "rusefi_enums.h"
|
#include "rusefi_enums.h"
|
||||||
#include "engine_configuration.h"
|
#include "engine_configuration.h"
|
||||||
|
|
||||||
float getAfr(DECLARE_ENGINE_PARAMETER_F);
|
float getAfr(DECLARE_ENGINE_PARAMETER_SIGNATURE);
|
||||||
bool hasAfrSensor(DECLARE_ENGINE_PARAMETER_F);
|
bool hasAfrSensor(DECLARE_ENGINE_PARAMETER_SIGNATURE);
|
||||||
void setEgoSensor(ego_sensor_e type DECLARE_ENGINE_PARAMETER_S);
|
void setEgoSensor(ego_sensor_e type DECLARE_ENGINE_PARAMETER_SUFFIX);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -84,7 +84,7 @@ int getHip9011BandIndex(float frequency) {
|
||||||
|
|
||||||
EXTERN_ENGINE;
|
EXTERN_ENGINE;
|
||||||
|
|
||||||
void initEngineNoiseTable(DECLARE_ENGINE_PARAMETER_F) {
|
void initEngineNoiseTable(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
|
||||||
setRpmTableBin(engineConfiguration->knockNoiseRpmBins, ENGINE_NOISE_CURVE_SIZE);
|
setRpmTableBin(engineConfiguration->knockNoiseRpmBins, ENGINE_NOISE_CURVE_SIZE);
|
||||||
|
|
||||||
engineConfiguration->knockNoise[0] = 2; // 800
|
engineConfiguration->knockNoise[0] = 2; // 800
|
||||||
|
|
|
@ -30,6 +30,6 @@ void prepareHip9011RpmLookup(float angleWindowWidth);
|
||||||
|
|
||||||
extern float rpmLookup[INT_LOOKUP_SIZE];
|
extern float rpmLookup[INT_LOOKUP_SIZE];
|
||||||
int getIntegrationIndexByRpm(float rpm);
|
int getIntegrationIndexByRpm(float rpm);
|
||||||
void initEngineNoiseTable(DECLARE_ENGINE_PARAMETER_F);
|
void initEngineNoiseTable(DECLARE_ENGINE_PARAMETER_SIGNATURE);
|
||||||
|
|
||||||
#endif /* CONTROLLERS_SENSORS_HIP9011_LOOKUP_H_ */
|
#endif /* CONTROLLERS_SENSORS_HIP9011_LOOKUP_H_ */
|
||||||
|
|
|
@ -9,18 +9,18 @@ EXTERN_ENGINE
|
||||||
/**
|
/**
|
||||||
* @return MAF sensor voltage
|
* @return MAF sensor voltage
|
||||||
*/
|
*/
|
||||||
float getMaf(DECLARE_ENGINE_PARAMETER_F) {
|
float getMaf(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
|
||||||
return getMafT(engineConfiguration);
|
return getMafT(engineConfiguration);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool hasMafSensor(DECLARE_ENGINE_PARAMETER_F) {
|
bool hasMafSensor(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
|
||||||
return engineConfiguration->mafAdcChannel != EFI_ADC_NONE;
|
return engineConfiguration->mafAdcChannel != EFI_ADC_NONE;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return kg/hour value
|
* @return kg/hour value
|
||||||
*/
|
*/
|
||||||
float getRealMaf(DECLARE_ENGINE_PARAMETER_F) {
|
float getRealMaf(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
|
||||||
int mafAdc = getAdcValue("maf", engineConfiguration->mafAdcChannel);
|
int mafAdc = getAdcValue("maf", engineConfiguration->mafAdcChannel);
|
||||||
/**
|
/**
|
||||||
* here we drop from 12 bit ADC to 8 bit index
|
* here we drop from 12 bit ADC to 8 bit index
|
||||||
|
|
|
@ -15,9 +15,9 @@
|
||||||
#include "main.h"
|
#include "main.h"
|
||||||
|
|
||||||
#define getMafT(ec) (getVoltageDivided("maf", ec->mafAdcChannel))
|
#define getMafT(ec) (getVoltageDivided("maf", ec->mafAdcChannel))
|
||||||
float getMaf(DECLARE_ENGINE_PARAMETER_F);
|
float getMaf(DECLARE_ENGINE_PARAMETER_SIGNATURE);
|
||||||
bool hasMafSensor(DECLARE_ENGINE_PARAMETER_F);
|
bool hasMafSensor(DECLARE_ENGINE_PARAMETER_SIGNATURE);
|
||||||
float getRealMaf(DECLARE_ENGINE_PARAMETER_F);
|
float getRealMaf(DECLARE_ENGINE_PARAMETER_SIGNATURE);
|
||||||
|
|
||||||
void setBosch0280218037(persistent_config_s *engineConfiguration);
|
void setBosch0280218037(persistent_config_s *engineConfiguration);
|
||||||
void setBosch0280218004(persistent_config_s *engineConfiguration);
|
void setBosch0280218004(persistent_config_s *engineConfiguration);
|
||||||
|
|
|
@ -7,24 +7,24 @@
|
||||||
#include "engine_configuration.h"
|
#include "engine_configuration.h"
|
||||||
#include "sensor_types.h"
|
#include "sensor_types.h"
|
||||||
|
|
||||||
void initMapDecoder(Logging *sharedLogger DECLARE_ENGINE_PARAMETER_S);
|
void initMapDecoder(Logging *sharedLogger DECLARE_ENGINE_PARAMETER_SUFFIX);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return Raw MAP sensor value right now
|
* @return Raw MAP sensor value right now
|
||||||
*/
|
*/
|
||||||
float getRawMap(DECLARE_ENGINE_PARAMETER_F);
|
float getRawMap(DECLARE_ENGINE_PARAMETER_SIGNATURE);
|
||||||
float getBaroPressure(DECLARE_ENGINE_PARAMETER_F);
|
float getBaroPressure(DECLARE_ENGINE_PARAMETER_SIGNATURE);
|
||||||
bool hasBaroSensor(DECLARE_ENGINE_PARAMETER_F);
|
bool hasBaroSensor(DECLARE_ENGINE_PARAMETER_SIGNATURE);
|
||||||
bool hasMapSensor(DECLARE_ENGINE_PARAMETER_F);
|
bool hasMapSensor(DECLARE_ENGINE_PARAMETER_SIGNATURE);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return MAP value averaged within a window of measurement
|
* @return MAP value averaged within a window of measurement
|
||||||
*/
|
*/
|
||||||
float getMap(void);
|
float getMap(void);
|
||||||
float getMapVoltage(void);
|
float getMapVoltage(void);
|
||||||
float getMapByVoltage(float voltage DECLARE_ENGINE_PARAMETER_S);
|
float getMapByVoltage(float voltage DECLARE_ENGINE_PARAMETER_SUFFIX);
|
||||||
float decodePressure(float voltage, air_pressure_sensor_config_s * mapConfig DECLARE_ENGINE_PARAMETER_S);
|
float decodePressure(float voltage, air_pressure_sensor_config_s * mapConfig DECLARE_ENGINE_PARAMETER_SUFFIX);
|
||||||
float validateMap(float mapKPa DECLARE_ENGINE_PARAMETER_S);
|
float validateMap(float mapKPa DECLARE_ENGINE_PARAMETER_SUFFIX);
|
||||||
|
|
||||||
#define INHG2KPA(inhg) ((inhg * 3.386375))
|
#define INHG2KPA(inhg) ((inhg * 3.386375))
|
||||||
#define KPA2INHG(kpa) ((kpa) / 3.386375)
|
#define KPA2INHG(kpa) ((kpa) / 3.386375)
|
||||||
|
|
|
@ -97,15 +97,15 @@ bool isValidIntakeAirTemperature(float temperature) {
|
||||||
return !cisnan(temperature) && temperature > -50 && temperature < 100;
|
return !cisnan(temperature) && temperature > -50 && temperature < 100;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool hasCltSensor(DECLARE_ENGINE_PARAMETER_F) {
|
bool hasCltSensor(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
|
||||||
return engineConfiguration->clt.adcChannel != EFI_ADC_NONE;
|
return engineConfiguration->clt.adcChannel != EFI_ADC_NONE;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return coolant temperature, in Celsius
|
* @return coolant temperature, in Celsius
|
||||||
*/
|
*/
|
||||||
float getCoolantTemperature(DECLARE_ENGINE_PARAMETER_F) {
|
float getCoolantTemperature(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
|
||||||
if (!hasCltSensor(PASS_ENGINE_PARAMETER_F)) {
|
if (!hasCltSensor(PASS_ENGINE_PARAMETER_SIGNATURE)) {
|
||||||
engine->isCltBroken = false;
|
engine->isCltBroken = false;
|
||||||
return NO_CLT_SENSOR_TEMPERATURE;
|
return NO_CLT_SENSOR_TEMPERATURE;
|
||||||
}
|
}
|
||||||
|
@ -178,15 +178,15 @@ void ThermistorMath::prepareThermistorCurve(thermistor_conf_s *tc) {
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
bool hasIatSensor(DECLARE_ENGINE_PARAMETER_F) {
|
bool hasIatSensor(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
|
||||||
return engineConfiguration->iat.adcChannel != EFI_ADC_NONE;
|
return engineConfiguration->iat.adcChannel != EFI_ADC_NONE;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return Celsius value
|
* @return Celsius value
|
||||||
*/
|
*/
|
||||||
float getIntakeAirTemperature(DECLARE_ENGINE_PARAMETER_F) {
|
float getIntakeAirTemperature(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
|
||||||
if (!hasIatSensor(PASS_ENGINE_PARAMETER_F)) {
|
if (!hasIatSensor(PASS_ENGINE_PARAMETER_SIGNATURE)) {
|
||||||
return NO_IAT_SENSOR_TEMPERATURE;
|
return NO_IAT_SENSOR_TEMPERATURE;
|
||||||
}
|
}
|
||||||
float temperature = getTemperatureC(&engineConfiguration->iat, &engine->engineState.iatCurve);
|
float temperature = getTemperatureC(&engineConfiguration->iat, &engine->engineState.iatCurve);
|
||||||
|
@ -228,7 +228,7 @@ static void testCltByR(float resistance) {
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
void initThermistors(Logging *sharedLogger DECLARE_ENGINE_PARAMETER_S) {
|
void initThermistors(Logging *sharedLogger DECLARE_ENGINE_PARAMETER_SUFFIX) {
|
||||||
logger = sharedLogger;
|
logger = sharedLogger;
|
||||||
efiAssertVoid(engine!=NULL, "e NULL initThermistors");
|
efiAssertVoid(engine!=NULL, "e NULL initThermistors");
|
||||||
|
|
||||||
|
|
|
@ -33,19 +33,19 @@ float convertFtoCelcius(float tempF);
|
||||||
float getKelvinTemperature(float resistance, ThermistorMath *tm);
|
float getKelvinTemperature(float resistance, ThermistorMath *tm);
|
||||||
float getResistance(ThermistorConf *config, float voltage);
|
float getResistance(ThermistorConf *config, float voltage);
|
||||||
float getTemperatureC(ThermistorConf *config, ThermistorMath *tm);
|
float getTemperatureC(ThermistorConf *config, ThermistorMath *tm);
|
||||||
float getCoolantTemperature(DECLARE_ENGINE_PARAMETER_F);
|
float getCoolantTemperature(DECLARE_ENGINE_PARAMETER_SIGNATURE);
|
||||||
bool isValidCoolantTemperature(float temperature);
|
bool isValidCoolantTemperature(float temperature);
|
||||||
float getIntakeAirTemperature(DECLARE_ENGINE_PARAMETER_F);
|
float getIntakeAirTemperature(DECLARE_ENGINE_PARAMETER_SIGNATURE);
|
||||||
bool isValidIntakeAirTemperature(float temperature);
|
bool isValidIntakeAirTemperature(float temperature);
|
||||||
bool hasIatSensor(DECLARE_ENGINE_PARAMETER_F);
|
bool hasIatSensor(DECLARE_ENGINE_PARAMETER_SIGNATURE);
|
||||||
bool hasCltSensor(DECLARE_ENGINE_PARAMETER_F);
|
bool hasCltSensor(DECLARE_ENGINE_PARAMETER_SIGNATURE);
|
||||||
|
|
||||||
void setThermistorConfiguration(ThermistorConf * tc, float temp1, float r1, float temp2, float r2, float temp3,
|
void setThermistorConfiguration(ThermistorConf * tc, float temp1, float r1, float temp2, float r2, float temp3,
|
||||||
float r3);
|
float r3);
|
||||||
|
|
||||||
class Engine;
|
class Engine;
|
||||||
|
|
||||||
void initThermistors(Logging *sharedLogger DECLARE_ENGINE_PARAMETER_S);
|
void initThermistors(Logging *sharedLogger DECLARE_ENGINE_PARAMETER_SUFFIX);
|
||||||
|
|
||||||
void setCommonNTCSensor(ThermistorConf *thermistorConf);
|
void setCommonNTCSensor(ThermistorConf *thermistorConf);
|
||||||
void setDodgeSensor(ThermistorConf *thermistorConf);
|
void setDodgeSensor(ThermistorConf *thermistorConf);
|
||||||
|
|
|
@ -16,19 +16,19 @@
|
||||||
// we have 12 bit precision and TS uses 10 bit precision
|
// we have 12 bit precision and TS uses 10 bit precision
|
||||||
#define TPS_TS_CONVERSION 4
|
#define TPS_TS_CONVERSION 4
|
||||||
|
|
||||||
bool hasPedalPositionSensor(DECLARE_ENGINE_PARAMETER_F);
|
bool hasPedalPositionSensor(DECLARE_ENGINE_PARAMETER_SIGNATURE);
|
||||||
percent_t getPedalPosition(DECLARE_ENGINE_PARAMETER_F);
|
percent_t getPedalPosition(DECLARE_ENGINE_PARAMETER_SIGNATURE);
|
||||||
/**
|
/**
|
||||||
* Throttle Position Sensor
|
* Throttle Position Sensor
|
||||||
* In case of dual TPS this function would return logical TPS position
|
* In case of dual TPS this function would return logical TPS position
|
||||||
* @return Current TPS position, percent of WOT. 0 means idle and 100 means Wide Open Throttle
|
* @return Current TPS position, percent of WOT. 0 means idle and 100 means Wide Open Throttle
|
||||||
*/
|
*/
|
||||||
percent_t getTPS(DECLARE_ENGINE_PARAMETER_F);
|
percent_t getTPS(DECLARE_ENGINE_PARAMETER_SIGNATURE);
|
||||||
bool hasTpsSensor(DECLARE_ENGINE_PARAMETER_F);
|
bool hasTpsSensor(DECLARE_ENGINE_PARAMETER_SIGNATURE);
|
||||||
int convertVoltageTo10bitADC(float voltage);
|
int convertVoltageTo10bitADC(float voltage);
|
||||||
int getTPS12bitAdc(DECLARE_ENGINE_PARAMETER_F);
|
int getTPS12bitAdc(DECLARE_ENGINE_PARAMETER_SIGNATURE);
|
||||||
float getTPSVoltage(DECLARE_ENGINE_PARAMETER_F);
|
float getTPSVoltage(DECLARE_ENGINE_PARAMETER_SIGNATURE);
|
||||||
percent_t getTpsValue(int adc DECLARE_ENGINE_PARAMETER_S);
|
percent_t getTpsValue(int adc DECLARE_ENGINE_PARAMETER_SUFFIX);
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
efitimeus_t prevTime;
|
efitimeus_t prevTime;
|
||||||
|
|
|
@ -14,15 +14,15 @@
|
||||||
|
|
||||||
EXTERN_ENGINE;
|
EXTERN_ENGINE;
|
||||||
|
|
||||||
float getVRef(DECLARE_ENGINE_PARAMETER_F) {
|
float getVRef(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
|
||||||
// not currently used return getVoltageDivided("vref", engineConfiguration->vRefAdcChannel);
|
// not currently used return getVoltageDivided("vref", engineConfiguration->vRefAdcChannel);
|
||||||
return NAN;
|
return NAN;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool hasVBatt(DECLARE_ENGINE_PARAMETER_F) {
|
bool hasVBatt(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
|
||||||
return engineConfiguration->vbattAdcChannel != EFI_ADC_NONE;
|
return engineConfiguration->vbattAdcChannel != EFI_ADC_NONE;
|
||||||
}
|
}
|
||||||
|
|
||||||
float getVBatt(DECLARE_ENGINE_PARAMETER_F) {
|
float getVBatt(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
|
||||||
return getVoltage("vbatt", engineConfiguration->vbattAdcChannel) * engineConfiguration->vbattDividerCoeff;
|
return getVoltage("vbatt", engineConfiguration->vbattAdcChannel) * engineConfiguration->vbattDividerCoeff;
|
||||||
}
|
}
|
||||||
|
|
|
@ -13,8 +13,8 @@
|
||||||
#include "main.h"
|
#include "main.h"
|
||||||
#include "engine_configuration.h"
|
#include "engine_configuration.h"
|
||||||
|
|
||||||
float getVRef(DECLARE_ENGINE_PARAMETER_F);
|
float getVRef(DECLARE_ENGINE_PARAMETER_SIGNATURE);
|
||||||
float getVBatt(DECLARE_ENGINE_PARAMETER_F);
|
float getVBatt(DECLARE_ENGINE_PARAMETER_SIGNATURE);
|
||||||
bool hasVBatt(DECLARE_ENGINE_PARAMETER_F);
|
bool hasVBatt(DECLARE_ENGINE_PARAMETER_SIGNATURE);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -22,7 +22,7 @@ static void turnTachPinLow(void) {
|
||||||
}
|
}
|
||||||
|
|
||||||
static void tachSignalCallback(trigger_event_e ckpSignalType,
|
static void tachSignalCallback(trigger_event_e ckpSignalType,
|
||||||
uint32_t index DECLARE_ENGINE_PARAMETER_S) {
|
uint32_t index DECLARE_ENGINE_PARAMETER_SUFFIX) {
|
||||||
if (index != engineConfiguration->tachPulseTriggerIndex) {
|
if (index != engineConfiguration->tachPulseTriggerIndex) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
@ -9,6 +9,6 @@
|
||||||
|
|
||||||
#include "engine.h"
|
#include "engine.h"
|
||||||
|
|
||||||
void configureMiniCooperTriggerShape(TriggerShape *s DECLARE_ENGINE_PARAMETER_S);
|
void configureMiniCooperTriggerShape(TriggerShape *s DECLARE_ENGINE_PARAMETER_SUFFIX);
|
||||||
|
|
||||||
#endif /* TRIGGER_BMW_H_ */
|
#endif /* TRIGGER_BMW_H_ */
|
||||||
|
|
|
@ -13,13 +13,13 @@
|
||||||
#define CHRYSLER_NGC4_GAP 1
|
#define CHRYSLER_NGC4_GAP 1
|
||||||
#define CHRYSLER_NGC6_GAP 1.5
|
#define CHRYSLER_NGC6_GAP 1.5
|
||||||
|
|
||||||
void configureNeon1995TriggerShape(TriggerShape *s DECLARE_ENGINE_PARAMETER_S);
|
void configureNeon1995TriggerShape(TriggerShape *s DECLARE_ENGINE_PARAMETER_SUFFIX);
|
||||||
void configureNeon2003TriggerShapeCam(TriggerShape *s DECLARE_ENGINE_PARAMETER_S);
|
void configureNeon2003TriggerShapeCam(TriggerShape *s DECLARE_ENGINE_PARAMETER_SUFFIX);
|
||||||
void configureNeon2003TriggerShapeCrank(TriggerShape *s DECLARE_ENGINE_PARAMETER_S);
|
void configureNeon2003TriggerShapeCrank(TriggerShape *s DECLARE_ENGINE_PARAMETER_SUFFIX);
|
||||||
void initDodgeRam(TriggerShape *s DECLARE_ENGINE_PARAMETER_S);
|
void initDodgeRam(TriggerShape *s DECLARE_ENGINE_PARAMETER_SUFFIX);
|
||||||
|
|
||||||
void configureDodgeStratusTriggerShape(TriggerShape *s DECLARE_ENGINE_PARAMETER_S);
|
void configureDodgeStratusTriggerShape(TriggerShape *s DECLARE_ENGINE_PARAMETER_SUFFIX);
|
||||||
|
|
||||||
void initJeep18_2_2_2(TriggerShape *s DECLARE_ENGINE_PARAMETER_S);
|
void initJeep18_2_2_2(TriggerShape *s DECLARE_ENGINE_PARAMETER_SUFFIX);
|
||||||
|
|
||||||
#endif /* TRIGGER_CHRYSLER_H_ */
|
#endif /* TRIGGER_CHRYSLER_H_ */
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
|
|
||||||
#include "trigger_structure.h"
|
#include "trigger_structure.h"
|
||||||
|
|
||||||
void configureGmTriggerShape(TriggerShape *s DECLARE_ENGINE_PARAMETER_S);
|
void configureGmTriggerShape(TriggerShape *s DECLARE_ENGINE_PARAMETER_SUFFIX);
|
||||||
void initGmLS24(TriggerShape *s DECLARE_ENGINE_PARAMETER_S);
|
void initGmLS24(TriggerShape *s DECLARE_ENGINE_PARAMETER_SUFFIX);
|
||||||
|
|
||||||
#endif /* TRIGGER_GM_H_ */
|
#endif /* TRIGGER_GM_H_ */
|
||||||
|
|
|
@ -10,17 +10,17 @@
|
||||||
|
|
||||||
#include "trigger_structure.h"
|
#include "trigger_structure.h"
|
||||||
|
|
||||||
void configureHondaAccordCDDip(TriggerShape *s DECLARE_ENGINE_PARAMETER_S);
|
void configureHondaAccordCDDip(TriggerShape *s DECLARE_ENGINE_PARAMETER_SUFFIX);
|
||||||
void configureHondaAccordShifted(TriggerShape *s DECLARE_ENGINE_PARAMETER_S);
|
void configureHondaAccordShifted(TriggerShape *s DECLARE_ENGINE_PARAMETER_SUFFIX);
|
||||||
|
|
||||||
void configureHonda_1_4_24(TriggerShape *s, bool withOneEventSignal, bool withFourEventSignal,
|
void configureHonda_1_4_24(TriggerShape *s, bool withOneEventSignal, bool withFourEventSignal,
|
||||||
trigger_wheel_e const oneEventWave,
|
trigger_wheel_e const oneEventWave,
|
||||||
trigger_wheel_e const fourEventWave,
|
trigger_wheel_e const fourEventWave,
|
||||||
float d DECLARE_ENGINE_PARAMETER_S);
|
float d DECLARE_ENGINE_PARAMETER_SUFFIX);
|
||||||
|
|
||||||
void configureOnePlus16(TriggerShape *s, operation_mode_e operationMode DECLARE_ENGINE_PARAMETER_S);
|
void configureOnePlus16(TriggerShape *s, operation_mode_e operationMode DECLARE_ENGINE_PARAMETER_SUFFIX);
|
||||||
|
|
||||||
void configureHondaCbr600(TriggerShape *s DECLARE_ENGINE_PARAMETER_S);
|
void configureHondaCbr600(TriggerShape *s DECLARE_ENGINE_PARAMETER_SUFFIX);
|
||||||
void configureHondaCbr600custom(TriggerShape *s DECLARE_ENGINE_PARAMETER_S);
|
void configureHondaCbr600custom(TriggerShape *s DECLARE_ENGINE_PARAMETER_SUFFIX);
|
||||||
|
|
||||||
#endif /* CONTROLLERS_TRIGGER_TRIGGER_HONDA_H_ */
|
#endif /* CONTROLLERS_TRIGGER_TRIGGER_HONDA_H_ */
|
||||||
|
|
|
@ -13,11 +13,11 @@
|
||||||
|
|
||||||
#define MIATA_NA_GAP 1.4930f
|
#define MIATA_NA_GAP 1.4930f
|
||||||
|
|
||||||
void initializeMazdaMiataNaShape(TriggerShape *s DECLARE_ENGINE_PARAMETER_S);
|
void initializeMazdaMiataNaShape(TriggerShape *s DECLARE_ENGINE_PARAMETER_SUFFIX);
|
||||||
void initializeMazdaMiataNb1Shape(TriggerShape *s DECLARE_ENGINE_PARAMETER_S);
|
void initializeMazdaMiataNb1Shape(TriggerShape *s DECLARE_ENGINE_PARAMETER_SUFFIX);
|
||||||
void initializeMazdaMiataNb2Crank(TriggerShape *s DECLARE_ENGINE_PARAMETER_S);
|
void initializeMazdaMiataNb2Crank(TriggerShape *s DECLARE_ENGINE_PARAMETER_SUFFIX);
|
||||||
void initializeMazdaMiataVVtTestShape(TriggerShape *s DECLARE_ENGINE_PARAMETER_S);
|
void initializeMazdaMiataVVtTestShape(TriggerShape *s DECLARE_ENGINE_PARAMETER_SUFFIX);
|
||||||
void configureMazdaProtegeSOHC(TriggerShape *s DECLARE_ENGINE_PARAMETER_S);
|
void configureMazdaProtegeSOHC(TriggerShape *s DECLARE_ENGINE_PARAMETER_SUFFIX);
|
||||||
void configureMazdaProtegeLx(TriggerShape *s DECLARE_ENGINE_PARAMETER_S);
|
void configureMazdaProtegeLx(TriggerShape *s DECLARE_ENGINE_PARAMETER_SUFFIX);
|
||||||
|
|
||||||
#endif /* TRIGGER_MAZDA_H_ */
|
#endif /* TRIGGER_MAZDA_H_ */
|
||||||
|
|
|
@ -9,7 +9,7 @@
|
||||||
|
|
||||||
#include "trigger_structure.h"
|
#include "trigger_structure.h"
|
||||||
|
|
||||||
void initializeMitsubishi4g18(TriggerShape *s DECLARE_ENGINE_PARAMETER_S);
|
void initializeMitsubishi4g18(TriggerShape *s DECLARE_ENGINE_PARAMETER_SUFFIX);
|
||||||
void configureFordAspireTriggerShape(TriggerShape * s DECLARE_ENGINE_PARAMETER_S);
|
void configureFordAspireTriggerShape(TriggerShape * s DECLARE_ENGINE_PARAMETER_SUFFIX);
|
||||||
|
|
||||||
#endif /* TRIGGER_MITSUBISHI_H_ */
|
#endif /* TRIGGER_MITSUBISHI_H_ */
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
|
|
||||||
#include "trigger_structure.h"
|
#include "trigger_structure.h"
|
||||||
|
|
||||||
void initializeNissanSR20VE_4(TriggerShape *s DECLARE_ENGINE_PARAMETER_S);
|
void initializeNissanSR20VE_4(TriggerShape *s DECLARE_ENGINE_PARAMETER_SUFFIX);
|
||||||
void initializeNissanSR20VE_4_360(TriggerShape *s DECLARE_ENGINE_PARAMETER_S);
|
void initializeNissanSR20VE_4_360(TriggerShape *s DECLARE_ENGINE_PARAMETER_SUFFIX);
|
||||||
|
|
||||||
#endif /* CONTROLLERS_TRIGGER_TRIGGER_NISSAN_H_ */
|
#endif /* CONTROLLERS_TRIGGER_TRIGGER_NISSAN_H_ */
|
||||||
|
|
|
@ -11,6 +11,6 @@
|
||||||
|
|
||||||
#include "trigger_structure.h"
|
#include "trigger_structure.h"
|
||||||
|
|
||||||
void initializeRoverK(TriggerShape *s DECLARE_ENGINE_PARAMETER_S);
|
void initializeRoverK(TriggerShape *s DECLARE_ENGINE_PARAMETER_SUFFIX);
|
||||||
|
|
||||||
#endif /* CONTROLLERS_TRIGGER_TRIGGER_ROVER_H_ */
|
#endif /* CONTROLLERS_TRIGGER_TRIGGER_ROVER_H_ */
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
|
|
||||||
#include "engine.h"
|
#include "engine.h"
|
||||||
|
|
||||||
void initialize36_2_2_2(TriggerShape *s DECLARE_ENGINE_PARAMETER_S);
|
void initialize36_2_2_2(TriggerShape *s DECLARE_ENGINE_PARAMETER_SUFFIX);
|
||||||
void initializeSubaru7_6(TriggerShape *s DECLARE_ENGINE_PARAMETER_S);
|
void initializeSubaru7_6(TriggerShape *s DECLARE_ENGINE_PARAMETER_SUFFIX);
|
||||||
|
|
||||||
#endif /* CONTROLLERS_TRIGGER_TRIGGER_SUBARU_H_ */
|
#endif /* CONTROLLERS_TRIGGER_TRIGGER_SUBARU_H_ */
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
|
|
||||||
#include "engine.h"
|
#include "engine.h"
|
||||||
|
|
||||||
void initialize2jzGE1_12(TriggerShape *s DECLARE_ENGINE_PARAMETER_S);
|
void initialize2jzGE1_12(TriggerShape *s DECLARE_ENGINE_PARAMETER_SUFFIX);
|
||||||
void initialize2jzGE3_34(TriggerShape *s DECLARE_ENGINE_PARAMETER_S);
|
void initialize2jzGE3_34(TriggerShape *s DECLARE_ENGINE_PARAMETER_SUFFIX);
|
||||||
|
|
||||||
#endif /* CONTROLLERS_TRIGGER_TRIGGER_TOYOTA_H_ */
|
#endif /* CONTROLLERS_TRIGGER_TRIGGER_TOYOTA_H_ */
|
||||||
|
|
|
@ -19,14 +19,14 @@
|
||||||
void addSkippedToothTriggerEvents(trigger_wheel_e wheel, TriggerShape *s,
|
void addSkippedToothTriggerEvents(trigger_wheel_e wheel, TriggerShape *s,
|
||||||
int totalTeethCount, int skippedCount,
|
int totalTeethCount, int skippedCount,
|
||||||
float toothWidth,
|
float toothWidth,
|
||||||
float offset, float engineCycle, float filterLeft, float filterRight DECLARE_ENGINE_PARAMETER_S);
|
float offset, float engineCycle, float filterLeft, float filterRight DECLARE_ENGINE_PARAMETER_SUFFIX);
|
||||||
|
|
||||||
|
|
||||||
void initializeSkippedToothTriggerShapeExt(TriggerShape *s, int totalTeethCount, int skippedCount, operation_mode_e operationMode DECLARE_ENGINE_PARAMETER_S);;
|
void initializeSkippedToothTriggerShapeExt(TriggerShape *s, int totalTeethCount, int skippedCount, operation_mode_e operationMode DECLARE_ENGINE_PARAMETER_SUFFIX);;
|
||||||
|
|
||||||
void configureOnePlus60_2(TriggerShape *s, operation_mode_e operationMode DECLARE_ENGINE_PARAMETER_S);
|
void configureOnePlus60_2(TriggerShape *s, operation_mode_e operationMode DECLARE_ENGINE_PARAMETER_SUFFIX);
|
||||||
|
|
||||||
void configure3_1_cam(TriggerShape *s, operation_mode_e operationMode DECLARE_ENGINE_PARAMETER_S);
|
void configure3_1_cam(TriggerShape *s, operation_mode_e operationMode DECLARE_ENGINE_PARAMETER_SUFFIX);
|
||||||
|
|
||||||
void configureOnePlusOne(TriggerShape *s, operation_mode_e operationMode DECLARE_ENGINE_PARAMETER_S);
|
void configureOnePlusOne(TriggerShape *s, operation_mode_e operationMode DECLARE_ENGINE_PARAMETER_SUFFIX);
|
||||||
#endif /* CONTROLLERS_TRIGGER_DECODERS_TRIGGER_UNIVERSAL_H_ */
|
#endif /* CONTROLLERS_TRIGGER_DECODERS_TRIGGER_UNIVERSAL_H_ */
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
#include "engine.h"
|
#include "engine.h"
|
||||||
|
|
||||||
void initMainEventListener(Logging *sharedLogger, Engine *engine);
|
void initMainEventListener(Logging *sharedLogger, Engine *engine);
|
||||||
void mainTriggerCallback(trigger_event_e ckpSignalType, uint32_t eventIndex DECLARE_ENGINE_PARAMETER_S);
|
void mainTriggerCallback(trigger_event_e ckpSignalType, uint32_t eventIndex DECLARE_ENGINE_PARAMETER_SUFFIX);
|
||||||
|
|
||||||
int isIgnitionTimingError(void);
|
int isIgnitionTimingError(void);
|
||||||
|
|
||||||
|
|
|
@ -42,14 +42,14 @@ public:
|
||||||
/**
|
/**
|
||||||
* Please note that this is a relatively heavy method due to getTimeNowNt() usage
|
* Please note that this is a relatively heavy method due to getTimeNowNt() usage
|
||||||
*/
|
*/
|
||||||
bool isRunning(DECLARE_ENGINE_PARAMETER_F);
|
bool isRunning(DECLARE_ENGINE_PARAMETER_SIGNATURE);
|
||||||
int getRpm(DECLARE_ENGINE_PARAMETER_F);
|
int getRpm(DECLARE_ENGINE_PARAMETER_SIGNATURE);
|
||||||
/**
|
/**
|
||||||
* This method is invoked once per engine cycle right after we calculate new RPM value
|
* This method is invoked once per engine cycle right after we calculate new RPM value
|
||||||
*/
|
*/
|
||||||
void onNewEngineCycle();
|
void onNewEngineCycle();
|
||||||
uint32_t getRevolutionCounter(void);
|
uint32_t getRevolutionCounter(void);
|
||||||
void setRpmValue(int value DECLARE_ENGINE_PARAMETER_S);
|
void setRpmValue(int value DECLARE_ENGINE_PARAMETER_SUFFIX);
|
||||||
uint32_t getRevolutionCounterSinceStart(void);
|
uint32_t getRevolutionCounterSinceStart(void);
|
||||||
float getRpmAcceleration();
|
float getRpmAcceleration();
|
||||||
/**
|
/**
|
||||||
|
@ -79,16 +79,16 @@ private:
|
||||||
/**
|
/**
|
||||||
* @brief Current RPM
|
* @brief Current RPM
|
||||||
*/
|
*/
|
||||||
#define getRpmE(engine) (engine)->rpmCalculator.getRpm(PASS_ENGINE_PARAMETER_F)
|
#define getRpmE(engine) (engine)->rpmCalculator.getRpm(PASS_ENGINE_PARAMETER_SIGNATURE)
|
||||||
|
|
||||||
bool isCrankingE(Engine *engine);
|
bool isCrankingE(Engine *engine);
|
||||||
void rpmShaftPositionCallback(trigger_event_e ckpSignalType, uint32_t index DECLARE_ENGINE_PARAMETER_S);
|
void rpmShaftPositionCallback(trigger_event_e ckpSignalType, uint32_t index DECLARE_ENGINE_PARAMETER_SUFFIX);
|
||||||
/**
|
/**
|
||||||
* @brief Initialize RPM calculator
|
* @brief Initialize RPM calculator
|
||||||
*/
|
*/
|
||||||
void initRpmCalculator(Logging *sharedLogger, Engine *engine);
|
void initRpmCalculator(Logging *sharedLogger, Engine *engine);
|
||||||
|
|
||||||
float getCrankshaftAngleNt(efitime_t timeNt DECLARE_ENGINE_PARAMETER_S);
|
float getCrankshaftAngleNt(efitime_t timeNt DECLARE_ENGINE_PARAMETER_SUFFIX);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -11,11 +11,11 @@
|
||||||
#include "engine.h"
|
#include "engine.h"
|
||||||
|
|
||||||
int isInjectionEnabled(engine_configuration_s *engineConfiguration);
|
int isInjectionEnabled(engine_configuration_s *engineConfiguration);
|
||||||
void handleSpark(bool limitedSpark, uint32_t trgEventIndex, int rpm DECLARE_ENGINE_PARAMETER_S);
|
void handleSpark(bool limitedSpark, uint32_t trgEventIndex, int rpm DECLARE_ENGINE_PARAMETER_SUFFIX);
|
||||||
void initSparkLogic(Logging *sharedLogger);
|
void initSparkLogic(Logging *sharedLogger);
|
||||||
void turnSparkPinHigh(IgnitionEvent *event);
|
void turnSparkPinHigh(IgnitionEvent *event);
|
||||||
void turnSparkPinLow(IgnitionEvent *event);
|
void turnSparkPinLow(IgnitionEvent *event);
|
||||||
int getNumberOfSparks(ignition_mode_e mode DECLARE_ENGINE_PARAMETER_S);
|
int getNumberOfSparks(ignition_mode_e mode DECLARE_ENGINE_PARAMETER_SUFFIX);
|
||||||
percent_t getCoilDutyCycle(int rpm DECLARE_ENGINE_PARAMETER_S);
|
percent_t getCoilDutyCycle(int rpm DECLARE_ENGINE_PARAMETER_SUFFIX);
|
||||||
|
|
||||||
#endif /* CONTROLLERS_TRIGGER_SPARK_LOGIC_H_ */
|
#endif /* CONTROLLERS_TRIGGER_SPARK_LOGIC_H_ */
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
#include "trigger_decoder.h"
|
#include "trigger_decoder.h"
|
||||||
|
|
||||||
class Engine;
|
class Engine;
|
||||||
typedef void (*ShaftPositionListener)(trigger_event_e signal, uint32_t index DECLARE_ENGINE_PARAMETER_S);
|
typedef void (*ShaftPositionListener)(trigger_event_e signal, uint32_t index DECLARE_ENGINE_PARAMETER_SUFFIX);
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
class Engine;
|
class Engine;
|
||||||
|
@ -25,7 +25,7 @@ class TriggerCentral {
|
||||||
public:
|
public:
|
||||||
TriggerCentral();
|
TriggerCentral();
|
||||||
void addEventListener(ShaftPositionListener handler, const char *name, Engine *engine);
|
void addEventListener(ShaftPositionListener handler, const char *name, Engine *engine);
|
||||||
void handleShaftSignal(trigger_event_e signal DECLARE_ENGINE_PARAMETER_S);
|
void handleShaftSignal(trigger_event_e signal DECLARE_ENGINE_PARAMETER_SUFFIX);
|
||||||
int getHwEventCounter(int index);
|
int getHwEventCounter(int index);
|
||||||
void resetCounters();
|
void resetCounters();
|
||||||
TriggerState triggerState;
|
TriggerState triggerState;
|
||||||
|
@ -46,8 +46,8 @@ private:
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
void triggerInfo(void);
|
void triggerInfo(void);
|
||||||
efitime_t getCrankEventCounter(DECLARE_ENGINE_PARAMETER_F);
|
efitime_t getCrankEventCounter(DECLARE_ENGINE_PARAMETER_SIGNATURE);
|
||||||
efitime_t getStartOfRevolutionIndex(DECLARE_ENGINE_PARAMETER_F);
|
efitime_t getStartOfRevolutionIndex(DECLARE_ENGINE_PARAMETER_SIGNATURE);
|
||||||
void hwHandleShaftSignal(trigger_event_e signal);
|
void hwHandleShaftSignal(trigger_event_e signal);
|
||||||
void hwHandleVvtCamSignal(trigger_value_e front);
|
void hwHandleVvtCamSignal(trigger_value_e front);
|
||||||
float getTriggerDutyCycle(int index);
|
float getTriggerDutyCycle(int index);
|
||||||
|
|
|
@ -53,9 +53,9 @@ public:
|
||||||
void intTotalEventCounter();
|
void intTotalEventCounter();
|
||||||
efitime_t getTotalEventCounter();
|
efitime_t getTotalEventCounter();
|
||||||
efitime_t getStartOfRevolutionIndex();
|
efitime_t getStartOfRevolutionIndex();
|
||||||
void decodeTriggerEvent(trigger_event_e const signal, efitime_t nowUs DECLARE_ENGINE_PARAMETER_S);
|
void decodeTriggerEvent(trigger_event_e const signal, efitime_t nowUs DECLARE_ENGINE_PARAMETER_SUFFIX);
|
||||||
|
|
||||||
bool isValidIndex(DECLARE_ENGINE_PARAMETER_F);
|
bool isValidIndex(DECLARE_ENGINE_PARAMETER_SIGNATURE);
|
||||||
float getTriggerDutyCycle(int index);
|
float getTriggerDutyCycle(int index);
|
||||||
TriggerStateCallback cycleCallback;
|
TriggerStateCallback cycleCallback;
|
||||||
|
|
||||||
|
@ -116,7 +116,7 @@ private:
|
||||||
};
|
};
|
||||||
|
|
||||||
angle_t getEngineCycle(operation_mode_e operationMode);
|
angle_t getEngineCycle(operation_mode_e operationMode);
|
||||||
uint32_t findTriggerZeroEventIndex(TriggerState *state, TriggerShape * shape, trigger_config_s const*triggerConfig DECLARE_ENGINE_PARAMETER_S);
|
uint32_t findTriggerZeroEventIndex(TriggerState *state, TriggerShape * shape, trigger_config_s const*triggerConfig DECLARE_ENGINE_PARAMETER_SUFFIX);
|
||||||
|
|
||||||
class Engine;
|
class Engine;
|
||||||
|
|
||||||
|
|
|
@ -16,12 +16,12 @@ public:
|
||||||
TriggerStimulatorHelper();
|
TriggerStimulatorHelper();
|
||||||
|
|
||||||
uint32_t doFindTrigger(TriggerShape * shape,
|
uint32_t doFindTrigger(TriggerShape * shape,
|
||||||
trigger_config_s const*triggerConfig, TriggerState *state DECLARE_ENGINE_PARAMETER_S);
|
trigger_config_s const*triggerConfig, TriggerState *state DECLARE_ENGINE_PARAMETER_SUFFIX);
|
||||||
|
|
||||||
void nextStep(TriggerState *state, TriggerShape * shape, int i, trigger_config_s const*triggerConfig DECLARE_ENGINE_PARAMETER_S);
|
void nextStep(TriggerState *state, TriggerShape * shape, int i, trigger_config_s const*triggerConfig DECLARE_ENGINE_PARAMETER_SUFFIX);
|
||||||
|
|
||||||
void assertSyncPositionAndSetDutyCycle(const uint32_t index, TriggerState *state, TriggerShape * shape,
|
void assertSyncPositionAndSetDutyCycle(const uint32_t index, TriggerState *state, TriggerShape * shape,
|
||||||
trigger_config_s const*triggerConfig DECLARE_ENGINE_PARAMETER_S);
|
trigger_config_s const*triggerConfig DECLARE_ENGINE_PARAMETER_SUFFIX);
|
||||||
};
|
};
|
||||||
|
|
||||||
bool isUsefulSignal(trigger_event_e signal, engine_configuration_s *engineConfiguration);
|
bool isUsefulSignal(trigger_event_e signal, engine_configuration_s *engineConfiguration);
|
||||||
|
|
|
@ -51,9 +51,9 @@ class TriggerState;
|
||||||
class TriggerShape {
|
class TriggerShape {
|
||||||
public:
|
public:
|
||||||
TriggerShape();
|
TriggerShape();
|
||||||
void initializeTriggerShape(Logging *logger DECLARE_ENGINE_PARAMETER_S);
|
void initializeTriggerShape(Logging *logger DECLARE_ENGINE_PARAMETER_SUFFIX);
|
||||||
void findTriggerPosition(
|
void findTriggerPosition(
|
||||||
event_trigger_position_s *position, angle_t angleOffset DECLARE_ENGINE_PARAMETER_S);
|
event_trigger_position_s *position, angle_t angleOffset DECLARE_ENGINE_PARAMETER_SUFFIX);
|
||||||
|
|
||||||
bool isSynchronizationNeeded;
|
bool isSynchronizationNeeded;
|
||||||
bool needSecondTriggerInput;
|
bool needSecondTriggerInput;
|
||||||
|
@ -151,9 +151,9 @@ public:
|
||||||
*/
|
*/
|
||||||
int size;
|
int size;
|
||||||
|
|
||||||
void addEvent2(angle_t angle, trigger_wheel_e const waveIndex, trigger_value_e const state DECLARE_ENGINE_PARAMETER_S);
|
void addEvent2(angle_t angle, trigger_wheel_e const waveIndex, trigger_value_e const state DECLARE_ENGINE_PARAMETER_SUFFIX);
|
||||||
|
|
||||||
void addEvent2(angle_t angle, trigger_wheel_e const waveIndex, trigger_value_e const stateParam, float filterLeft, float filterRight DECLARE_ENGINE_PARAMETER_S);
|
void addEvent2(angle_t angle, trigger_wheel_e const waveIndex, trigger_value_e const stateParam, float filterLeft, float filterRight DECLARE_ENGINE_PARAMETER_SUFFIX);
|
||||||
operation_mode_e getOperationMode();
|
operation_mode_e getOperationMode();
|
||||||
|
|
||||||
void initialize(operation_mode_e operationMode, bool needSecondTriggerInput);
|
void initialize(operation_mode_e operationMode, bool needSecondTriggerInput);
|
||||||
|
@ -170,11 +170,11 @@ public:
|
||||||
int getSize() const;
|
int getSize() const;
|
||||||
|
|
||||||
int getTriggerShapeSynchPointIndex();
|
int getTriggerShapeSynchPointIndex();
|
||||||
void prepareShape(DECLARE_ENGINE_PARAMETER_F);
|
void prepareShape(DECLARE_ENGINE_PARAMETER_SIGNATURE);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
trigger_shape_helper h;
|
trigger_shape_helper h;
|
||||||
int findAngleIndex(float target DECLARE_ENGINE_PARAMETER_S);
|
int findAngleIndex(float target DECLARE_ENGINE_PARAMETER_SUFFIX);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* index of synchronization event within TriggerShape
|
* index of synchronization event within TriggerShape
|
||||||
|
@ -207,11 +207,11 @@ private:
|
||||||
angle_t getAngle(int phaseIndex) const;
|
angle_t getAngle(int phaseIndex) const;
|
||||||
|
|
||||||
angle_t getCycleDuration() const;
|
angle_t getCycleDuration() const;
|
||||||
void calculateTriggerSynchPoint(TriggerState *state DECLARE_ENGINE_PARAMETER_S);
|
void calculateTriggerSynchPoint(TriggerState *state DECLARE_ENGINE_PARAMETER_SUFFIX);
|
||||||
};
|
};
|
||||||
|
|
||||||
void setVwConfiguration(TriggerShape *s DECLARE_ENGINE_PARAMETER_S);
|
void setVwConfiguration(TriggerShape *s DECLARE_ENGINE_PARAMETER_SUFFIX);
|
||||||
|
|
||||||
void setToothedWheelConfiguration(TriggerShape *s, int total, int skipped, operation_mode_e operationMode DECLARE_ENGINE_PARAMETER_S);
|
void setToothedWheelConfiguration(TriggerShape *s, int total, int skipped, operation_mode_e operationMode DECLARE_ENGINE_PARAMETER_SUFFIX);
|
||||||
|
|
||||||
#endif /* TRIGGER_STRUCTURE_H_ */
|
#endif /* TRIGGER_STRUCTURE_H_ */
|
||||||
|
|
|
@ -29,7 +29,7 @@ static OutputPin emulatorOutputs[3];
|
||||||
|
|
||||||
EXTERN_ENGINE;
|
EXTERN_ENGINE;
|
||||||
|
|
||||||
void initTriggerEmulator(Logging *sharedLogger DECLARE_ENGINE_PARAMETER_S) {
|
void initTriggerEmulator(Logging *sharedLogger DECLARE_ENGINE_PARAMETER_SUFFIX) {
|
||||||
|
|
||||||
|
|
||||||
#if EFI_EMULATE_POSITION_SENSORS || defined(__DOXYGEN__)
|
#if EFI_EMULATE_POSITION_SENSORS || defined(__DOXYGEN__)
|
||||||
|
|
|
@ -14,7 +14,7 @@
|
||||||
#include "trigger_structure.h"
|
#include "trigger_structure.h"
|
||||||
#include "engine.h"
|
#include "engine.h"
|
||||||
|
|
||||||
void initTriggerEmulator(Logging *sharedLogger DECLARE_ENGINE_PARAMETER_S);
|
void initTriggerEmulator(Logging *sharedLogger DECLARE_ENGINE_PARAMETER_SUFFIX);
|
||||||
void setTriggerEmulatorRPM(int value DECLARE_ENGINE_PARAMETER_S);
|
void setTriggerEmulatorRPM(int value DECLARE_ENGINE_PARAMETER_SUFFIX);
|
||||||
|
|
||||||
#endif /* DIST_EMULATOR_H_ */
|
#endif /* DIST_EMULATOR_H_ */
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue