2019-11-23 19:55:21 -08:00
|
|
|
/*
|
|
|
|
* @file test_aux_valves.cpp
|
|
|
|
*
|
|
|
|
* @date: Nov 23, 2019
|
2020-04-18 19:46:22 -07:00
|
|
|
* @author Andrey Belomutskiy, (c) 2012-2020
|
2019-11-23 19:55:21 -08:00
|
|
|
*/
|
|
|
|
|
2021-07-25 22:05:17 -07:00
|
|
|
#include "pch.h"
|
|
|
|
|
2019-11-23 19:55:21 -08:00
|
|
|
#include "aux_valves.h"
|
|
|
|
|
|
|
|
TEST(misc, testAuxValves) {
|
2020-04-05 16:33:33 -07:00
|
|
|
Sensor::setMockValue(SensorType::DriverThrottleIntent, 0);
|
|
|
|
|
2019-11-23 19:55:21 -08:00
|
|
|
WITH_ENGINE_TEST_HELPER(NISSAN_PRIMERA);
|
|
|
|
|
|
|
|
engine->needTdcCallback = false;
|
|
|
|
|
|
|
|
setupSimpleTestEngineWithMafAndTT_ONE_trigger(ð, IM_SEQUENTIAL);
|
|
|
|
engineConfiguration->isInjectionEnabled = false;
|
|
|
|
|
|
|
|
eth.fireTriggerEvents2(2 /* count */ , 600 /* ms */);
|
|
|
|
ASSERT_EQ( 100, GET_RPM()) << "spinning-RPM#1";
|
|
|
|
|
2020-11-05 15:10:44 -08:00
|
|
|
eth.assertTriggerEvent("a0", 0, &engine->auxValves[0][0].open, (void*)&auxPlainPinTurnOn, 7, 86);
|
|
|
|
eth.assertTriggerEvent("a1", 1, &engine->auxValves[0][1].open, (void*)&auxPlainPinTurnOn, 3, 86);
|
|
|
|
eth.assertTriggerEvent("a2", 2, &engine->auxValves[1][0].open, (void*)&auxPlainPinTurnOn, 1, 86);
|
2019-11-23 19:55:21 -08:00
|
|
|
|
|
|
|
}
|