Bandaid for 2735 (#2788)

* bandaid

* fix test

Co-authored-by: Matthew Kennedy <makenne@microsoft.com>
This commit is contained in:
Matthew Kennedy 2021-06-02 02:02:52 -07:00 committed by GitHub
parent 9aaa33e583
commit ab214f974c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 5 additions and 3 deletions

View File

@ -38,7 +38,7 @@ static ign_Map3D_t advanceMap("advance");
static ign_Map3D_t iatAdvanceCorrectionMap("iat corr");
// todo: reset this between cranking attempts?! #2735
static int minCrankingRpm = 0;
int minCrankingRpm = 0;
#if IGN_LOAD_COUNT == DEFAULT_IGN_LOAD_COUNT
static const float iatTimingRpmBins[IGN_LOAD_COUNT] = {880, 1260, 1640, 2020, 2400, 2780, 3000, 3380, 3760, 4140, 4520, 5000, 5700, 6500, 7200, 8000};

View File

@ -29,10 +29,12 @@ extern WarningCodeState unitTestWarningCodeState;
extern engine_configuration_s & activeConfiguration;
extern bool printTriggerDebug;
extern bool printFuelDebug;
extern int minCrankingRpm;
EngineTestHelperBase::EngineTestHelperBase() {
// todo: make this not a global variable, we need currentTimeProvider interface on engine
timeNowUs = 0;
minCrankingRpm = 0;
EnableToothLogger();
}

View File

@ -25,8 +25,8 @@ TEST(issues, issueOneCylinderSpecialCase968) {
eth.fireTriggerEvents2(/* count */ 1, 50 /* ms */);
ASSERT_EQ( 2, engine->executor.size()) << "first revolution(s)";
eth.assertEvent5("spark up#0", 0, (void*)turnSparkPinHigh, -44293);
eth.assertEvent5("spark down#0", 1, (void*)fireSparkAndPrepareNextSchedule, -38293);
eth.assertEvent5("spark up#0", 0, (void*)turnSparkPinHigh, -45167);
eth.assertEvent5("spark down#0", 1, (void*)fireSparkAndPrepareNextSchedule, -39167);
eth.fireTriggerEvents2(/* count */ 1, 50 /* ms */);