Nissan progress

This commit is contained in:
rusefillc 2021-08-11 18:04:57 -04:00
parent 90a0e47b04
commit e07e44fc9a
4 changed files with 11 additions and 2 deletions

View File

@ -81,7 +81,6 @@ static void setupDefaultSensorInputs() {
engineConfiguration->triggerInputPins[2] = GPIO_UNASSIGNED;
// Direct hall-only cam input
engineConfiguration->camInputs[0] = GPIOA_6;
engineConfiguration->camInputs[1 * CAMS_PER_BANK] = GPIOA_7;
engineConfiguration->tps1_1AdcChannel = EFI_ADC_4;
engineConfiguration->tps1_2AdcChannel = EFI_ADC_8;

View File

@ -48,6 +48,7 @@ pins:
ts_name: 14 - Cam Left
- pin: 21a
# Q307
id: GPIOD_9
class: outputs
ts_name: 21 - INJ_5
@ -55,6 +56,7 @@ pins:
type: inj
- pin: 22a
# Q309
id: GPIOD_11
class: outputs
ts_name: 22 - INJ_3
@ -62,6 +64,7 @@ pins:
type: inj
- pin: 23a
# Q312
id: GPIOG_7
class: outputs
ts_name: 23 - INJ_1
@ -88,6 +91,7 @@ pins:
function: IAT sensor
- pin: 40a
# Q311
id: GPIOF_12
class: outputs
ts_name: 40 - INJ_6
@ -95,6 +99,7 @@ pins:
type: inj
- pin: 41a
# Q310
id: GPIOD_10
class: outputs
ts_name: 41 - INJ_4
@ -102,6 +107,7 @@ pins:
type: inj
- pin: 42a
# Q305
id: GPIOG_8
class: outputs
ts_name: 42 - INJ_2

View File

@ -32,6 +32,8 @@ 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

View File

@ -144,6 +144,8 @@ void stopTriggerInputPins(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
}
}
static const char* const camNames[] = { "cam1", "cam2", "cam3", "cam4"};
void startTriggerInputPins(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
for (int i = 0; i < TRIGGER_SUPPORTED_CHANNELS; i++) {
if (isConfigurationChanged(triggerInputPins[i])) {
@ -154,7 +156,7 @@ void startTriggerInputPins(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
for (int i = 0; i < CAM_INPUTS_COUNT; i++) {
if (isConfigurationChanged(camInputs[i])) {
turnOnTriggerInputPin("Cam", i, false);
turnOnTriggerInputPin(camNames[i], i, false);
}
}
}