auto-sync

This commit is contained in:
rusEfi 2017-01-06 10:04:41 -05:00
parent 3337b9a756
commit eade0c0367
42 changed files with 186 additions and 153 deletions

View File

@ -1,7 +1,7 @@
/**
* @file acura_rsx.cpp
*
* set_engine_type 27
* set engine_type 27
*
* @date Jan 16, 2015
* @author Andrey Belomutskiy, (c) 2012-2017

View File

@ -1,7 +1,7 @@
/**
* @file bmw_e34.cpp
*
* set_engine_type 25
* set engine_type 25
*
* Coil pairs: 1-6, 2-5, 3-4
*
@ -43,7 +43,7 @@ void setBmwE34(DECLARE_ENGINE_PARAMETER_F) {
// Trigger configuration
// engineConfiguration->trigger.type = TT_TOOTHED_WHEEL_60_2;
setOperationMode(engineConfiguration, FOUR_STROKE_CRANK_SENSOR);
// set_global_trigger_offset_angle 84
// set global_trigger_offset_angle 84
engineConfiguration->globalTriggerAngleOffset = 84;
engineConfiguration->trigger.type = TT_TOOTHED_WHEEL;

View File

@ -6,7 +6,7 @@
* 4 wire IAC
* 8 pin HEI module
*
* set_engine_type 37
* set engine_type 37
*
*
* @date Dec 20, 2015

View File

@ -2,7 +2,7 @@
* @file chevrolet_camaro_4.cpp
*
*
* set_engine_type 35
* set engine_type 35
*
* @date Oct 16, 2015
* @author Andrey Belomutskiy, (c) 2012-2017
@ -40,7 +40,7 @@ void setCamaro4(DECLARE_ENGINE_PARAMETER_F) {
engineConfiguration->tpsAdcChannel = EFI_ADC_2;
// todo: move this into trigger definition
// set_global_trigger_offset_angle 230
// set global_trigger_offset_angle 230
engineConfiguration->globalTriggerAngleOffset = 230;
engineConfiguration->iat.adcChannel = EFI_ADC_11;

View File

@ -2,7 +2,7 @@
* @file citroenBerlingoTU3JP.cpp
*
* CITROEN_TU3JP
* set_engine_type 15
* set engine_type 15
* Board pin out for Frankenstein
*
* This config overrides some values of the default configuration which is set by setDefaultConfiguration() method

View File

@ -2,7 +2,7 @@
* @file daihatsu.cpp
*
* Daihatsu 3-Cylinder KF-VE
* set_engine_type 34
* set engine_type 34
*
* @date Sep 10, 2015
* @author Andrey Belomutskiy, (c) 2012-2017

View File

@ -2,10 +2,10 @@
* @file dodge_neon.cpp
*
* DODGE_NEON_1995 = 2
* set_engine_type 2
* set engine_type 2
*
* DODGE_NEON_2003 = 23
* set_engine_type 23
* set engine_type 23
* http://rusefi.com/wiki/index.php?title=Vehicle:Dodge_Neon_2003
*
* This config overrides some values of the default configuration which is set by setDefaultConfiguration() method
@ -197,11 +197,11 @@ void setDodgeNeon1995EngineConfiguration(DECLARE_ENGINE_PARAMETER_F) {
// set_firing_order 2
engineConfiguration->specs.firingOrder = FO_1_3_4_2;
// set_global_trigger_offset_angle 497
// set global_trigger_offset_angle 497
engineConfiguration->globalTriggerAngleOffset = 497;
// set_ignition_offset 350
// set ignition_offset 350
engineConfiguration->ignitionOffset = 350;
// set_injection_offset 510
// set injection_offset 510
engineConfiguration->extraInjectionOffset = 510 + 497;
/**
@ -236,7 +236,7 @@ void setDodgeNeon1995EngineConfiguration(DECLARE_ENGINE_PARAMETER_F) {
engineConfiguration->mapErrorDetectionTooHigh = 120;
// set_injection_pin_mode 0
// set injection_pin_mode 0
boardConfiguration->injectionPinMode = OM_DEFAULT;
// Frankenstein: high side #1: PE8
@ -246,7 +246,7 @@ void setDodgeNeon1995EngineConfiguration(DECLARE_ENGINE_PARAMETER_F) {
boardConfiguration->ignitionPins[1] = GPIO_UNASSIGNED;
boardConfiguration->ignitionPins[2] = GPIOE_10; // // Frankenstein: high side #2
// set_ignition_pin_mode 0
// set ignition_pin_mode 0
boardConfiguration->ignitionPinMode = OM_DEFAULT;
setThermistorConfiguration(&engineConfiguration->clt, 0, 32500, 30, 7550, 100, 700);
@ -266,9 +266,9 @@ void setDodgeNeonNGCEngineConfiguration(DECLARE_ENGINE_PARAMETER_F) {
// engineConfiguration->warmupAfrPid.dFactor = -0.02;
engineConfiguration->debugMode = WARMUP_ENRICH;
// set_global_trigger_offset_angle 38
// set global_trigger_offset_angle 38
engineConfiguration->globalTriggerAngleOffset = 38;
// set_injection_offset 0
// set injection_offset 0
engineConfiguration->extraInjectionOffset = 0;
engineConfiguration->crankingInjectionMode = IM_SIMULTANEOUS;

View File

@ -1,7 +1,7 @@
/*
* @file dodge_ram.cpp
*
* set_engine_type 31
* set engine_type 31
*
* @date Apr 22, 2015
* @author Andrey Belomutskiy, (c) 2012-2017
@ -63,7 +63,7 @@ void setDodgeRam1996(DECLARE_ENGINE_PARAMETER_F) {
// set cranking_fuel 7
engineConfiguration->cranking.baseFuel = 7;
// set_global_trigger_offset_angle -50
// set global_trigger_offset_angle -50
engineConfiguration->globalTriggerAngleOffset = -50;
// set_global_fuel_correction 1

View File

@ -1,7 +1,7 @@
/**
* @file dodge_stratus.cpp
*
* set_engine_type 33
* set engine_type 33
*
* @date Sep 5, 2015
* @author Andrey Belomutskiy, (c) 2012-2017

View File

@ -7,7 +7,7 @@
* This config overrides some values of the default configuration which is set by setDefaultConfiguration() method
*
* FORD_INLINE_6_1995 = 7
* set_engine_type 7
* set engine_type 7
*
* @date Feb 12, 2014
* @author Andrey Belomutskiy, (c) 2012-2017

View File

@ -3,7 +3,7 @@
* @brief 1996 Ford Aspire default engine configuration
*
* FORD_ASPIRE_1996 = 3
* set_engine_type 3
* set engine_type 3
*
* @date Sep 9, 2013
* @author Andrey Belomutskiy, (c) 2012-2017

View File

@ -1,7 +1,7 @@
/*
* @file ford_festiva.cpp
*
* set_engine_type 14
* set engine_type 14
*
* http://rusefi.com/wiki/index.php?title=Vehicle:Mazda_Protege_1993
* http://rusefi.com/forum/viewtopic.php?f=3&t=537
@ -64,7 +64,7 @@ EXTERN_ENGINE;
/**
* pin 1I/W9 - extra +5v
* set_engine_type 14
* set engine_type 14
*/
void setFordEscortGt(DECLARE_ENGINE_PARAMETER_F) {
engineConfiguration->trigger.type = TT_MAZDA_DOHC_1_4;
@ -131,11 +131,11 @@ void setFordEscortGt(DECLARE_ENGINE_PARAMETER_F) {
setWholeIatCorrTimingTable(0 PASS_ENGINE_PARAMETER);
// set_global_trigger_offset_angle -37
// set global_trigger_offset_angle -37
engineConfiguration->globalTriggerAngleOffset = -37;
// set_ignition_offset 0
// set ignition_offset 0
engineConfiguration->ignitionOffset = 0;
// set_injection_offset 0
// set injection_offset 0
engineConfiguration->extraInjectionOffset = 0;
// todo: change to 15?

View File

@ -3,7 +3,7 @@
* @brief European 1990 Ford Fiesta
*
* FORD_FIESTA = 4
* set_engine_type 4
* set engine_type 4
*
* @date Nov 22, 2013
* @author Andrey Belomutskiy, (c) 2012-2017

View File

@ -1,7 +1,7 @@
/*
* @file gm_2_2.cpp
*
* set_engine_type 30
* set engine_type 30
*
* @date Apr 9, 2015
* @author Andrey Belomutskiy, (c) 2012-2017

View File

@ -1,7 +1,7 @@
/*
* @file honda_600.cpp
*
* set_engine_type 43
* set engine_type 43
*
* @date Jul 9, 2016
* @author Andrey Belomutskiy, (c) 2012-2017
@ -68,8 +68,8 @@ void setHonda600(DECLARE_ENGINE_PARAMETER_F) {
boardConfiguration->triggerInputPins[1] = GPIOC_6;
// set_global_trigger_offset_angle 180
// set_global_trigger_offset_angle 540
// set global_trigger_offset_angle 180
// set global_trigger_offset_angle 540
engineConfiguration->globalTriggerAngleOffset = 540;
engineConfiguration->specs.cylindersCount = 4;

View File

@ -9,13 +9,13 @@
* http://rusefi.com/wiki/index.php?title=Vehicle:Honda_Accord_1995
* http://rusefi.com/forum/viewtopic.php?f=3&t=621
*
* set_engine_type 6
* set engine_type 6
*
* set_engine_type 17
* set engine_type 17
* 1+24 signal, JM Predule
*
*
* set_engine_type 48
* set engine_type 48
* debug configuration to reproduce https://sourceforge.net/p/rusefi/tickets/319/
*
* @date Jan 12, 2014
@ -73,7 +73,7 @@ static void setHondaAccordConfigurationCommon(DECLARE_ENGINE_PARAMETER_F) {
// set cranking_timing_angle 0
engineConfiguration->crankingTimingAngle = -45;
// set_global_trigger_offset_angle 34
// set global_trigger_offset_angle 34
engineConfiguration->globalTriggerAngleOffset = 34;
// set_rpm_hard_limit 4000
@ -82,9 +82,9 @@ static void setHondaAccordConfigurationCommon(DECLARE_ENGINE_PARAMETER_F) {
engineConfiguration->cranking.rpm = 500;
// set_ignition_offset 350
// set ignition_offset 350
// engineConfiguration->ignitionOffset = 350;
// set_injection_offset 510
// set injection_offset 510
// engineConfiguration->extraInjectionOffset = 510;
@ -202,7 +202,7 @@ void setHondaAccordConfiguration1_24_shifted(DECLARE_ENGINE_PARAMETER_F) {
engineConfiguration->trigger.type = TT_HONDA_ACCORD_1_24_SHIFTED;
setHondaAccordConfigurationCommon(PASS_ENGINE_PARAMETER_F);
// set_global_trigger_offset_angle 0
// set global_trigger_offset_angle 0
engineConfiguration->globalTriggerAngleOffset = 0;
}

View File

@ -1,7 +1,7 @@
/*
* @file lada_kalina.cpp
*
* set_engine_type 39
* set engine_type 39
*
* @date Jan 21, 2016
* @author Andrey Belomutskiy, (c) 2012-2017

View File

@ -1,7 +1,7 @@
/**
* @file mazda_626.cpp
* MAZDA_626
* set_engine_type 28
* set engine_type 28
*
* @date Jan 16, 2015
* @author Andrey Belomutskiy, (c) 2012-2017
@ -45,7 +45,7 @@ void setMazda626EngineConfiguration(DECLARE_ENGINE_PARAMETER_F) {
engineConfiguration->injector.flow = 330;
engineConfiguration->specs.displacement = 2.0;
// set_global_trigger_offset_angle 106
// set global_trigger_offset_angle 106
engineConfiguration->globalTriggerAngleOffset = 106;
// set ignition_mode 2
engineConfiguration->ignitionMode = IM_WASTED_SPARK;

View File

@ -1,7 +1,7 @@
/**
* @file mazda_626.h
*
* set_engine_type 28
* set engine_type 28
*
* @date Jan 16, 2015
* @author Andrey Belomutskiy, (c) 2012-2017

View File

@ -2,14 +2,14 @@
* @file mazda_miata.cpp
*
* FORD_ESCORT_GT = 14
* set_engine_type 14
* set engine_type 14
* http://rusefi.com/wiki/index.php?title=Vehicle:Mazda_Protege_1993
*
* MIATA_1990 = 19 (Frankenstein board)
* MIATA_1994_DEVIATOR = 20
* MIATA_1996 = 21
* MIATA_1994_SPAGS = 24
* set_engine_type 24
* set engine_type 24
*
* @date Apr 11, 2014
* @author Andrey Belomutskiy, (c) 2012-2017
@ -303,7 +303,7 @@ static void setMiata1994_common(DECLARE_ENGINE_PARAMETER_F) {
/**
* Frankenso board
* set_engine_type 20
* set engine_type 20
*/
void setMiata1994_d(DECLARE_ENGINE_PARAMETER_F) {
setMiata1994_common(PASS_ENGINE_PARAMETER_F);

View File

@ -2,7 +2,7 @@
* @file mazda_miata_1_6.cpp
*
* Frankenso board
* set_engine_type 41
* set engine_type 41
*
* @date Apr 16, 2016
* @author Andrey Belomutskiy, (c) 2012-2017

View File

@ -3,7 +3,7 @@
*
*
* MAZDA_MIATA_NB1 = 9
* set_engine_type 9
* set engine_type 9
*
* http://rusefi.com/forum/viewtopic.php?t=467
* http://rusefi.com/forum/viewtopic.php?t=987

View File

@ -1,7 +1,7 @@
/*
* @file mazda_miata_vvt.cpp
*
* set_engine_type 47
* set engine_type 47
*
* @date Oct 4, 2016
* @author Andrey Belomutskiy, (c) 2012-2017
@ -111,7 +111,7 @@ void setMazdaMiata2003EngineConfiguration(DECLARE_ENGINE_PARAMETER_F) {
engineConfiguration->dizzySparkOutputPin = GPIOE_8;
// set_global_trigger_offset_angle 670
// set global_trigger_offset_angle 670
engineConfiguration->globalTriggerAngleOffset = 670;
// enable trigger_details

View File

@ -3,7 +3,7 @@
*
* MITSU_4G93 16
*
* set_engine_type 16
* set engine_type 16
*
* @date Aug 5, 2014
* @author Andrey Belomutskiy, (c) 2012-2017
@ -27,7 +27,7 @@ void setMitsubishiConfiguration(DECLARE_ENGINE_PARAMETER_F) {
engineConfiguration->ignitionMode = IM_WASTED_SPARK;
engineConfiguration->specs.firingOrder = FO_1_3_4_2;
// set_global_trigger_offset_angle 671
// set global_trigger_offset_angle 671
engineConfiguration->globalTriggerAngleOffset = 671;
// set_cranking_rpm 550

View File

@ -5,7 +5,7 @@
*
* This config overrides some values of the default configuration which is set by setDefaultConfiguration() method
*
* set_engine_type 10
* set engine_type 10
*
* ROVER_V8 = 10
*
@ -119,7 +119,7 @@ void setRoverv8(DECLARE_ENGINE_PARAMETER_F) {
*/
boardConfiguration->useStepperIdle = true;
// set_injection_pin_mode 0
// set injection_pin_mode 0
boardConfiguration->injectionPinMode = OM_DEFAULT;
boardConfiguration->canTxPin = GPIOB_6;

View File

@ -1,7 +1,7 @@
/**
* @file sachs.cpp
*
* set_engine_type 29
* set engine_type 29
* http://rusefi.com/forum/viewtopic.php?f=3&t=396
*
* @date Jan 26, 2015
@ -22,7 +22,7 @@ void setSachs(DECLARE_ENGINE_PARAMETER_F) {
engineConfiguration->specs.firingOrder = FO_1;
engineConfiguration->engineChartSize = 400;
// set_injection_offset 0
// set injection_offset 0
engineConfiguration->extraInjectionOffset = 0;
setEgoSensor(ES_Innovate_MTX_L PASS_ENGINE_PARAMETER);

View File

@ -2,7 +2,7 @@
* @file subaru.cpp
*
* SUBARU_2003_WRX
* set_engine_type 22
* set engine_type 22
*
* @date Sep 14, 2014
* @author Andrey Belomutskiy, (c) 2012-2017

View File

@ -1,7 +1,7 @@
/*
* @file suzuki_vitara.cpp
*
* set_engine_type 36
* set engine_type 36
*
* @author Andrey Belomutskiy, (c) 2012-2017
* @date Oct 17, 2015

View File

@ -1,9 +1,9 @@
/**
* @file test_engine.cpp
*
* set_engine_type 26
* set engine_type 26
* VVT
* set_engine_type 45
* set engine_type 45
*
* @date Nov 14, 2014
* @author Andrey Belomutskiy, (c) 2012-2017
@ -60,13 +60,13 @@ void setTestVVTEngineConfiguration(DECLARE_ENGINE_PARAMETER_F) {
engineConfiguration->trigger.customTotalToothCount = 3;
engineConfiguration->trigger.customSkippedToothCount = 1;
// set_algorithm 3
// set algorithm 3
setAlgorithm(LM_SPEED_DENSITY PASS_ENGINE_PARAMETER);
boardConfiguration->triggerInputPins[1] = GPIO_UNASSIGNED;
engineConfiguration->camInput = GPIOA_5;
// set_global_trigger_offset_angle 0
// set global_trigger_offset_angle 0
engineConfiguration->globalTriggerAngleOffset = 0;
engineConfiguration->vvtMode = VVT_SECOND_HALF;

View File

@ -8,10 +8,10 @@
* http://wilbo666.pbworks.com/w/page/37134472/2JZ-GTE%20JZS147%20Aristo%20Engine%20Wiring
*
* NON VVTi
* set_engine_type 38
* set engine_type 38
*
* VVTi
* set_engine_type 44
* set engine_type 44
*
* @date Dec 30, 2015
* @author Andrey Belomutskiy, (c) 2012-2017
@ -75,7 +75,7 @@ void setToyota_jzs147EngineConfiguration(DECLARE_ENGINE_PARAMETER_F) {
//// temporary while I am fixing trigger bug
// setOperationMode(engineConfiguration, FOUR_STROKE_CRANK_SENSOR);
// //set_trigger_type 16
// //set trigger_type 16
// engineConfiguration->trigger.type = TT_TOOTHED_WHEEL;
// engineConfiguration->trigger.customTotalToothCount = 36;
// engineConfiguration->trigger.customSkippedToothCount = 2;
@ -109,7 +109,7 @@ void setToyota_2jz_vics(DECLARE_ENGINE_PARAMETER_F) {
engineConfiguration->camInput = GPIOC_6;
engineConfiguration->vvtMode = VVT_2GZ;
// set_global_trigger_offset_angle 155
// set global_trigger_offset_angle 155
engineConfiguration->globalTriggerAngleOffset = 155; // todo
engineConfiguration->ignitionMode = IM_WASTED_SPARK; // just for now

View File

@ -1,7 +1,7 @@
/*
* @file vw.cpp
*
* set_engine_type 32
* set engine_type 32
*
* @date May 24, 2015
* @author Andrey Belomutskiy, (c) 2012-2017
@ -28,7 +28,7 @@ void setVwAba(DECLARE_ENGINE_PARAMETER_F) {
// set_whole_fuel_map 12
setWholeFuelMap(12 PASS_ENGINE_PARAMETER);
// set_global_trigger_offset_angle 93
// set global_trigger_offset_angle 93
engineConfiguration->globalTriggerAngleOffset = 93;
@ -43,7 +43,7 @@ void setVwAba(DECLARE_ENGINE_PARAMETER_F) {
engineConfiguration->specs.cylindersCount = 4;
engineConfiguration->specs.displacement = 2.0;
engineConfiguration->injector.flow = 320; // 30lb/h
// set_algorithm 3
// set algorithm 3
setAlgorithm(LM_SPEED_DENSITY PASS_ENGINE_PARAMETER);
engineConfiguration->map.sensor.type = MT_GM_3_BAR;

View File

@ -3,7 +3,7 @@
*
* http://rusefi.com/forum/viewtopic.php?f=15&t=644
*
* set_engine_type 42
* set engine_type 42
*
* @date May 4, 2016
* @author Andrey Belomutskiy, (c) 2012-2017

View File

@ -185,7 +185,7 @@
#define EFI_MALFUNCTION_INDICATOR TRUE
//#define EFI_MALFUNCTION_INDICATOR FALSE
#define CONSOLE_MAX_ACTIONS 196
#define CONSOLE_MAX_ACTIONS 180
#define EFI_MAP_AVERAGING TRUE
//#define EFI_MAP_AVERAGING FALSE

View File

@ -215,32 +215,32 @@ void setEngineLoadAccelMult(float value) {
accelInfo();
}
static void setTpsAccelThr(float value) {
void setTpsAccelThr(float value) {
engineConfiguration->tpsAccelEnrichmentThreshold = value;
accelInfo();
}
static void setTpsDecelThr(float value) {
void setTpsDecelThr(float value) {
engineConfiguration->tpsDecelEnleanmentThreshold = value;
accelInfo();
}
static void setTpsDecelMult(float value) {
void setTpsDecelMult(float value) {
engineConfiguration->tpsDecelEnleanmentMultiplier = value;
accelInfo();
}
static void setDecelThr(float value) {
void setDecelThr(float value) {
engineConfiguration->engineLoadDecelEnleanmentThreshold = value;
accelInfo();
}
static void setDecelMult(float value) {
void setDecelMult(float value) {
engineConfiguration->engineLoadDecelEnleanmentMultiplier = value;
accelInfo();
}
static void setTpsAccelLen(int length) {
void setTpsAccelLen(int length) {
if (length < 1) {
scheduleMsg(logger, "Length should be positive");
return;

View File

@ -66,6 +66,10 @@ void initAccelEnrichment(Logging *sharedLogger DECLARE_ENGINE_PARAMETER_S);
void setEngineLoadAccelLen(int len);
void setEngineLoadAccelThr(float value);
void setEngineLoadAccelMult(float value);
void setTpsAccelThr(float value);
void setTpsDecelThr(float value);
void setTpsDecelMult(float value);
void updateAccelParameters();
#endif /* ACC_ENRICHMENT_H_ */

View File

@ -350,7 +350,7 @@ static void setBosch02880155868(DECLARE_ENGINE_PARAMETER_F) {
* * recently re-flashed chip
* * flash version of configuration failed CRC check or appears to be older then FLASH_DATA_VERSION
* * 'rewriteconfig' command
* * 'set_engine_type X' command
* * 'set engine_type X' command
*
* This method should only change the state of the configuration data structure but should NOT change the state of
* anything else.

View File

@ -791,7 +791,7 @@ typedef struct {
typedef struct {
/**
* http://rusefi.com/wiki/index.php?title=Manual:Engine_Type
* set_engine_type X
* set engine_type X
* offset 0
*/
engine_type_e engineType;

View File

@ -450,31 +450,31 @@ static void setMockVoltage(int hwChannel, float voltage) {
engine->engineState.mockAdcState.setMockVoltage(hwChannel, voltage);
}
static void setCltVoltage(float voltage) {
void setCltVoltage(float voltage) {
setMockVoltage(engineConfiguration->clt.adcChannel, voltage);
}
static void setIatVoltage(float voltage) {
void setIatVoltage(float voltage) {
setMockVoltage(engineConfiguration->iat.adcChannel, voltage);
}
static void setMafVoltage(float voltage) {
void setMafVoltage(float voltage) {
setMockVoltage(engineConfiguration->mafAdcChannel, voltage);
}
static void setAfrVoltage(float voltage) {
void setAfrVoltage(float voltage) {
setMockVoltage(engineConfiguration->afr.hwChannel, voltage);
}
static void setTpsVoltage(float voltage) {
void setTpsVoltage(float voltage) {
setMockVoltage(engineConfiguration->tpsAdcChannel, voltage);
}
static void setMapVoltage(float voltage) {
void setMapVoltage(float voltage) {
setMockVoltage(engineConfiguration->map.sensor.hwChannel, voltage);
}
static void setVBattVoltage(float voltage) {
void setVBattVoltage(float voltage) {
setMockVoltage(engineConfiguration->vbattAdcChannel, voltage);
}
@ -489,13 +489,6 @@ static void initMockVoltage(void) {
setIatVoltage(2);
#endif /* EFI_SIMULATOR */
addConsoleActionF("set_mock_iat_voltage", setIatVoltage);
addConsoleActionF("set_mock_maf_voltage", setMafVoltage);
addConsoleActionF("set_mock_afr_voltage", setAfrVoltage);
addConsoleActionF("set_mock_tps_voltage", setTpsVoltage);
addConsoleActionF("set_mock_map_voltage", setMapVoltage);
addConsoleActionF("set_mock_vbatt_voltage", setVBattVoltage);
}
#endif /* EFI_ENABLE_MOCK_ADC */

View File

@ -19,4 +19,12 @@ void initPeriodicEvents(DECLARE_ENGINE_PARAMETER_F);
void initEngineContoller(Logging *sharedLogger DECLARE_ENGINE_PARAMETER_S);
void commonInitEngineController(Logging *sharedLogger DECLARE_ENGINE_PARAMETER_S);
void setVBattVoltage(float voltage);
void setMapVoltage(float voltage);
void setTpsVoltage(float voltage);
void setAfrVoltage(float voltage);
void setMafVoltage(float voltage);
void setIatVoltage(float voltage);
void setCltVoltage(float voltage);
#endif /* ENGINE_STATUS_H_ */

View File

@ -958,30 +958,85 @@ typedef struct {
VoidInt callback;
} command_i_s;
typedef struct {
const char *token;
VoidFloat callback;
} command_f_s;
command_f_s commandsF[] = {{"mock_iat_voltage", setIatVoltage},
{"mock_maf_voltage", setMafVoltage},
{"mock_afr_voltage", setAfrVoltage},
{"mock_tps_voltage", setTpsVoltage},
{"mock_map_voltage", setMapVoltage},
{"mock_vbatt_voltage", setVBattVoltage},
{"ignition_offset", setIgnitionOffset},
{"injection_offset", setInjectionOffset},
{"global_trigger_offset_angle", setGlobalTriggerAngleOffset},
{"cranking_fuel", setCrankingFuel},
{"cranking_timing_angle", setCrankingTimingAngle},
{"cranking_charge_angle", setCrankingChargeAngle},
{"vbatt_divider", setVBattDivider},
{"clt_bias", setCltBias},
{"iat_bias", setIatBias},
// {"", },
// {"", },
// {"", },
// {"", },
// {"", },
// {"", },
};
command_i_s commandsI[] = {{"ignition_mode", setIgnitionMode},
{"cranking_rpm", setCrankingRpm},
{"cranking_injection_mode", setCrankingInjectionMode},
{"injection_mode", setInjectionMode},
// {"", },
// {"", },
// {"", },
// {"", },
// {"", },
// {"", },
// {"", },
{"sensor_chart_mode", setSensorChartMode},
{"fixed_mode_timing", setFixedModeTiming},
{"timing_mode", setTimingMode},
{"engine_type", setEngineType},
{"rpm_hard_limit", setRpmHardLimit},
{"firing_order", setFiringOrder},
{"algorithm", setAlgorithmInt},
{"injection_pin_mode", setInjectionPinMode},
{"ignition_pin_mode", setIgnitionPinMode},
{"idle_pin_mode", setIdlePinMode},
{"fuel_pump_pin_mode", setFuelPumpPinMode},
{"malfunction_indicator_pin_mode", setMalfunctionIndicatorPinMode},
{"operation_mode", setOM},
{"trigger_type", setTriggerType},
{"idle_solenoid_freq", setIdleSolenoidFrequency},
// {"", },
// {"", },
// {"", },
// {"", },
// {"", },
// {"", },
// {"", },
// {"", },
// {"", },
// {"", },
};
static void setValue(const char *paramStr, const char *valueStr) {
float valueF = atoff(valueStr);
int valueI = atoi(valueStr);
command_i_s *current = &commandsI[0];
while (current < commandsI + sizeof(commandsI)/sizeof(commandsI[0])) {
if (strEqualCaseInsensitive(paramStr, current->token)) {
current->callback(valueI);
command_f_s *currentF = &commandsF[0];
while (currentF < commandsF + sizeof(commandsF)/sizeof(commandsF[0])) {
if (strEqualCaseInsensitive(paramStr, currentF->token)) {
currentF->callback(valueF);
return;
}
current++;
currentF++;
}
command_i_s *currentI = &commandsI[0];
while (currentI < commandsI + sizeof(commandsI)/sizeof(commandsI[0])) {
if (strEqualCaseInsensitive(paramStr, currentI->token)) {
currentI->callback(valueI);
return;
}
currentI++;
}
@ -1006,12 +1061,6 @@ static void setValue(const char *paramStr, const char *valueStr) {
// } else if (strEqualCaseInsensitive(paramStr, "cranking_rpm")) {
} else if (strEqualCaseInsensitive(paramStr, "warningPeriod")) {
engineConfiguration->warningPeriod = valueI;
} else if (strEqualCaseInsensitive(paramStr, "cranking_fuel")) {
setCrankingFuel(valueF);
} else if (strEqualCaseInsensitive(paramStr, "cranking_timing_angle")) {
setCrankingTimingAngle(valueF);
} else if (strEqualCaseInsensitive(paramStr, "cranking_charge_angle")) {
setCrankingChargeAngle(valueF);
} else if (strEqualCaseInsensitive(paramStr, "dwell")) {
setConstantDwell(valueF PASS_ENGINE_PARAMETER);
} else if (strEqualCaseInsensitive(paramStr, "engineSnifferRpmThreshold")) {
@ -1044,6 +1093,8 @@ static void setValue(const char *paramStr, const char *valueStr) {
}
void initSettings(engine_configuration_s *engineConfiguration) {
// todo: start saving values into flash right away?
addConsoleActionP("showconfig", (VoidPtr) doPrintConfiguration, &engine);
addConsoleAction("tempinfo", printTemperatureInfo);
addConsoleAction("tpsinfo", printTPSInfo);
@ -1057,27 +1108,13 @@ void initSettings(engine_configuration_s *engineConfiguration) {
addConsoleActionI("set_timing_mode", setTimingMode);
addConsoleActionI("set_engine_type", setEngineType);
addConsoleActionI("set_injection_pin_mode", setInjectionPinMode);
addConsoleActionI("set_ignition_pin_mode", setIgnitionPinMode);
addConsoleActionI("set_idle_pin_mode", setIdlePinMode);
addConsoleActionI("set_fuel_pump_pin_mode", setFuelPumpPinMode);
addConsoleActionI("set_malfunction_indicator_pin_mode", setMalfunctionIndicatorPinMode);
addConsoleActionI("set_operation_mode", setOM);
// todo: start saving values into flash right away?
addConsoleActionF("set_global_fuel_correction", setGlobalFuelCorrection);
addConsoleActionF("set_cranking_fuel", setCrankingFuel); // todo: remove
addConsoleActionF("set_cranking_timing_angle", setCrankingTimingAngle);// todo: remove
addConsoleActionF("set_cranking_charge_angle", setCrankingChargeAngle);
addConsoleAction("set_one_coil_ignition", setOneCoilIgnition);
addConsoleAction("set_wasted_spark_ignition", setWastedIgnition);
addConsoleAction("set_individual_coils_ignition", setIndividualCoilsIgnition);
addConsoleActionI("set_injection_mode", setInjectionMode);
addConsoleActionF("set_whole_phase_map", setWholePhaseMapCmd);
addConsoleActionF("set_whole_timing_map", setWholeTimingMapCmd);
addConsoleActionF("set_whole_fuel_map", setWholeFuelMapCmd);
@ -1088,9 +1125,6 @@ void initSettings(engine_configuration_s *engineConfiguration) {
addConsoleActionF("set_whole_timing_map", setWholeTimingMap);
addConsoleActionSSS("set_timing_map", setTimingMap);
addConsoleActionI("set_rpm_hard_limit", setRpmHardLimit);
addConsoleActionI("set_firing_order", setFiringOrder);
addConsoleActionI("set_algorithm", setAlgorithmInt);
addConsoleAction("stopengine", (Void) stopEngine);
// todo: refactor this - looks like all boolean flags should be controlled with less code duplication
@ -1101,16 +1135,10 @@ void initSettings(engine_configuration_s *engineConfiguration) {
addConsoleActionS("disable", disable);
addConsoleActionII("set_toothed_wheel", setToothedWheel);
addConsoleActionI("set_trigger_type", setTriggerType);
addConsoleActionF("set_vbatt_divider", setVBattDivider);
addConsoleActionF("set_injector_lag", setInjectorLag);
addConsoleActionF("set_clt_bias", setCltBias);
addConsoleActionF("set_iat_bias", setIatBias);
addConsoleActionI("set_idle_solenoid_freq", setIdleSolenoidFrequency);
addConsoleActionFF("set_fan", setFanSetting);
addConsoleActionSS("set", setValue);

View File

@ -164,7 +164,7 @@ struct ThermistorConf @brief Thermistor curve parameters
end_struct
custom engine_type_e 4 bits, S32, @OFFSET@, [0:2], "AUDI_AAN", "DODGE_NEON_1995", "FORD_ASPIRE_1996", "FORD_FIESTA", "NISSAN_PRIMERA", "HONDA_ACCORD", "FORD_INLINE_6_1995", "GY6_139QMB"
engine_type_e engineType;http://rusefi.com/wiki/index.php?title=Manual:Engine_Type\nset_engine_type X
engine_type_e engineType;http://rusefi.com/wiki/index.php?title=Manual:Engine_Type\nset engine_type X
int engineSnifferRpmThreshold;Engine sniffer would be disabled above this rpm\nset engineSnifferRpmThreshold X;"RPM", 1, 0, 0,30000, 0
@ -273,17 +273,17 @@ int sensorSnifferRpmThreshold;+Disable sensor sniffer above this rpm;"RPM",
custom engine_load_mode_e 4 bits, U32, @OFFSET@, [0:1], @@engine_load_mode_e_enum@@
engine_load_mode_e fuelAlgorithm;+This setting controls which fuel quantity control algorithm is used.\nset_algorithm X
engine_load_mode_e fuelAlgorithm;+This setting controls which fuel quantity control algorithm is used.\nset algorithm X
custom injection_mode_e 4 bits, U32, @OFFSET@, [0:1], "Simultaneous", "Sequential", "Batch", "INVALID"
injection_mode_e crankingInjectionMode;
injection_mode_e injectionMode;+'batched' means two injectors are wired together\nset_injection_mode X
injection_mode_e injectionMode;+'batched' means two injectors are wired together\nset injection_mode X
angle_t extraInjectionOffset;+this is about deciding when the injector starts it's squirt\nSee also injectionPhase map\ntodo: do we need even need this since we have the map anyway?;"deg", 1, 0.0, -720, 720, 2
angle_t crankingTimingAngle;+Timing advance while engine cranking\nset cranking_timing_angle X; "deg", 1, 0.0, -360, 360, 2
custom ignition_mode_e 4 bits, U32, @OFFSET@, [0:1], "One coil", "Individual Coils", "Wasted", "INVALID"
ignition_mode_e ignitionMode;+'wasted' means one coil is driving two spark plugs in two cylinders, with one of the aparks not doing anything since it's happening on the exhaust cycle\nset_ignition_mode X
ignition_mode_e ignitionMode;+'wasted' means one coil is driving two spark plugs in two cylinders, with one of the aparks not doing anything since it's happening on the exhaust cycle\nset ignition_mode X
angle_t ignitionOffset;+this value could be used to offset the whole ignition timing table by a constant;"RPM", 1, 0, 0, 3000.0, 0
@ -292,7 +292,7 @@ timing_mode_e timingMode;
angle_t fixedModeTiming;+This value is used in 'fixed timing' mode, i.e. constant timing\nThis mode is useful for instance while adjusting distributor location;"RPM", 1, 0, 0, 3000.0, 0
angle_t globalTriggerAngleOffset;+Angle between Top Dead Center (TDC) and the first trigger event.\nKnowing this angle allows us to control timing and other angles in reference to TDC.\nset_global_trigger_offset_angle X;"deg", 1, 0, -720, 720, 0
angle_t globalTriggerAngleOffset;+Angle between Top Dead Center (TDC) and the first trigger event.\nKnowing this angle allows us to control timing and other angles in reference to TDC.\nset global_trigger_offset_angle X;"deg", 1, 0, -720, 720, 0
@ -337,7 +337,7 @@ custom bool32_t 4 bits, U32, @OFFSET@, [0:0], "false", "true"
#define trigger_type_e_enum "custom toothed wheel", "ford aspire", "dodge neon", "Miata NA", "Miata NB", "GM_7X", "Cooper", "Mazda SOHC 4", "60/2", "36/1", "Accord CD", "MITSU", "ACCORD 2", "ACCORD DIP", "Neon 2003", "MAZDA D 1+4", "1+1", "1+60/2", "Single Tooth", "Dodge Ram 1+16", "60/2 VW", "Accord 1+24", "DODGE STRATUS", "36_2_2_2", "Nissan", "2JZ", "Rover K", "GM LS 24", "Honda CBR 600", "2JZ_1_12", "Honda CBR 600 custom", "3/1 skipped" , "2003 neon crank", "Miata VVT", "trg34", "trg35", "Subaru 7+6", "INVALID", "INVALID", "INVALID", "INVALID"
custom trigger_type_e 4 bits, U32, @OFFSET@, [0:5], @@trigger_type_e_enum@@
trigger_type_e type;set_trigger_type X
trigger_type_e type;set trigger_type X
bit customIsSynchronizationNeeded;
bit customNeedSecondTriggerInput;

View File

@ -108,8 +108,8 @@ public class AutoTest {
setEngineType(23);
sendCommand("set suckedOffCoef 0");
sendCommand("set addedToWallCoef 0");
sendCommand("set_mock_map_voltage 1");
sendCommand("set_mock_vbatt_voltage 1.20");
sendCommand("set mock_map_voltage 1");
sendCommand("set mock_vbatt_voltage 1.20");
sendCommand("disable cylinder_cleanup");
EngineChart chart;
String msg = "2003 Neon cranking ";
@ -173,7 +173,7 @@ public class AutoTest {
private static void testMazdaProtege() {
setEngineType(14);
EngineChart chart;
sendCommand("set_mock_vbatt_voltage 1.395");
sendCommand("set mock_vbatt_voltage 1.395");
IoUtil.changeRpm(200);
IoUtil.changeRpm(260);
IoUtil.changeRpm(200);
@ -222,7 +222,7 @@ public class AutoTest {
assertWave(msg, chart, EngineChart.SPARK_3, 0.13333, x + 360);
// switching to Speed Density
sendCommand("set_mock_map_voltage 1");
sendCommand("set mock_map_voltage 1");
sendComplexCommand("set_algorithm 3");
IoUtil.changeRpm(2600);
IoUtil.changeRpm(2000);
@ -257,7 +257,7 @@ public class AutoTest {
assertWave(msg, chart, EngineChart.SPARK_1, 0.01666, x, x + 120, x + 240, x + 360, x + 480, x + 600);
assertWaveNull(msg, chart, EngineChart.TRIGGER_2);
sendComplexCommand("set_trigger_type 1"); // TT_FORD_ASPIRE
sendComplexCommand("set trigger_type 1"); // TT_FORD_ASPIRE
chart = nextChart();
assertTrue(msg, chart.get(EngineChart.TRIGGER_2) != null);
}
@ -265,8 +265,8 @@ public class AutoTest {
private static void testFordAspire() {
setEngineType(3);
sendCommand("disable cylinder_cleanup");
sendCommand("set_mock_map_voltage 1");
sendCommand("set_mock_vbatt_voltage 2.2");
sendCommand("set mock_map_voltage 1");
sendCommand("set mock_vbatt_voltage 2.2");
String msg;
EngineChart chart;
// todo: interesting changeRpm(100);
@ -334,8 +334,8 @@ public class AutoTest {
sendCommand("set_fuel_map 2200 4.2 15.66");
sendCommand("set_fuel_map 2000 4.2 15.66");
// mock 2 means 4 on the gauge because of the divider. should we simplify this?
sendCommand("set_mock_maf_voltage 2");
sendComplexCommand("set_global_trigger_offset_angle 175");
sendCommand("set mock_maf_voltage 2");
sendComplexCommand("set global_trigger_offset_angle 175");
chart = nextChart();
assertWaveFall(msg + " fuel", chart, EngineChart.INJECTOR_1, 0.763, 238.75);
@ -347,8 +347,8 @@ public class AutoTest {
assertWave(chart, EngineChart.SPARK_1, 0.133, x, x + 180, x + 360, x + 540);
assertWaveNull(chart, EngineChart.SPARK_2);
sendComplexCommand("set_global_trigger_offset_angle 130");
sendComplexCommand("set_injection_offset 369");
sendComplexCommand("set global_trigger_offset_angle 130");
sendComplexCommand("set injection_offset 369");
chart = nextChart();
x = 33;
assertWave(chart, EngineChart.SPARK_1, 0.133, x, x + 180, x + 360, x + 540);
@ -365,8 +365,8 @@ public class AutoTest {
assertWave(chart, EngineChart.SPARK_2, 0.133, x);
// switching to Speed Density
sendCommand("set_mock_maf_voltage 2");
sendComplexCommand("set_algorithm 3");
sendCommand("set mock_maf_voltage 2");
sendComplexCommand("set algorithm 3");
IoUtil.changeRpm(2400);
IoUtil.changeRpm(2000);
nextChart();