Improve NA/NB miata sync parameters (#3730)

* NA sync parameters

* NB vvt pattern too

* zach's car says tighten the gap

* look at that, we sync one cycle sooner!
This commit is contained in:
Matthew Kennedy 2022-01-01 20:39:04 -06:00 committed by GitHub
parent c35a8db9ff
commit 4627bace31
2 changed files with 7 additions and 7 deletions

View File

@ -28,9 +28,9 @@ void initializeMazdaMiataNaShape(TriggerWaveform *s) {
s->initialize(FOUR_STROKE_CAM_SENSOR);
// nominal gap is 0.325
s->setTriggerSynchronizationGap2(0.1, 0.45);
s->setTriggerSynchronizationGap2(0.1, 0.5);
// nominal gap is ~1.52
s->setSecondTriggerSynchronizationGap2(1.2, 1.8);
s->setSecondTriggerSynchronizationGap2(0.6, 2.3);
s->useRiseEdge = false;
@ -185,9 +185,9 @@ void initializeMazdaMiataVVtCamShape(TriggerWaveform *s) {
s->initialize(FOUR_STROKE_CAM_SENSOR);
// Nominal gap is 8.92
s->setTriggerSynchronizationGap2(7, 13);
s->setTriggerSynchronizationGap2(6, 20);
// Nominal gap is 0.128
s->setSecondTriggerSynchronizationGap2(0.06f, 0.16f);
s->setSecondTriggerSynchronizationGap2(0.04f, 0.2f);
s->addEvent720(325, T_PRIMARY, TV_FALL);
s->addEvent720(360, T_PRIMARY, TV_RISE);

View File

@ -19,7 +19,7 @@ TEST(cranking, realCrankingFromFile) {
ssize_t read;
for (int i = 0; i < 23; i++) {
for (int i = 0; i < 11; i++) {
reader.readLine(&eth);
}
@ -29,9 +29,9 @@ TEST(cranking, realCrankingFromFile) {
// This tooth should be first sync point
reader.readLine(&eth);
EXPECT_EQ(232, GET_RPM())<< reader.lineIndex() << " @ 1";
EXPECT_EQ(228, GET_RPM())<< reader.lineIndex() << " @ 1";
for (int i = 0; i < 30; i++) {
for (int i = 0; i < 42; i++) {
reader.readLine(&eth);
}
ASSERT_EQ(224, GET_RPM())<< reader.lineIndex();