2021-05-25 14:15:48 -07:00
|
|
|
/*
|
|
|
|
* @file test_override_gaps.cpp
|
|
|
|
*
|
|
|
|
* Created on: May 25, 2021
|
|
|
|
* @author Andrey Belomutskiy, (c) 2012-2021
|
|
|
|
*/
|
|
|
|
|
2021-08-03 19:05:01 -07:00
|
|
|
#include "pch.h"
|
2021-05-25 14:15:48 -07:00
|
|
|
|
|
|
|
TEST(subaru, overrideGap) {
|
2021-11-16 13:52:11 -08:00
|
|
|
EngineTestHelper eth(FRANKENSO_MIATA_NA6_MAP);
|
2021-05-25 14:15:48 -07:00
|
|
|
|
2021-11-17 00:54:21 -08:00
|
|
|
engineConfiguration->overrideTriggerGaps = true;
|
|
|
|
engineConfiguration->gapTrackingLengthOverride = 2;
|
|
|
|
engineConfiguration->triggerGapOverrideFrom[0] = 0.75 * 11.3;
|
|
|
|
engineConfiguration->triggerGapOverrideTo[0] = 1.75 * 11.3;
|
|
|
|
engineConfiguration->triggerGapOverrideFrom[1] = 0.75;
|
|
|
|
engineConfiguration->triggerGapOverrideTo[1] = 1.25;
|
2021-05-25 14:15:48 -07:00
|
|
|
|
2021-11-16 01:15:29 -08:00
|
|
|
eth.setTriggerType(TT_SUBARU_7_WITHOUT_6);
|
2021-05-25 14:15:48 -07:00
|
|
|
|
|
|
|
ASSERT_EQ(2, engine->triggerCentral.triggerShape.gapTrackingLength);
|
|
|
|
|
|
|
|
ASSERT_EQ(FALSE, engine->triggerCentral.triggerShape.shapeDefinitionError) << "overrideGap shapeDefinitionError";
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|