From f8aa71bf631ea771f49e9ae3422e83089535a483 Mon Sep 17 00:00:00 2001 From: rusefillc Date: Sun, 4 Apr 2021 23:03:51 -0400 Subject: [PATCH] refactoring --- firmware/controllers/trigger/trigger_central.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/firmware/controllers/trigger/trigger_central.cpp b/firmware/controllers/trigger/trigger_central.cpp index 8b46e97152..fb2467cfeb 100644 --- a/firmware/controllers/trigger/trigger_central.cpp +++ b/firmware/controllers/trigger/trigger_central.cpp @@ -131,7 +131,8 @@ void hwHandleVvtCamSignal(trigger_value_e front, efitick_t nowNt, int index DECL } - if (!vvtWithRealDecoder(engineConfiguration->vvtMode[camIndex]) && (CONFIG(vvtCamSensorUseRise) ^ (front != TV_FALL))) { + bool isImportantFront = (CONFIG(vvtCamSensorUseRise) ^ (front == TV_FALL)); + if (!vvtWithRealDecoder(engineConfiguration->vvtMode[camIndex]) && !isImportantFront) { // todo: there should be a way to always use real trigger code for this logic? return; }