haha these two functions do the same thing!?

This commit is contained in:
Matthew Kennedy 2024-04-25 22:17:20 -07:00 committed by rusEFI LLC
parent 08378967c4
commit 271b36cb72
3 changed files with 3 additions and 14 deletions

View File

@ -375,16 +375,6 @@ void EngineTestHelper::setTriggerType(trigger_type_e trigger) {
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) {
setCamOperationMode();
setupSimpleTestEngineWithMaf(eth, injectionMode, trigger_type_e::TT_HALF_MOON);

View File

@ -67,7 +67,6 @@ public:
void smartFireFall(float delayMs);
void moveTimeForwardAndInvokeEventsUs(int deltaTimeUs);
void setTimeAndInvokeEventsUs(int timeNowUs);
void executeUntil(int timeUs);
void moveTimeForwardAndInvokeEventsSec(int deltaTimeSeconds);
/**
* both Rise and Fall

View File

@ -114,14 +114,14 @@ TEST(nissan, vq_vvt) {
ptrs);
}
eth.executeUntil(1473000);
eth.setTimeAndInvokeEventsUs(1473000);
ASSERT_EQ(167, round(Sensor::getOrZero(SensorType::Rpm)));
eth.executeUntil(1475000);
eth.setTimeAndInvokeEventsUs(1475000);
ASSERT_EQ(167, round(Sensor::getOrZero(SensorType::Rpm)));
TriggerCentral *tc = &engine->triggerCentral;
eth.executeUntil(3593000);
eth.setTimeAndInvokeEventsUs(3593000);
ASSERT_TRUE(tc->vvtState[0][0].getShaftSynchronized());
scheduling_s *head;