mirror of https://github.com/FOME-Tech/fome-fw.git
haha these two functions do the same thing!?
This commit is contained in:
parent
decbaaef4a
commit
47ee857699
|
@ -370,16 +370,6 @@ void EngineTestHelper::setTriggerType(trigger_type_e trigger) {
|
||||||
applyTriggerWaveform();
|
applyTriggerWaveform();
|
||||||
}
|
}
|
||||||
|
|
||||||
void EngineTestHelper::executeUntil(int timeUs) {
|
|
||||||
scheduling_s *head;
|
|
||||||
while ((head = engine.executor.getHead()) != nullptr) {
|
|
||||||
if (head->momentX > timeUs) {
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
setTimeAndInvokeEventsUs(head->momentX);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void setupSimpleTestEngineWithMafAndTT_ONE_trigger(EngineTestHelper *eth, injection_mode_e injectionMode) {
|
void setupSimpleTestEngineWithMafAndTT_ONE_trigger(EngineTestHelper *eth, injection_mode_e injectionMode) {
|
||||||
setCamOperationMode();
|
setCamOperationMode();
|
||||||
setupSimpleTestEngineWithMaf(eth, injectionMode, trigger_type_e::TT_ONE);
|
setupSimpleTestEngineWithMaf(eth, injectionMode, trigger_type_e::TT_ONE);
|
||||||
|
|
|
@ -65,7 +65,6 @@ public:
|
||||||
void smartFireFall(float delayMs);
|
void smartFireFall(float delayMs);
|
||||||
void moveTimeForwardAndInvokeEventsUs(int deltaTimeUs);
|
void moveTimeForwardAndInvokeEventsUs(int deltaTimeUs);
|
||||||
void setTimeAndInvokeEventsUs(int timeNowUs);
|
void setTimeAndInvokeEventsUs(int timeNowUs);
|
||||||
void executeUntil(int timeUs);
|
|
||||||
void moveTimeForwardAndInvokeEventsSec(int deltaTimeSeconds);
|
void moveTimeForwardAndInvokeEventsSec(int deltaTimeSeconds);
|
||||||
/**
|
/**
|
||||||
* both Rise and Fall
|
* both Rise and Fall
|
||||||
|
|
|
@ -113,14 +113,14 @@ TEST(nissan, vq_vvt) {
|
||||||
ptrs);
|
ptrs);
|
||||||
}
|
}
|
||||||
|
|
||||||
eth.executeUntil(1473000);
|
eth.setTimeAndInvokeEventsUs(1473000);
|
||||||
ASSERT_EQ(167, round(Sensor::getOrZero(SensorType::Rpm)));
|
ASSERT_EQ(167, round(Sensor::getOrZero(SensorType::Rpm)));
|
||||||
|
|
||||||
eth.executeUntil(1475000);
|
eth.setTimeAndInvokeEventsUs(1475000);
|
||||||
ASSERT_EQ(167, round(Sensor::getOrZero(SensorType::Rpm)));
|
ASSERT_EQ(167, round(Sensor::getOrZero(SensorType::Rpm)));
|
||||||
TriggerCentral *tc = &engine->triggerCentral;
|
TriggerCentral *tc = &engine->triggerCentral;
|
||||||
|
|
||||||
eth.executeUntil(3593000);
|
eth.setTimeAndInvokeEventsUs(3593000);
|
||||||
ASSERT_TRUE(tc->vvtState[0][0].getShaftSynchronized());
|
ASSERT_TRUE(tc->vvtState[0][0].getShaftSynchronized());
|
||||||
|
|
||||||
scheduling_s *head;
|
scheduling_s *head;
|
||||||
|
|
Loading…
Reference in New Issue