From d48ed47fb971a7e06468c2f8c914763b0d4f31fe Mon Sep 17 00:00:00 2001 From: rusefillc Date: Wed, 11 Aug 2021 18:29:02 -0400 Subject: [PATCH] Nissan progress --- .../boards/hellen/hellen121nissan/board_configuration.cpp | 3 +++ firmware/config/engines/nissan_vq.cpp | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/firmware/config/boards/hellen/hellen121nissan/board_configuration.cpp b/firmware/config/boards/hellen/hellen121nissan/board_configuration.cpp index 94415f9504..026e684146 100644 --- a/firmware/config/boards/hellen/hellen121nissan/board_configuration.cpp +++ b/firmware/config/boards/hellen/hellen121nissan/board_configuration.cpp @@ -81,6 +81,9 @@ static void setupDefaultSensorInputs() { engineConfiguration->triggerInputPins[2] = GPIO_UNASSIGNED; // Direct hall-only cam input engineConfiguration->camInputs[0] = GPIOA_6; + // todo: remove from default since 4 cylinder does not use it + // todo: this requires unit test change + engineConfiguration->camInputs[1 * CAMS_PER_BANK] = GPIOA_7; engineConfiguration->tps1_1AdcChannel = EFI_ADC_4; engineConfiguration->tps1_2AdcChannel = EFI_ADC_8; diff --git a/firmware/config/engines/nissan_vq.cpp b/firmware/config/engines/nissan_vq.cpp index 540c58c2b9..01515b4ce1 100644 --- a/firmware/config/engines/nissan_vq.cpp +++ b/firmware/config/engines/nissan_vq.cpp @@ -15,6 +15,8 @@ void setHellen121nissanQR(DECLARE_CONFIG_PARAMETER_SIGNATURE) { engineConfiguration->specs.displacement = 2; strcpy(CONFIG(engineCode), "QR"); + engineConfiguration->camInputs[1 * CAMS_PER_BANK] = GPIO_UNASSIGNED; + engineConfiguration->vvtMode[0] = VVT_NISSAN_VQ; // we have this here and not in board_configuration.cpp so that unit test would get this value @@ -32,8 +34,6 @@ void setHellen121nissanVQ(DECLARE_CONFIG_PARAMETER_SIGNATURE) { engineConfiguration->specs.displacement = 4; strcpy(CONFIG(engineCode), "VQ"); - engineConfiguration->camInputs[1 * CAMS_PER_BANK] = GPIOA_7; - engineConfiguration->vvtMode[0] = VVT_NISSAN_VQ; // we have this here and not in board_configuration.cpp so that unit test would get this value