From d8ce0556c43d3b5630269f8ac6df490ec21a26da Mon Sep 17 00:00:00 2001 From: rusEfi Date: Mon, 26 Dec 2016 23:02:07 -0500 Subject: [PATCH] auto-sync --- firmware/config/engines/mazda_miata_vvt.cpp | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/firmware/config/engines/mazda_miata_vvt.cpp b/firmware/config/engines/mazda_miata_vvt.cpp index a126fc735c..4dda14df61 100644 --- a/firmware/config/engines/mazda_miata_vvt.cpp +++ b/firmware/config/engines/mazda_miata_vvt.cpp @@ -81,12 +81,17 @@ void setMazdaMiata2003EngineConfiguration(DECLARE_ENGINE_PARAMETER_F) { boardConfiguration->alternatorControlPin = GPIOE_10; boardConfiguration->alternatorControlPinMode = OM_OPENDRAIN; - engineConfiguration->alternatorControl.offset = 35; - engineConfiguration->alternatorControl.pFactor = 60; - engineConfiguration->alternatorControl.iFactor = 10; + // enable altdebug + engineConfiguration->targetVBatt = 14.5; + engineConfiguration->alternatorControl.offset = 40; + engineConfiguration->alternatorControl.pFactor = 14; + engineConfiguration->alternatorControl.iFactor = 0.1; engineConfiguration->alternatorControl.dFactor = 0; engineConfiguration->alternatorDT = 10; + // set_idle_position 50 + boardConfiguration->manIdlePosition = 50; + // set vvt_mode 3 engineConfiguration->vvtMode = MIATA_NB2; @@ -123,6 +128,13 @@ void setMazdaMiata2003EngineConfiguration(DECLARE_ENGINE_PARAMETER_F) { memcpy(config->ignitionLoadBins, ve18vvtLoadBins, sizeof(ve18vvtLoadBins)); copyTimingTable(mapBased18vvtTimingTable, config->ignitionTable); + engineConfiguration->tpsMin = 100; // convert 12to10 bit (ADC/4) + engineConfiguration->tpsMax = 650; // convert 12to10 bit (ADC/4) + + // enable cylinder_cleanup + engineConfiguration->isCylinderCleanupEnabled = true; + + // 0.0825 // 0.1375