Take 2 on fixing PW tests
This commit is contained in:
parent
a6aafee534
commit
99abe431db
|
@ -33,8 +33,9 @@ void test_PW_No_Multiply()
|
|||
{
|
||||
test_PW_setCommon();
|
||||
|
||||
configPage2.multiplyMAP = false;
|
||||
configPage2.includeAFR = false;
|
||||
configPage2.multiplyMAP = 0;
|
||||
configPage2.includeAFR = 0;
|
||||
configPage2.incorporateAFR = 0;
|
||||
|
||||
uint16_t result = PW(REQ_FUEL, VE, MAP, corrections, injOpen);
|
||||
TEST_ASSERT_UINT16_WITHIN(PW_ALLOWED_ERROR, 2557, result);
|
||||
|
@ -47,6 +48,7 @@ void test_PW_MAP_Multiply()
|
|||
configPage2.multiplyMAP = true;
|
||||
currentStatus.baro = 100;
|
||||
configPage2.includeAFR = false;
|
||||
configPage2.incorporateAFR = 0;
|
||||
|
||||
uint16_t result = PW(REQ_FUEL, VE, MAP, corrections, injOpen);
|
||||
TEST_ASSERT_UINT16_WITHIN(PW_ALLOWED_ERROR, 2449, result);
|
||||
|
@ -59,7 +61,7 @@ void test_PW_AFR_Multiply()
|
|||
configPage2.multiplyMAP = false;
|
||||
currentStatus.baro = 100;
|
||||
configPage2.includeAFR = true;
|
||||
configPage2.incorporateAFR = true;
|
||||
configPage2.incorporateAFR = 0;
|
||||
configPage6.egoType = 2; //Set O2 sensor type to wideband
|
||||
currentStatus.runSecs = 20; configPage6.ego_sdelay = 10; //Ensure that the run time is longer than the O2 warmup time
|
||||
currentStatus.O2 = 150;
|
||||
|
@ -85,7 +87,7 @@ void test_PW_Large_Correction()
|
|||
|
||||
configPage2.multiplyMAP = false;
|
||||
configPage2.includeAFR = false;
|
||||
configPage2.incorporateAFR = true;
|
||||
configPage2.incorporateAFR = 0;
|
||||
|
||||
uint16_t result = PW(REQ_FUEL, VE, MAP, corrections, injOpen);
|
||||
TEST_ASSERT_UINT16_WITHIN(PW_ALLOWED_ERROR, 9268, result);
|
||||
|
@ -99,7 +101,7 @@ void test_PW_Very_Large_Correction()
|
|||
|
||||
configPage2.multiplyMAP = false;
|
||||
configPage2.includeAFR = false;
|
||||
configPage2.incorporateAFR = true;
|
||||
configPage2.incorporateAFR = 0;
|
||||
|
||||
uint16_t result = PW(REQ_FUEL, VE, MAP, corrections, injOpen);
|
||||
TEST_ASSERT_UINT16_WITHIN(PW_ALLOWED_ERROR+30, 21670, result); //Additional allowed error here
|
||||
|
|
Loading…
Reference in New Issue