better k gaps (#4623)

This commit is contained in:
Matthew Kennedy 2022-09-25 06:14:29 -07:00 committed by GitHub
parent b45f84fe20
commit ae6c44634b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 17 additions and 16 deletions

View File

@ -34,6 +34,7 @@ void setProteusHondaElement2003() {
engineConfiguration->vvtMode[0] = VVT_HONDA_K_INTAKE;
engineConfiguration->vvtMode[1] = VVT_HONDA_K_EXHAUST;
engineConfiguration->vvtOffsets[0] = -41;
engineConfiguration->vvtOffsets[1] = 171;
engineConfiguration->map.sensor.type = MT_DENSO183;
engineConfiguration->injector.flow = 270;

View File

@ -102,8 +102,8 @@ void configureHondaK_12_1(TriggerWaveform *s) {
void configureHondaK_4_1(TriggerWaveform *s) {
s->initialize(FOUR_STROKE_CAM_SENSOR, SyncEdge::Rise);
s->setTriggerSynchronizationGap3(/*gapIndex*/0, 1.11, 2.38);
s->setTriggerSynchronizationGap3(/*gapIndex*/1, 0.28, 0.474);
s->setTriggerSynchronizationGap3(/*gapIndex*/0, 1.5, 4.5); // nominal 2.27
s->setTriggerSynchronizationGap3(/*gapIndex*/1, 0.1, 0.5); // nominal 0.28
angle_t start = 55.5;
angle_t end = 70.5;

View File

@ -14,22 +14,22 @@ TEST(realk20, cranking) {
EngineTestHelper eth (PROTEUS_HONDA_K);
while (reader.haveMore() && reader.lineIndex() < 101) {
reader.processLine(&eth);
ASSERT_EQ(getExhaustIndex(), 0) << "Skipping until first exhaust event " << reader.lineIndex();
}
reader.haveMore();
reader.processLine(&eth);
ASSERT_EQ(getExhaustIndex(), 1) << "First exhaust event " << reader.lineIndex();
while (reader.haveMore()) {
reader.processLine(&eth);
ASSERT_TRUE(getExhaustIndex() != 0 ) << "At line " << reader.lineIndex();
// 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);
}
}
ASSERT_EQ(173, getExhaustIndex()); // huh? not synching?
ASSERT_EQ(1182, round(Sensor::getOrZero(SensorType::Rpm)));
EXPECT_EQ(1182, round(Sensor::getOrZero(SensorType::Rpm)));
EXPECT_TRUE(getTriggerCentral()->triggerState.hasSynchronizedPhase());
}