From 91a6b12bf54af3cf807a97a0f1d4fe341355b1ac Mon Sep 17 00:00:00 2001 From: rusefillc Date: Mon, 4 Apr 2022 20:47:47 -0400 Subject: [PATCH] Gear detection based on RPM to VSS ratio #3779 --- firmware/config/engines/mazda_miata_vvt.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/firmware/config/engines/mazda_miata_vvt.cpp b/firmware/config/engines/mazda_miata_vvt.cpp index 040d63ffd8..baad70afcc 100644 --- a/firmware/config/engines/mazda_miata_vvt.cpp +++ b/firmware/config/engines/mazda_miata_vvt.cpp @@ -247,6 +247,15 @@ void setMazdaNB2VVTSettings() { engineConfiguration->auxPid[0].maxValue = 44; } +static void set4EC_AT() { + engineConfiguration->totalGearsCount = 4; + // http://www.new-cars.com/2003/mazda/mazda-miata-specs.html + engineConfiguration->gearRatio[0] = 2.45; + engineConfiguration->gearRatio[1] = 1.45; + engineConfiguration->gearRatio[2] = 1.0; + engineConfiguration->gearRatio[3] = 0.73; +} + /** * stuff common between NA1 and NB2 */ @@ -317,6 +326,7 @@ static void setCommonMazdaNB() { miataNA_setCltIdleCorrBins(); miataNA_setCltIdleRpmBins(); miataNA_setIacCoastingBins(); + set4EC_AT(); } static void setMazdaMiataEngineNB1Defaults() {