mirror of https://github.com/rusefi/rusefi.git
Retarding exhaust VVT which drives DI pump causes issues #5596
only: extra coverage
This commit is contained in:
parent
e4a3fb260d
commit
a2f147ebc0
|
@ -8,6 +8,14 @@
|
|||
#include "pch.h"
|
||||
using ::testing::_;
|
||||
|
||||
static size_t hpfpTotalToggle = 0;
|
||||
|
||||
static void assertToggleCounterExtra(EngineTestHelper *eth, size_t extra) {
|
||||
eth->smartFireTriggerEvents2(/*count*/4, /*delay*/ 16);
|
||||
ASSERT_EQ(hpfpTotalToggle + extra, enginePins.hpfpValve.pinToggleCounter);
|
||||
hpfpTotalToggle += extra;
|
||||
}
|
||||
|
||||
TEST(HPFP, IntegratedSchedule) {
|
||||
EngineTestHelper eth(engine_type_e::TEST_ENGINE, [](engine_configuration_s* engineConfiguration) {
|
||||
engineConfiguration->hpfpValvePin = Gpio::A2; // arbitrary
|
||||
|
@ -25,15 +33,25 @@ TEST(HPFP, IntegratedSchedule) {
|
|||
eth.setTriggerType(trigger_type_e::TT_TOOTHED_WHEEL);
|
||||
setCamOperationMode();
|
||||
engineConfiguration->isFasterEngineSpinUpEnabled = true;
|
||||
|
||||
engineConfiguration->hpfpCam = HPFP_CAM_IN1;
|
||||
|
||||
eth.smartFireTriggerEvents2(/*count*/8, /*delay*/ 16);
|
||||
ASSERT_EQ(937, round(Sensor::getOrZero(SensorType::Rpm)));
|
||||
|
||||
|
||||
hpfpTotalToggle = 10;
|
||||
/**
|
||||
* overall this is a pretty lame test but helps to know that the whole on/off/on dance does in fact happen for HPFP
|
||||
*/
|
||||
ASSERT_EQ(10, enginePins.hpfpValve.pinToggleCounter);
|
||||
ASSERT_EQ(hpfpTotalToggle, enginePins.hpfpValve.pinToggleCounter);
|
||||
|
||||
assertToggleCounterExtra(ð, 6);
|
||||
|
||||
// engine->triggerCentral.vvtPosition[0][0] = -50; // Bank 0
|
||||
|
||||
assertToggleCounterExtra(ð, 6);
|
||||
|
||||
assertToggleCounterExtra(ð, 6);
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue