From e2abdabee28c2e3ebe1e401198bffe22f5090668 Mon Sep 17 00:00:00 2001 From: rusefi Date: Wed, 29 Jul 2020 21:53:59 -0400 Subject: [PATCH] NA6 progress --- firmware/config/engines/mazda_miata_1_6.cpp | 32 +++++++++++++++++++-- 1 file changed, 29 insertions(+), 3 deletions(-) diff --git a/firmware/config/engines/mazda_miata_1_6.cpp b/firmware/config/engines/mazda_miata_1_6.cpp index 7654505fe5..5b24a8da7d 100644 --- a/firmware/config/engines/mazda_miata_1_6.cpp +++ b/firmware/config/engines/mazda_miata_1_6.cpp @@ -386,14 +386,40 @@ void setMiataNA6_MAP_MRE(DECLARE_CONFIG_PARAMETER_SIGNATURE) { + engineConfiguration->useIdleTimingPidControl = true; + engineConfiguration->idleTimingPid.pFactor = 0.05; + engineConfiguration->idleTimingPid.iFactor = 0.0; + engineConfiguration->idleTimingPid.dFactor = 0.0; + engineConfiguration->idleTimingPid.minValue = -13; + engineConfiguration->idleTimingPid.maxValue = 13; + engineConfiguration->idleTimingPid.periodMs = 8; + engineConfiguration->idleTimingPidWorkZone = 150; + engineConfiguration->idlePidFalloffDeltaRpm = 50; + engineConfiguration->idleTimingPidDeadZone = 10; + + + // GPIOG_1: "Clutch Switch" + engineConfiguration->clutchDownPin = GPIOG_1; + // EFI_ADC_3: "22 - AN temp 4" + engineConfiguration->acSwitchAdc = EFI_ADC_3; + + engineConfiguration->warningLedPin = GPIOD_13; + engineConfiguration->triggerErrorPin = GPIOE_1; + + #if (BOARD_TLE8888_COUNT > 0) - // TLE8888_PIN_22: "34 - GP Out 2" - engineConfiguration->fanPin = TLE8888_PIN_22; + engineConfiguration->fanPin = GPIO_UNASSIGNED; + // TLE8888_PIN_23: "33 - GP Out 3" + engineConfiguration->malfunctionIndicatorPin = TLE8888_PIN_23; + + // GPIOA_15: "AUX J2 PA15" + engineConfiguration->fsioOutputPins[0] = GPIOA_15; // TLE8888_PIN_24: "43 - GP Out 4" - engineConfiguration->malfunctionIndicatorPin = TLE8888_PIN_24; + engineConfiguration->fsioOutputPins[1] = TLE8888_PIN_24; + #endif /* BOARD_TLE8888_COUNT */ }