rusEFI
The most advanced open source ECU
Loading...
Searching...
No Matches
Functions
mazda_miata_1_6.h File Reference

Functions

void setMiataNA6_MAP_Frankenso ()
 
void miataNAcommonEngineSettings ()
 
void setMazdaMiataNA6 ()
 
void setMazdaMiataNA94 ()
 

Function Documentation

◆ miataNAcommonEngineSettings()

void miataNAcommonEngineSettings ( )

set engine_type 20

http://miataturbo.wikidot.com/fuel-injectors 90-93 (Blue) - #195500-1970

Definition at line 98 of file mazda_miata_1_6.cpp.

98 {
101 engineConfiguration->firingOrder = FO_1_3_4_2;
106// engineConfiguration->totalGearsCount = 5;
107
111
113
116
117#if IGN_LOAD_COUNT == 16 && IGN_RPM_COUNT == 16
119#endif
120
121#ifdef HW_HELLEN_UAEFI
126
129 // Gpio::MM100_IN_D1; // HALL1
130 // Gpio::MM100_IN_D2; // HALL2
131 // engineConfiguration->triggerInputPins[1] =
132#endif // HW_HELLEN_UAEFI
133
139
140 engineConfiguration->ignitionMode = IM_WASTED_SPARK;
141
143
145 // below 20% this valve seems to be opening for fail-safe idle air
151
152 /**
153 * http://miataturbo.wikidot.com/fuel-injectors
154 * 90-93 (Blue) - #195500-1970
155 */
157
158 // set cranking_timing_angle 10
160
161 engineConfiguration->map.sensor.type = MT_GM_3_BAR;
162
163 // chartsize 200
166
168 strcpy(engineConfiguration->engineMake, ENGINE_MAKE_MAZDA);
169 strcpy(engineConfiguration->engineCode, "NA6");
170
171 // my car was originally a manual so proper TPS
172 engineConfiguration->tpsMin = 100; // convert 12to10 bit (ADC/4)
173 engineConfiguration->tpsMax = 650; // convert 12to10 bit (ADC/4)
174
176
177 // CLT/IAT
178 engineConfiguration->clt.config = { -20, 40, 80, 16150, 1150, 330, 2700 };
179 engineConfiguration->iat.config = { -20, 40, 80, 16150, 1150, 330, 2700 };
180
181 engineConfiguration->map.sensor.type = MT_GM_3_BAR;
182
183 // Vehicle speed/gears
185 engineConfiguration->gearRatio[0] = 3.136;
186 engineConfiguration->gearRatio[1] = 1.888;
187 engineConfiguration->gearRatio[2] = 1.330;
188 engineConfiguration->gearRatio[3] = 1.000;
189 engineConfiguration->gearRatio[4] = 0.814;
190
191 // These may need to change based on your real car
194
195 // This should be correct for factory matched speedo gears and diffs,
196 // but will need to be adjusted for mismatched combinations.
197
198 // - 6 teeth on transmission output shaft
199 // - 23 teeth on speedometer sensor
200 // - 4.3 rear axle ratio
201 // 4.3 * 6 / 23 ~= 1.12
202 engineConfiguration->vssGearRatio = 4.3 * 6 / 23;
204}
@ Unassigned
static constexpr persistent_config_s * config
static constexpr engine_configuration_s * engineConfiguration
static void setMapVeTable()
static const uint8_t mapBased16IgnitionTable[16][16]
static void setMafDecodingBins()
void miataNA_setCltIdleRpmBins()
void miataNA_setCltIdleCorrBins()
void miataNA_setIacCoastingBins()
void miataNA_setIgnitionTable()
scaled_channel< uint16_t, 100, 1 > gearRatio[TCU_GEAR_COUNT]
float crankingCycleBaseFuel[CRANKING_CYCLE_CLT_SIZE][CRANKING_CURVE_SIZE]
scaled_channel< int16_t, 10, 1 > ignitionTable[IGN_LOAD_COUNT][IGN_RPM_COUNT]
constexpr void copyTable(TDest(&dest)[N][M], const TSource(&source)[N][M], float multiply=1.0f)
constexpr void setTable(TElement(&dest)[N][M], const VElement value)
void setCommonNTCSensorParameters(ThermistorConf *thermistorConf)

Referenced by setMazdaMiata96(), setMazdaMiataNA6(), setMazdaMiataNA94(), and setMiataNA6_MAP_Frankenso().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ setMazdaMiataNA6()

void setMazdaMiataNA6 ( )

set engine_type 34

Definition at line 287 of file mazda_miata_1_6.cpp.

287 {
289 engineConfiguration->map.sensor.type = MT_MPX4250;
290}
void miataNAcommonEngineSettings()

Referenced by applyEngineType().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ setMazdaMiataNA94()

void setMazdaMiataNA94 ( )

http://miataturbo.wikidot.com/fuel-injectors 94-97 Tan - #195500-2180

Definition at line 264 of file mazda_miata_1_6.cpp.

Referenced by applyEngineType().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ setMiataNA6_MAP_Frankenso()

void setMiataNA6_MAP_Frankenso ( )

set engine_type 41

MIATA_NA6_MAP

Definition at line 209 of file mazda_miata_1_6.cpp.

209 {
212
213
214 // Frankenso middle plug 2J, W32 top <> W47 bottom "#5 Green" jumper, not OEM
216
218
219 // Wide band oxygen (from middle plug) to W52
220 engineConfiguration->afr.hwChannel = EFI_ADC_13; // PA3
221
222 engineConfiguration->vbattDividerCoeff = 9.75;// ((float) (8.2 + 33)) / 8.2 * 2;
223
225
226 engineConfiguration->injectionPins[0] = Gpio::D3; // #1&3 pin 3U
227 engineConfiguration->injectionPins[1] = Gpio::E2; // #2&4 pin 3V
230
231 // white wire from 1E - TOP of W4 to BOTTOM W62
233
234 // yellow wire from 1V/W22 to bottom of W48
237
238 // green wire from 1Q/W17 to bottom of W46
240
241#if ! EFI_UNIT_TEST
242 // W57 PE3 A/C compressor relay out
244 // W58 PE4 A/C fan relay out
245#endif /* EFI_UNIT_TEST */
246
247 engineConfiguration->idle.solenoidPin = Gpio::B9; // this W61 <> W61 jumper, pin 3W
248
249 engineConfiguration->ignitionPins[0] = Gpio::E14; // Frankenso high side - pin 1G
251 engineConfiguration->ignitionPins[2] = Gpio::C7; // Frankenso high side - pin 1H
253
254#if defined(HW_NUCLEO_F767) || defined(HW_NUCLEO_H743)
255 // default PA1-6 ADC pins conflict with the ethernet module on F767, used on HW CI
256 engineConfiguration->afr.hwChannel = EFI_ADC_36;
260#endif
261
262}
void setFrankensoConfiguration()

Referenced by applyEngineType().

Here is the call graph for this function:
Here is the caller graph for this function:

Go to the source code of this file.