auto-sync

This commit is contained in:
rusEfi 2015-08-30 13:02:46 -04:00
parent 78753200bc
commit 7fbff403bd
8 changed files with 27 additions and 13 deletions

View File

@ -2,6 +2,7 @@
* @file dodge_neon.cpp
*
* DODGE_NEON_1995 = 2
* set_engine_type 2
*
* DODGE_NEON_2003 = 23
* set_engine_type 23
@ -438,8 +439,8 @@ void setDodgeNeonNGCEngineConfiguration(DECLARE_ENGINE_PARAMETER_F) {
engineConfiguration->tpsAccelEnrichmentThreshold = 10;
engineConfiguration->tpsAccelEnrichmentMultiplier = 0.15;
// engineConfiguration->suckedOffCoef = 0.05;
// engineConfiguration->addedToWallCoef = 0.40;
engineConfiguration->suckedOffCoef = 0.05;
engineConfiguration->addedToWallCoef = 0.40;
}

View File

@ -2,6 +2,7 @@
* @file mazda_miata_nb.cpp
*
* MAZDA_MIATA_NB = 9
* set_engine_type 9
*
* @date Feb 18, 2014
* @author Andrey Belomutskiy, (c) 2012-2015

View File

@ -955,6 +955,10 @@ static void setValue(const char *paramStr, const char *valueStr) {
engineConfiguration->step1rpm = valueI;
} else if (strEqualCaseInsensitive(paramStr, "step1timing")) {
engineConfiguration->step1timing = valueI;
} else if (strEqualCaseInsensitive(paramStr, "suckedOffCoef")) {
engineConfiguration->suckedOffCoef = valueF;
} else if (strEqualCaseInsensitive(paramStr, "addedToWallCoef")) {
engineConfiguration->addedToWallCoef = valueF;
} else if (strEqualCaseInsensitive(paramStr, "targetvbatt")) {
engineConfiguration->targetVBatt = valueF;
#if EFI_RTC || defined(__DOXYGEN__)
@ -1035,7 +1039,10 @@ void initSettings(engine_configuration_s *engineConfiguration) {
addConsoleActionFF("set_fan", setFanSetting);
#if EFI_PROD_CODE
addConsoleActionSS("set", setValue);
addConsoleActionS("get", getValue);
#if EFI_PROD_CODE || defined(__DOXYGEN__)
addConsoleActionS("showpin", showPinFunction);
addConsoleActionSS("set_injection_pin", setInjectionPin);
addConsoleActionSS("set_ignition_pin", setIgnitionPin);
@ -1052,9 +1059,6 @@ void initSettings(engine_configuration_s *engineConfiguration) {
addConsoleActionS("set_idle_pin", setIdlePin);
addConsoleActionS("set_main_relay_pin", setMainRelayPin);
addConsoleActionSS("set", setValue);
addConsoleActionS("get", getValue);
#if HAL_USE_ADC || defined(__DOXYGEN__)
addConsoleActionSS("set_analog_input_pin", setAnalogInputPin);
#endif

View File

@ -235,6 +235,8 @@ void printAllTriggers() {
FILE * fp = fopen (TRIGGERS_FILE_NAME, "w+");
fprintf(fp, "# Generated by rusEfi\r\n");
for (int triggerId = 1; triggerId < TT_UNUSED; triggerId++) {
trigger_type_e tt = (trigger_type_e) triggerId;
@ -255,6 +257,9 @@ void printAllTriggers() {
s->initializeTriggerShape(NULL PASS_ENGINE_PARAMETER);
fprintf(fp, "TRIGGERTYPE %d %d %s\r\n", triggerId, s->getSize(), getTrigger_type_e(tt));
fprintf(fp, "# duty %f %f\r\n", s->dutyCycle[0], s->dutyCycle[1]);
for (int i = 0; i < s->getSize(); i++) {
int triggerDefinitionCoordinate = (s->getTriggerShapeSynchPointIndex() + i) % s->getLength();

View File

@ -52,6 +52,7 @@ void initializeMazdaMiataNbShape(TriggerShape *s) {
s->useRiseEdge = false;
s->reset(FOUR_STROKE_CAM_SENSOR, true);
s->invertOnAdd = true;
/**
* cam sensor is primary, crank sensor is secondary

View File

@ -291,5 +291,5 @@ int getRusEfiVersion(void) {
return 123; // this is here to make the compiler happy about the unused array
if (UNUSED_CCM_SIZE[0] * 0 != 0)
return 3211; // this is here to make the compiler happy about the unused array
return 20150823;
return 20150830;
}

View File

@ -102,6 +102,8 @@ public class AutoTest {
private static void test2003DodgeNeon() {
setEngineType(23);
sendCommand("set suckedOffCoef 0");
sendCommand("set addedToWallCoef 0");
EngineChart chart;
String msg = "2003 Neon cranking ";
IoUtil.changeRpm(200);

View File

@ -209,7 +209,7 @@ void testMazdaMianaNbDecoder(void) {
engine_configuration_s *ec = eth.ec;
TriggerShape * shape = &eth.engine.triggerShape;
assertEquals(11, shape->getTriggerShapeSynchPointIndex());
assertEquals(12, shape->getTriggerShapeSynchPointIndex());
TriggerState state;
@ -251,13 +251,13 @@ void testMazdaMianaNbDecoder(void) {
event_trigger_position_s position;
assertEqualsM("globalTriggerAngleOffset", 276, ec->globalTriggerAngleOffset);
findTriggerPosition(&position, 0 PASS_ENGINE_PARAMETER);
assertTriggerPosition(&position, 7, 46);
assertTriggerPosition(&position, 7, 0);
findTriggerPosition(&position, 180 PASS_ENGINE_PARAMETER);
assertTriggerPosition(&position, 13, 46);
assertTriggerPosition(&position, 13, 0);
findTriggerPosition(&position, 360 PASS_ENGINE_PARAMETER);
assertTriggerPosition(&position, 17, 46);
assertTriggerPosition(&position, 17, 0.0);
findTriggerPosition(&position, 444 PASS_ENGINE_PARAMETER);
assertTriggerPosition(&position, 0, 0);
@ -269,10 +269,10 @@ void testMazdaMianaNbDecoder(void) {
assertTriggerPosition(&position, 0, 1);
findTriggerPosition(&position, 494 PASS_ENGINE_PARAMETER);
assertTriggerPosition(&position, 3, 0);
assertTriggerPosition(&position, 2, 20);
findTriggerPosition(&position, 719 PASS_ENGINE_PARAMETER);
assertTriggerPosition(&position, 7, 45);
assertTriggerPosition(&position, 6, 65);
ec->globalTriggerAngleOffset = 0;
findTriggerPosition(&position, 0 PASS_ENGINE_PARAMETER);