2021-07-02 11:56:12 -07:00
|
|
|
/*
|
|
|
|
* @file nissan_vq.cpp
|
|
|
|
*
|
|
|
|
* Created on: Jul 2, 2021
|
|
|
|
* @author Andrey Belomutskiy, (c) 2012-2021
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include "nissan_vq.h"
|
|
|
|
|
2021-08-08 03:15:37 -07:00
|
|
|
void setHellen121nissanQR(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
|
2021-08-08 04:04:18 -07:00
|
|
|
engineConfiguration->trigger.type = TT_NISSAN_QR25;
|
|
|
|
|
|
|
|
engineConfiguration->specs.cylindersCount = 4;
|
|
|
|
engineConfiguration->specs.firingOrder = FO_1_3_4_2;
|
|
|
|
engineConfiguration->specs.displacement = 2;
|
|
|
|
strcpy(CONFIG(engineCode), "QR");
|
|
|
|
|
2021-08-11 15:29:02 -07:00
|
|
|
engineConfiguration->camInputs[1 * CAMS_PER_BANK] = GPIO_UNASSIGNED;
|
|
|
|
|
2021-08-08 04:04:18 -07:00
|
|
|
engineConfiguration->vvtMode[0] = VVT_NISSAN_VQ;
|
|
|
|
|
|
|
|
// we have this here and not in board_configuration.cpp so that unit test would get this value
|
|
|
|
engineConfiguration->invertCamVVTSignal = true;
|
|
|
|
|
|
|
|
engineConfiguration->vvtOffsets[0] = NISSAN_VQ_VVT_OFFSET;
|
2021-08-08 03:15:37 -07:00
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
void setHellen121nissanVQ(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
|
2021-07-16 21:27:56 -07:00
|
|
|
engineConfiguration->trigger.type = TT_NISSAN_VQ35;
|
2021-07-02 11:56:12 -07:00
|
|
|
|
2021-08-08 04:04:18 -07:00
|
|
|
engineConfiguration->specs.cylindersCount = 6;
|
|
|
|
engineConfiguration->specs.firingOrder = FO_1_2_3_4_5_6;
|
|
|
|
engineConfiguration->specs.displacement = 4;
|
|
|
|
strcpy(CONFIG(engineCode), "VQ");
|
|
|
|
|
2021-07-02 11:56:12 -07:00
|
|
|
engineConfiguration->vvtMode[0] = VVT_NISSAN_VQ;
|
2021-07-03 09:43:01 -07:00
|
|
|
|
2021-07-21 20:08:56 -07:00
|
|
|
// we have this here and not in board_configuration.cpp so that unit test would get this value
|
|
|
|
engineConfiguration->invertCamVVTSignal = true;
|
|
|
|
|
2021-07-03 09:43:01 -07:00
|
|
|
engineConfiguration->vvtOffsets[0] = NISSAN_VQ_VVT_OFFSET;
|
|
|
|
engineConfiguration->vvtOffsets[1 * CAMS_PER_BANK] = NISSAN_VQ_VVT_OFFSET - NISSAN_VQ_CAM_OFFSET;
|
2021-07-02 11:56:12 -07:00
|
|
|
}
|
2021-08-16 07:56:31 -07:00
|
|
|
|
|
|
|
void setHellen121nissanAltimaN16(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
|
|
|
|
// https://en.wikipedia.org/wiki/Nissan_QG_engine
|
|
|
|
// https://en.wikipedia.org/wiki/N-VCT
|
|
|
|
setHellen121nissanQR(PASS_CONFIG_PARAMETER_SIGNATURE);
|
|
|
|
engineConfiguration->specs.displacement = 1.8;
|
|
|
|
strcpy(CONFIG(engineCode), "N16");
|
|
|
|
|
|
|
|
}
|