Question: something strange trigger errors #662

unit test progress
This commit is contained in:
rusefi 2019-01-12 15:51:40 -05:00
parent 8801fcfbe3
commit 3850e7e8ee
2 changed files with 7 additions and 5 deletions

View File

@ -64,7 +64,7 @@ EngineTestHelper::EngineTestHelper(engine_type_e engineType) : engine (&persiste
engine->engineConfigurationPtr->clt.adcChannel = (adc_channel_e)TEST_CLT_CHANNEL;
engine->engineConfigurationPtr->iat.adcChannel = (adc_channel_e)TEST_IAT_CHANNEL;
testCltValue = 1.492964;
// testIatValue = 1.492964;
testIatValue = 4.03646;
// this is needed to have valid CLT and IAT.
engine->updateSlowSensors(PASS_ENGINE_PARAMETER_SIGNATURE);

View File

@ -185,10 +185,10 @@ void test1995FordInline6TriggerDecoder(void) {
IgnitionEventList *ecl = &engine->ignitionEvents;
assertEqualsM("ford inline ignition events size", 1, ecl->isReady);
assertEqualsM("event index", 0, ecl->elements[0].dwellPosition.eventIndex);
assertEqualsM("angle offset#1", 7, ecl->elements[0].dwellPosition.angleOffset);
assertEqualsM("angle offset#1", 7.8621, ecl->elements[0].dwellPosition.angleOffset);
assertEqualsM("event index", 10, ecl->elements[5].dwellPosition.eventIndex);
assertEqualsM("angle offset#2", 7, ecl->elements[5].dwellPosition.angleOffset);
assertEqualsM("angle offset#2", 7.8621, ecl->elements[5].dwellPosition.angleOffset);
assertEqualsM("running dwell", 0.5, getSparkDwell(2000 PASS_ENGINE_PARAMETER_SUFFIX));
@ -314,6 +314,7 @@ void testRpmCalculator(void) {
engine->updateSlowSensors(PASS_ENGINE_PARAMETER_SIGNATURE);
engine->sensors.clt = 70; // 'testCltValue' does not give us exact number so we have to hack here. todo: migrate test
engine->sensors.iat = 30; // 'testIatValue' does not give us exact number so we have to hack here. todo: migrate test
assertEquals(0, engine->rpmCalculator.getRpm(PASS_ENGINE_PARAMETER_SIGNATURE));
@ -1249,7 +1250,7 @@ TEST(big, testMissedSpark299) {
engineConfiguration->isIgnitionEnabled = true;
engineConfiguration->isInjectionEnabled = false;
assertEqualsM("warningCounter#0", 2, unitTestWarningCodeState.warningCounter);
assertEqualsM("warningCounter#0", 0, unitTestWarningCodeState.warningCounter);
eth.fireRise(20);
@ -1319,5 +1320,6 @@ TEST(big, testMissedSpark299) {
eth.fireFall(20);
eth.executeActions();
assertEqualsM("warningCounter#1", 3, unitTestWarningCodeState.warningCounter);
assertEqualsM("warningCounter#1", 1, unitTestWarningCodeState.warningCounter);
assertEqualsM("warningCounter code", CUSTOM_SYNC_COUNT_MISMATCH, unitTestWarningCodeState.recentWarning.get(0));
}