From 6d7717365e4e68ed3b15a27895eb0654ee11561b Mon Sep 17 00:00:00 2001 From: rusefillc Date: Tue, 16 Jan 2024 10:51:19 -0500 Subject: [PATCH] only: inline method & dead code --- firmware/config/engines/mazda/mazda_miata.cpp | 29 ------------------- .../config/engines/mazda/mazda_miata_1_6.cpp | 17 ++++------- 2 files changed, 6 insertions(+), 40 deletions(-) diff --git a/firmware/config/engines/mazda/mazda_miata.cpp b/firmware/config/engines/mazda/mazda_miata.cpp index 20563e2548..2c780e9b9b 100644 --- a/firmware/config/engines/mazda/mazda_miata.cpp +++ b/firmware/config/engines/mazda/mazda_miata.cpp @@ -72,35 +72,6 @@ static const uint8_t miataNA8_maf_advance_table[16][16] = { {/*0 engineLoad=1.2 +29, /*12 5760.0*/+28, /*13 6173.0*/+28, /*14 6586.0*/+27, /*15 7000.0*/+27 } }; #endif -static void commonMiataNa() { - engineConfiguration->trigger.type = trigger_type_e::TT_MAZDA_MIATA_NA; - engineConfiguration->engineChartSize = 100; - - engineConfiguration->triggerInputPins[0] = Gpio::C6; // 2G YEL/BLU - engineConfiguration->triggerInputPins[1] = Gpio::A5; // 2E White CKP - - engineConfiguration->ignitionMode = IM_WASTED_SPARK; - - engineConfiguration->idle.solenoidFrequency = 160; - - // Frankenstein: high side #1 is PE8 - // Frankenstein: high side #2 is PE10 - // Frankenstein: high side #3 is PE12 - // Frankenstein: high side #4 is PE14 - // Frankenstein: high side #5 is PC9 - // Frankenstein: high side #6 is PC7 - - engineConfiguration->ignitionPins[0] = Gpio::E12; // Frankenstein: high side #3 - engineConfiguration->ignitionPins[1] = Gpio::E14; // Frankenstein: high side #4 - engineConfiguration->ignitionPins[2] = Gpio::Unassigned; - engineConfiguration->ignitionPins[3] = Gpio::Unassigned; - - engineConfiguration->cranking.baseFuel = 24; - - setCommonNTCSensor(&engineConfiguration->clt, 2700); - setCommonNTCSensor(&engineConfiguration->iat, 2700); -} - void common079721_2351() { engineConfiguration->engineChartSize = 300; diff --git a/firmware/config/engines/mazda/mazda_miata_1_6.cpp b/firmware/config/engines/mazda/mazda_miata_1_6.cpp index d9f5091c04..4d387458ee 100644 --- a/firmware/config/engines/mazda/mazda_miata_1_6.cpp +++ b/firmware/config/engines/mazda/mazda_miata_1_6.cpp @@ -212,16 +212,6 @@ void miataNAcommonEngineSettings() { engineConfiguration->vssToothCount = 4; } -static void miataNAcommon() { - - engineConfiguration->idle.solenoidPin = Gpio::B9; // this W61 <> W61 jumper, pin 3W - - engineConfiguration->ignitionPins[0] = Gpio::E14; // Frankenso high side - pin 1G - engineConfiguration->ignitionPins[1] = Gpio::Unassigned; - engineConfiguration->ignitionPins[2] = Gpio::C7; // Frankenso high side - pin 1H - engineConfiguration->ignitionPins[3] = Gpio::Unassigned; -} - /** * MIATA_NA6_MAP */ @@ -269,7 +259,12 @@ void setMiataNA6_MAP_Frankenso() { // W58 PE4 A/C fan relay out #endif /* EFI_UNIT_TEST */ - miataNAcommon(); + engineConfiguration->idle.solenoidPin = Gpio::B9; // this W61 <> W61 jumper, pin 3W + + engineConfiguration->ignitionPins[0] = Gpio::E14; // Frankenso high side - pin 1G + engineConfiguration->ignitionPins[1] = Gpio::Unassigned; + engineConfiguration->ignitionPins[2] = Gpio::C7; // Frankenso high side - pin 1H + engineConfiguration->ignitionPins[3] = Gpio::Unassigned; }