only: cherry picking: it's going to be painful

This commit is contained in:
Matthew Kennedy 2023-02-28 05:11:28 -05:00 committed by Andrey
parent e748e65638
commit 9ae8e18757
3 changed files with 6 additions and 1 deletions

View File

@ -243,6 +243,10 @@ static void logVvtFront(bool useOnlyRise, bool isImportantFront, TriggerValue fr
}
}
void hwHandleVvtCamSignal(bool isRising, efitick_t timestamp, int index) {
hwHandleVvtCamSignal(isRising ? TriggerValue::RISE : TriggerValue::FALL, timestamp, index);
}
// 'invertCamVVTSignal' is already accounted by the time this method is invoked
void hwHandleVvtCamSignal(TriggerValue front, efitick_t nowNt, int index) {
TriggerCentral *tc = getTriggerCentral();

View File

@ -215,6 +215,7 @@ void triggerInfo(void);
void hwHandleShaftSignal(int signalIndex, bool isRising, efitick_t timestamp);
void handleShaftSignal(int signalIndex, bool isRising, efitick_t timestamp);
void hwHandleVvtCamSignal(TriggerValue front, efitick_t timestamp, int index);
void hwHandleVvtCamSignal(bool isRising, efitick_t timestamp, int index);
void validateTriggerInputs();

View File

@ -186,5 +186,5 @@ TEST(trigger, testNB2CamInput) {
// actually position based on VVT!
ASSERT_EQ(totalRevolutionCountBeforeVvtSync + 3, engine->triggerCentral.triggerState.getCrankSynchronizationCounter());
EXPECT_EQ(39, waveChart.getSize());
EXPECT_EQ(40, waveChart.getSize());
}