auto-sync

This commit is contained in:
rusEfi 2016-08-20 21:03:09 -04:00
parent 04621f2909
commit d2c7c1c993
6 changed files with 30 additions and 9 deletions

View File

@ -2,6 +2,8 @@
* @file test_engine.cpp
*
* set_engine_type 26
* VVT
* set_engine_type 45
*
* @date Nov 14, 2014
* @author Andrey Belomutskiy, (c) 2012-2016
@ -9,6 +11,7 @@
#include "engine.h"
#include "test_engine.h"
#include "engine_math.h"
EXTERN_ENGINE;
@ -19,9 +22,9 @@ void setTestEngineConfiguration(DECLARE_ENGINE_PARAMETER_F) {
setOperationMode(engineConfiguration, FOUR_STROKE_CAM_SENSOR);
engineConfiguration->trigger.type = TT_ONE_PLUS_ONE;
trigger_config_s *triggerConfig = &engineConfiguration->trigger;
triggerConfig->customTotalToothCount = 60;
triggerConfig->customSkippedToothCount = 0;
// trigger_config_s *triggerConfig = &engineConfiguration->trigger;
// triggerConfig->customTotalToothCount = 60;
// triggerConfig->customSkippedToothCount = 0;
engineConfiguration->useOnlyRisingEdgeForTrigger = true;
engineConfiguration->mafAdcChannel = EFI_ADC_NONE;
@ -51,3 +54,15 @@ void setTestEngineConfiguration(DECLARE_ENGINE_PARAMETER_F) {
engineConfiguration->hasIatSensor = false;
}
void setTestVVTEngineConfiguration(DECLARE_ENGINE_PARAMETER_F) {
setOperationMode(engineConfiguration, FOUR_STROKE_CRANK_SENSOR);
engineConfiguration->trigger.type = TT_TOOTHED_WHEEL;
engineConfiguration->trigger.customTotalToothCount = 3;
engineConfiguration->trigger.customSkippedToothCount = 1;
// set_algorithm 3
setAlgorithm(LM_SPEED_DENSITY PASS_ENGINE_PARAMETER);
}

View File

@ -10,5 +10,6 @@
#include "engine_configuration.h"
void setTestEngineConfiguration(DECLARE_ENGINE_PARAMETER_F);
void setTestVVTEngineConfiguration(DECLARE_ENGINE_PARAMETER_F);
#endif /* TEST_ENGINE_H_ */

View File

@ -112,6 +112,8 @@ case SUBARU_2003_WRX:
return "SUBARU_2003_WRX";
case TEST_ENGINE:
return "TEST_ENGINE";
case TEST_ENGINE_VVT:
return "TEST_ENGINE_VVT";
case VW_ABA:
return "VW_ABA";
case DODGE_STRATUS:

View File

@ -921,6 +921,9 @@ void resetConfigurationExt(Logging * logger, engine_type_e engineType DECLARE_EN
case TEST_ENGINE:
setTestEngineConfiguration(PASS_ENGINE_PARAMETER_F);
break;
case TEST_ENGINE_VVT:
setTestVVTEngineConfiguration(PASS_ENGINE_PARAMETER_F);
break;
case SACHS:
setSachs(PASS_ENGINE_PARAMETER_F);
break;

View File

@ -129,7 +129,9 @@ typedef enum {
TOYOTA_2JZ_GTE_VVTi = 44,
ET_UNUSED = 45,
TEST_ENGINE_VVT = 45,
ET_UNUSED = 46,
Force_4b_engine_type = ENUM_32_BITS,
} engine_type_e;

View File

@ -170,8 +170,6 @@ const char* getConfigurationName(engine_type_e engineType) {
return "MX596";
case BMW_E34:
return "BMWe34";
case TEST_ENGINE:
return "Test";
case VW_ABA:
return "VW_ABA";
case DODGE_STRATUS:
@ -411,7 +409,7 @@ static void printTPSInfo(void) {
scheduleMsg(&logger, "tps min (closed) %d/max (full) %d v=%f @%s%d", engineConfiguration->tpsMin, engineConfiguration->tpsMax,
getTPSVoltage(PASS_ENGINE_PARAMETER_F), portname(port), pin);
#endif
#endif /* EFI_PROD_CODE */
scheduleMsg(&logger, "current 10bit=%d value=%f rate=%f", getTPS12bitAdc() / TPS_TS_CONVERSION, getTPS(PASS_ENGINE_PARAMETER_F),
getTpsRateOfChange());
}
@ -436,7 +434,7 @@ static void printTemperatureInfo(void) {
scheduleMsg(&logger, "warmupPID=%d corr=%f", boardConfiguration->useWarmupPidAfr,
engine->engineState.cltFuelCorrection);
#endif
#endif /* EFI_ANALOG_SENSORS */
}
static void setCrankingRpm(int value) {
@ -519,7 +517,7 @@ static void setTriggerType(int value) {
doPrintConfiguration(engine);
}
static void setToothedWheel(int total, int skipped) {
static void setToothedWheel(int total, int skipped DECLARE_ENGINE_PARAMETER_S) {
engineConfiguration->trigger.type = TT_TOOTHED_WHEEL;
scheduleMsg(&logger, "toothed: total=%d/skipped=%d", total, skipped);
setToothedWheelConfiguration(&engine->triggerShape, total, skipped, engineConfiguration->operationMode);