36 lines
964 B
C++
36 lines
964 B
C++
#include "pch.h"
|
|
|
|
#include "logicdata_csv_reader.h"
|
|
|
|
static int getExhaustIndex() {
|
|
return getTriggerCentral()->vvtState[/*bankIndex*/0][/*camIndex*/1].currentCycle.current_index;
|
|
}
|
|
|
|
TEST(realk20, cranking) {
|
|
CsvReader reader(/* triggerCount */ 1, /* vvtCount */ 2);
|
|
|
|
reader.open("tests/trigger/resources/civic-K20-cranking.csv", NORMAL_ORDER, REVERSE_ORDER);
|
|
reader.twoBanksSingleCamMode = false;
|
|
|
|
EngineTestHelper eth (PROTEUS_HONDA_K);
|
|
|
|
while (reader.haveMore()) {
|
|
reader.processLine(ð);
|
|
|
|
// TODO
|
|
// float vvtI = engine->triggerCentral.getVVTPosition(/*bankIndex*/0, /*camIndex*/0);
|
|
// if (vvtI != 0) {
|
|
// EXPECT_TRUE(vvtI > -10 && vvtI < 10);
|
|
// }
|
|
|
|
float vvtE = engine->triggerCentral.getVVTPosition(/*bankIndex*/0, /*camIndex*/1);
|
|
if (vvtE != 0) {
|
|
EXPECT_TRUE(vvtE > -10 && vvtE < 10);
|
|
}
|
|
|
|
}
|
|
|
|
EXPECT_EQ(1182, round(Sensor::getOrZero(SensorType::Rpm)));
|
|
EXPECT_TRUE(getTriggerCentral()->triggerState.hasSynchronizedPhase());
|
|
}
|