Trigger: warning code on normal engine start up #669

better TDC unit test approach?
This commit is contained in:
Andrey 2021-06-25 13:19:16 -04:00
parent 2013a496ef
commit bb5500dbb3
3 changed files with 4 additions and 4 deletions

View File

@ -10,8 +10,6 @@
#include "trigger_simulator.h"
#include "trigger_emulator_algo.h"
#define SIMULATION_CYCLE_PERIOD 720000
EXTERN_ENGINE;
#if EFI_UNIT_TEST

View File

@ -8,6 +8,8 @@
#pragma once
#define SIMULATION_CYCLE_PERIOD 720000
#include "trigger_decoder.h"
int getSimulatedEventTime(const TriggerWaveform& shape, int i);

View File

@ -26,6 +26,6 @@ TEST(miata, miata_na_tdc) {
}
ASSERT_EQ(167, GET_RPM()) << "miata_na_tdc RPM";
ASSERT_EQ(3894000, engine->tdcScheduler[0].momentX); // let's assert TDC position and sync point
ASSERT_EQ(4614000, engine->tdcScheduler[1].momentX); // let's assert TDC position and sync point
ASSERT_EQ(294000, engine->tdcScheduler[0].momentX % SIMULATION_CYCLE_PERIOD); // let's assert TDC position and sync point
ASSERT_EQ(294000, engine->tdcScheduler[1].momentX % SIMULATION_CYCLE_PERIOD); // let's assert TDC position and sync point
}