no need for getTimeNowUs on ETH
This commit is contained in:
parent
4744515cf5
commit
b5e3694647
|
@ -278,10 +278,6 @@ void EngineTestHelper::setTimeAndInvokeEventsUs(int targetTime) {
|
|||
timeNowUs = targetTime;
|
||||
}
|
||||
|
||||
efitimeus_t EngineTestHelper::getTimeNowUs() {
|
||||
return timeNowUs;
|
||||
}
|
||||
|
||||
void EngineTestHelper::fireTriggerEvents(int count) {
|
||||
fireTriggerEvents2(count, 5); // 5ms
|
||||
}
|
||||
|
|
|
@ -104,7 +104,6 @@ public:
|
|||
int executeActions();
|
||||
void moveTimeForwardMs(float deltaTimeMs);
|
||||
void moveTimeForwardSec(float deltaTimeSec);
|
||||
efitimeus_t getTimeNowUs();
|
||||
|
||||
Engine engine;
|
||||
persistent_config_s persistentConfig;
|
||||
|
|
|
@ -54,7 +54,7 @@ TEST(OddFireRunningMode, hd) {
|
|||
|
||||
eth.assertRpm( 500, "spinning-RPM#1");
|
||||
|
||||
engine->executor.executeAll(eth.getTimeNowUs() + MS2US(1000000));
|
||||
engine->executor.executeAll(getTimeNowUs() + MS2US(1000000));
|
||||
|
||||
eth.fireTriggerEvents2(2 /* count */ , 60 /* ms */);
|
||||
ASSERT_EQ(IM_SEQUENTIAL, getCurrentInjectionMode());
|
||||
|
|
|
@ -222,7 +222,7 @@ TEST(misc, testRpmCalculator) {
|
|||
|
||||
eth.moveTimeForwardMs(5 /*ms*/);
|
||||
|
||||
int start = eth.getTimeNowUs();
|
||||
int start = getTimeNowUs();
|
||||
ASSERT_EQ( 485000, start) << "start value";
|
||||
|
||||
engine->periodicFastCallback();
|
||||
|
@ -928,11 +928,11 @@ TEST(big, testFuelSchedulerBug299smallAndLarge) {
|
|||
// assertInjectorDownEvent("L04@8", 8, MS2US(50.0), 0);
|
||||
|
||||
|
||||
engine->executor.executeAll(eth.getTimeNowUs() + 1);
|
||||
engine->executor.executeAll(getTimeNowUs() + 1);
|
||||
// injector goes high...
|
||||
ASSERT_FALSE(enginePins.injectors[0].currentLogicValue) << "injector@1";
|
||||
|
||||
engine->executor.executeAll(eth.getTimeNowUs() + MS2US(17.5) + 1);
|
||||
engine->executor.executeAll(getTimeNowUs() + MS2US(17.5) + 1);
|
||||
// injector does not go low too soon, that's a feature :)
|
||||
ASSERT_TRUE(enginePins.injectors[0].currentLogicValue) << "injector@2";
|
||||
|
||||
|
@ -948,7 +948,7 @@ TEST(big, testFuelSchedulerBug299smallAndLarge) {
|
|||
//todo assertInjectorDownEvent("L015@5", 5, MS2US(30), 0);
|
||||
|
||||
|
||||
engine->executor.executeAll(eth.getTimeNowUs() + MS2US(10) + 1);
|
||||
engine->executor.executeAll(getTimeNowUs() + MS2US(10) + 1);
|
||||
// end of combined injection
|
||||
ASSERT_FALSE(enginePins.injectors[0].currentLogicValue) << "injector@3";
|
||||
|
||||
|
|
|
@ -48,7 +48,7 @@ static void simulateTrigger(EngineTestHelper ð, TriggerAdcDetector &trigAdcSt
|
|||
static const float Vil = 0.3f * adcMaxVoltage;
|
||||
static const float Vih = 0.7f * adcMaxVoltage;
|
||||
|
||||
efitimeus_t startUs = eth.getTimeNowUs();
|
||||
efitimeus_t startUs = getTimeNowUs();
|
||||
|
||||
int prevLogicValue = -1;
|
||||
while (reader.haveMore()) {
|
||||
|
|
Loading…
Reference in New Issue