auto-sync

This commit is contained in:
rusEfi 2015-02-16 22:06:45 -06:00
parent af4fdd3606
commit 170c29a7b5
5 changed files with 35 additions and 10 deletions

View File

@ -187,8 +187,8 @@ void setDodgeNeonNGCEngineConfiguration(engine_configuration_s *engineConfigurat
setFrankenso_01_LCD(boardConfiguration);
setFrankenso0_1_joystick(engineConfiguration);
// set_global_trigger_offset_angle 46
engineConfiguration->globalTriggerAngleOffset = 46;
// set_global_trigger_offset_angle 50
engineConfiguration->globalTriggerAngleOffset = 50;
// set_injection_offset 0
engineConfiguration->injectionAngle = 0;

View File

@ -12,14 +12,15 @@ void configureNeon2003TriggerShape(TriggerShape *s) {
// voodoo magic - we always need 720 at the end
int base = 10;
float b = 0;
s->useRiseEdge = true;
s->invertOnAdd = true;
s->gapBothDirections = true;
// are these non-default values really needed here now that the gap is finally precise?
s->setTriggerSynchronizationGap2(0.8 * CHRYSLER_NGC_GAP, 1.55 * CHRYSLER_NGC_GAP);
/*
s->addEvent(base + 26, T_PRIMARY, TV_HIGH);
s->addEvent(base + 62, T_PRIMARY, TV_LOW);
@ -40,6 +41,29 @@ void configureNeon2003TriggerShape(TriggerShape *s) {
s->addEvent(base + 674, T_PRIMARY, TV_HIGH);
s->addEvent(base + 710, T_PRIMARY, TV_LOW);
*
*/
s->addEvent(143.0712499, T_PRIMARY, TV_HIGH);
s->addEvent(182.684791, T_PRIMARY, TV_LOW);
s->addEvent(215.424166, T_PRIMARY, TV_HIGH);
s->addEvent(256.247395, T_PRIMARY, TV_LOW);
s->addEvent(288.659999, T_PRIMARY, TV_HIGH);
s->addEvent(326.778229, T_PRIMARY, TV_LOW);
s->addEvent(361.522083, T_PRIMARY, TV_HIGH);
s->addEvent(508.960416, T_PRIMARY, TV_LOW);
s->addEvent(545.635, T_PRIMARY, TV_HIGH);
s->addEvent(582.98864, T_PRIMARY, TV_LOW);
s->addEvent(617.22989, T_PRIMARY, TV_HIGH);
s->addEvent(653.38625, T_PRIMARY, TV_LOW);
s->addEvent(684.1080, T_PRIMARY, TV_HIGH);
s->addEvent(720, T_PRIMARY, TV_LOW);
}
void configureNeon1995TriggerShape(TriggerShape *s) {

View File

@ -10,7 +10,7 @@
#include "trigger_structure.h"
#define CHRYSLER_NGC_GAP 2.9135
#define CHRYSLER_NGC_GAP 3.9854
void configureNeon1995TriggerShape(TriggerShape *s);
void configureNeon2003TriggerShape(TriggerShape *s);

View File

@ -33,6 +33,7 @@ public class AutoTest {
nextChart();
String msg = "2003 Neon cranking";
IoUtil.changeRpm(200);
nextChart();
chart = nextChart();
double x = 100;
@ -42,10 +43,10 @@ public class AutoTest {
assertWaveNull(msg, chart, WaveChart.SPARK_4);
x = 176.856;
assertWave(true, msg, chart, WaveChart.INJECTOR_1, 0.008199999999, 0.01, 0.1, x, x + 180, x + 360, x + 540);
assertWave(true, msg, chart, WaveChart.INJECTOR_2, 0.008199999999, 0.01, 0.1, x, x + 180, x + 360, x + 540);
assertWave(true, msg, chart, WaveChart.INJECTOR_3, 0.008199999999, 0.01, 0.1, x, x + 180, x + 360, x + 540);
assertWave(true, msg, chart, WaveChart.INJECTOR_4, 0.008199999999, 0.01, 0.1, x, x + 180, x + 360, x + 540);
assertWave(true, msg, chart, WaveChart.INJECTOR_1, 0.006266666666, 0.01, 0.04, x, x + 180, x + 360, x + 540);
assertWave(true, msg, chart, WaveChart.INJECTOR_2, 0.006266666666, 0.01, 0.04, x, x + 180, x + 360, x + 540);
assertWave(true, msg, chart, WaveChart.INJECTOR_3, 0.006266666666, 0.01, 0.04, x, x + 180, x + 360, x + 540);
assertWave(true, msg, chart, WaveChart.INJECTOR_4, 0.006266666666, 0.01, 0.04, x, x + 180, x + 360, x + 540);
msg = "2003 Neon running";
IoUtil.changeRpm(2000);

View File

@ -309,7 +309,7 @@ static void testTriggerDecoder2(const char *msg, engine_type_e type, int synchPo
static void testTriggerDecoder3(const char *msg, engine_type_e type, int synchPointIndex, float channel1duty, float channel2duty, float expectedGap) {
printGapRatio = true;
testTriggerDecoder2(msg, type, synchPointIndex, channel1duty, channel2duty);
assertEqualsM("actual gap ratio", expectedGap, actualSynchGap);
assertEqualsM2("actual gap ratio", expectedGap, actualSynchGap, 0.001);
printGapRatio = false;
}
@ -512,7 +512,7 @@ void testTriggerDecoder(void) {
testTriggerDecoder3("miata 1994", MIATA_1994_DEVIATOR, 11, 0.2985, 0.3890, MIATA_NA_GAP);
testTriggerDecoder3("citroen", CITROEN_TU3JP, 0, 0.4833, 0.0, 2.9994);
testTriggerDecoder3("neon NGC", DODGE_NEON_2003, 5, 0.4861, 0.0, CHRYSLER_NGC_GAP);
testTriggerDecoder3("neon NGC", DODGE_NEON_2003, 0, 0.4786, 0.0, CHRYSLER_NGC_GAP);
testTriggerDecoder2("sachs", SACHS, 0, 0.5000, 0.000);
testMazda323();