Nissan defaults

This commit is contained in:
rusefillc 2022-11-02 11:17:24 -04:00
parent 8faa664703
commit e4a70dc61c
3 changed files with 22 additions and 8 deletions

View File

@ -19,19 +19,19 @@ pins:
- pin: 8a - pin: 8a
function: USB - function: USB -
# OUT_C-IVC_L OUT_INJ7
- pin: 10a - pin: 10a
id: F13 id: F13
ts_name: 10 - VTC Left ts_name: 10 - VTC Left
class: outputs class: outputs
function: Intake VTC solenoid Bank 2 function: Intake VTC solenoid Bank 2
# OUT_C-IVC_L OUT_INJ7
# OUT_C-IVC_R OUT_INJ8
- pin: 11a - pin: 11a
id: F14 id: F14
ts_name: 11 - VTC Right ts_name: 11 - VTC Right
class: outputs class: outputs
function: Intake VTC solenoid Bank 1 function: Intake VTC solenoid Bank 1
# OUT_C-IVC_R OUT_INJ8
- pin: 13a - pin: 13a
function: Crank Sensor function: Crank Sensor

View File

@ -8,6 +8,9 @@
#include "pch.h" #include "pch.h"
#include "nissan_vq.h" #include "nissan_vq.h"
#include "hellen_meta.h"
#define NISSAN_VQ_VVT_OFFSET 157
void setHellen121nissanQR() { void setHellen121nissanQR() {
engineConfiguration->trigger.type = TT_NISSAN_QR25; engineConfiguration->trigger.type = TT_NISSAN_QR25;
@ -24,7 +27,7 @@ void setHellen121nissanQR() {
// we have this here and not in board_configuration.cpp so that unit test would get this value // we have this here and not in board_configuration.cpp so that unit test would get this value
engineConfiguration->invertCamVVTSignal = true; engineConfiguration->invertCamVVTSignal = true;
engineConfiguration->vvtOffsets[0] = NISSAN_VQ_VVT_OFFSET; engineConfiguration->vvtOffsets[0] = 157;
} }
@ -127,8 +130,22 @@ end
// we have this here and not in board_configuration.cpp so that unit test would get this value // we have this here and not in board_configuration.cpp so that unit test would get this value
engineConfiguration->invertCamVVTSignal = true; engineConfiguration->invertCamVVTSignal = true;
engineConfiguration->vvtOffsets[0] = NISSAN_VQ_VVT_OFFSET; engineConfiguration->vvtOffsets[0 * CAMS_PER_BANK] = NISSAN_VQ_VVT_OFFSET;
engineConfiguration->vvtOffsets[1 * CAMS_PER_BANK] = NISSAN_VQ_VVT_OFFSET - NISSAN_VQ_CAM_OFFSET; engineConfiguration->vvtOffsets[1 * CAMS_PER_BANK] = NISSAN_VQ_VVT_OFFSET + NISSAN_VQ_CAM_OFFSET;
// VVT closed loop
engineConfiguration->auxPid[0].pFactor = 2;
engineConfiguration->auxPid[0].iFactor = 0.5;
engineConfiguration->auxPid[0].dFactor = 0.05;
engineConfiguration->auxPid[0].offset = 50;
// engineConfiguration->auxPid[0].minValue = 20;
// engineConfiguration->auxPid[0].maxValue = 90;
#if HW_HELLEN
engineConfiguration->vvtPins[0 * CAMS_PER_BANK] = H176_LS_7;
engineConfiguration->vvtPins[1 * CAMS_PER_BANK] = H176_LS_8;
#endif
engineConfiguration->cranking.baseFuel = 35; engineConfiguration->cranking.baseFuel = 35;
} }

View File

@ -7,9 +7,6 @@
#pragma once #pragma once
#include "engine_configuration.h"
#define NISSAN_VQ_VVT_OFFSET -610
#define NISSAN_VQ_CAM_OFFSET -360 #define NISSAN_VQ_CAM_OFFSET -360
void setHellen121nissanVQ(); void setHellen121nissanVQ();