rusEFI
The most advanced open source ECU
Loading...
Searching...
No Matches
Functions | Variables
mazda_miata_vvt.cpp File Reference

Functions

static void setMAFTransferFunction ()
 
static void setMazdaMiataNbInjectorLag ()
 
static void setCommonMazdaNB ()
 
static void setMazdaMiataEngineNB2Defaults ()
 
void setMiataNB2_Proteus_TCU ()
 
void setMazdaMiataNB1 ()
 
void setMazdaMiataNB2 ()
 
void setMazdaMiataNB2_36 ()
 

Variables

static const float vvt18RpmBins [VVT_TABLE_SIZE]
 
static const float vvt18LoadBins [VVT_TABLE_SIZE]
 
static const uint8_t SCRIPT_TABLE_vvt_target [VVT_TABLE_SIZE][VVT_TABLE_SIZE]
 
static const int8_t mapBased18vvtVeTable_NB_fuel_rail [16][16]
 
const float mazda_miata_nb2_RpmBins [VE_RPM_COUNT]
 
const float mazda_miata_nb2_LoadBins [VE_LOAD_COUNT]
 
static const float ignition18vvtRpmBins [IGN_RPM_COUNT]
 
static const float ignition18vvtLoadBins [IGN_LOAD_COUNT]
 
static const uint8_t mapBased18vvtTimingTable [16][16]
 
static const float mafTransferVolts [MAF_TRANSFER_SIZE]
 
static const float mafTransferKgH [MAF_TRANSFER_SIZE]
 

Function Documentation

◆ setCommonMazdaNB()

static void setCommonMazdaNB ( )
static

stuff common between NB1 and NB2

Definition at line 249 of file mazda_miata_vvt.cpp.

249 {
250 // Base engine
253 engineConfiguration->firingOrder = FO_1_3_4_2;
254
256
258 strcpy(engineConfiguration->engineMake, ENGINE_MAKE_MAZDA);
259 config->dynoCarCarMassKg = 1070;
260
261 engineConfiguration->injectionMode = IM_SEQUENTIAL;
262 engineConfiguration->ignitionMode = IM_WASTED_SPARK;
263
264 // Trigger
266 engineConfiguration->vvtMode[0] = VVT_MIATA_NB;
268
269 // Cranking
271 setTable(config->crankingCycleBaseFuel, 27.5); // this value for return-less NB miata fuel system, higher pressure
275
276 // Idle
280
284
292
293 // Fan
295
296 // Alternator
304
305 // Tach
307
308#if (VE_RPM_COUNT == 16) && (VE_LOAD_COUNT == 16)
309 // Tables
313#endif
314
315#if (IGN_RPM_COUNT == 16) && (IGN_LOAD_COUNT == 16)
319#endif
320
322
323 // Sensors
324
325 // TPS
326 // set tps_min 90
327 engineConfiguration->tpsMin = 100; // convert 12to10 bit (ADC/4)
328 // set tps_max 540
329 engineConfiguration->tpsMax = 650; // convert 12to10 bit (ADC/4)
330
331 // CLT/IAT
334
335 // MAF (todo: do we use this?)
337
339
343
344 // All factory miata setups end up with 1.12 speed sensor turns
345 // per wheel turn, by matching the speedo sensor gear to the
346 // diff ratio
347
348 // - 6 teeth on transmission output shaft
349 // - 23 teeth on speedometer sensor
350 // - 3.909 rear axle ratio
351 // 3.909 * 6 / 21 ~= 1.12
352 engineConfiguration->vssGearRatio = 3.909 * 6 / 21;
354}
static constexpr persistent_config_s * config
static constexpr engine_configuration_s * engineConfiguration
void miataNA_setCltIdleRpmBins()
void miataNA_setCltIdleCorrBins()
void miataNA_setIacCoastingBins()
static const float ignition18vvtRpmBins[IGN_RPM_COUNT]
static const int8_t mapBased18vvtVeTable_NB_fuel_rail[16][16]
const float mazda_miata_nb2_RpmBins[VE_RPM_COUNT]
static const uint8_t mapBased18vvtTimingTable[16][16]
static void setMazdaMiataNbInjectorLag()
static void setMAFTransferFunction()
static const float ignition18vvtLoadBins[IGN_LOAD_COUNT]
const float mazda_miata_nb2_LoadBins[VE_LOAD_COUNT]
uint16_t afterCrankingIACtaperDuration[CLT_CRANKING_TAPER_CURVE_SIZE]
float crankingCycleBaseFuel[CRANKING_CYCLE_CLT_SIZE][CRANKING_CURVE_SIZE]
scaled_channel< uint16_t, 10, 1 > veTable[VE_LOAD_COUNT][VE_RPM_COUNT]
scaled_channel< int16_t, 10, 1 > alternatorVoltageTargetTable[ALTERNATOR_VOLTAGE_TARGET_SIZE][ALTERNATOR_VOLTAGE_TARGET_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 setArrayValues(TValue(&array)[TSize], float value)
void setCommonNTCSensorParameters(ThermistorConf *thermistorConf)

Referenced by setMazdaMiataEngineNB2Defaults(), and setMazdaMiataNB1().

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

◆ setMAFTransferFunction()

static void setMAFTransferFunction ( )
static

Definition at line 217 of file mazda_miata_vvt.cpp.

217 {
220 for (int i = MAF_TRANSFER_SIZE;i<MAF_DECODING_COUNT;i++) {
221 config->mafDecodingBins[i] = config->mafDecodingBins[MAF_TRANSFER_SIZE - 1] + i * 0.01;
222 config->mafDecoding[i] = config->mafDecoding[MAF_TRANSFER_SIZE - 1];
223 }
224}
static const float mafTransferKgH[MAF_TRANSFER_SIZE]
static const float mafTransferVolts[MAF_TRANSFER_SIZE]

Referenced by setCommonMazdaNB().

Here is the caller graph for this function:

◆ setMazdaMiataEngineNB2Defaults()

static void setMazdaMiataEngineNB2Defaults ( )
static

http://miataturbo.wikidot.com/fuel-injectors 01-05 (purple) - #195500-4060

Definition at line 356 of file mazda_miata_vvt.cpp.

356 {
357 strcpy(engineConfiguration->engineCode, "NB2");
358
359 /**
360 * http://miataturbo.wikidot.com/fuel-injectors
361 * 01-05 (purple) - #195500-4060
362 */
364 engineConfiguration->fuelReferencePressure = 400; // 400 kPa, 58 psi
365 engineConfiguration->injectorCompensationMode = ICM_FixedRailPressure;
366
368
369#if VVT_TABLE_SIZE == 8
373#endif // VVT_TABLE_SIZE
374
375 // VVT closed loop
382
383 // Vehicle speed/gears
385 engineConfiguration->gearRatio[0] = 3.760;
386 engineConfiguration->gearRatio[1] = 2.269;
387 engineConfiguration->gearRatio[2] = 1.646;
388 engineConfiguration->gearRatio[3] = 1.257;
389 engineConfiguration->gearRatio[4] = 1.000;
390 engineConfiguration->gearRatio[5] = 0.843;
391
392 // These may need to change based on your real car
395}
static void setCommonMazdaNB()
static const float vvt18LoadBins[VVT_TABLE_SIZE]
static const uint8_t SCRIPT_TABLE_vvt_target[VVT_TABLE_SIZE][VVT_TABLE_SIZE]
static const float vvt18RpmBins[VVT_TABLE_SIZE]
scaled_channel< uint16_t, 100, 1 > gearRatio[TCU_GEAR_COUNT]

Referenced by setMazdaMiataNB2().

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

◆ setMazdaMiataNB1()

void setMazdaMiataNB1 ( )

Definition at line 458 of file mazda_miata_vvt.cpp.

458 {
460 strcpy(engineConfiguration->engineCode, "NB1");
461
463
464 // Vehicle speed/gears
466 engineConfiguration->gearRatio[0] = 3.136;
467 engineConfiguration->gearRatio[1] = 1.888;
468 engineConfiguration->gearRatio[2] = 1.330;
469 engineConfiguration->gearRatio[3] = 1.000;
470 engineConfiguration->gearRatio[4] = 0.814;
471
472 // These may need to change based on your real car
475}

Referenced by applyEngineType().

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

◆ setMazdaMiataNB2()

void setMazdaMiataNB2 ( )

set engine_type 69

Definition at line 477 of file mazda_miata_vvt.cpp.

477 {
479 strcpy(engineConfiguration->vehicleName, "H72 test");
480
481
482 // set tps_min 90
483 engineConfiguration->tpsMin = 110; // convert 12to10 bit (ADC/4)
484
485}
static void setMazdaMiataEngineNB2Defaults()

Referenced by applyEngineType(), and setMazdaMiataNB2_36().

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

◆ setMazdaMiataNB2_36()

void setMazdaMiataNB2_36 ( )

Definition at line 487 of file mazda_miata_vvt.cpp.

Referenced by applyEngineType().

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

◆ setMazdaMiataNbInjectorLag()

static void setMazdaMiataNbInjectorLag ( )
static

Definition at line 226 of file mazda_miata_vvt.cpp.

226 {
227#if VBAT_INJECTOR_CURVE_SIZE == 8
228static const float injectorLagVbattBins[VBAT_INJECTOR_CURVE_SIZE] = {
229 6.0, 8.0, 10.0, 11.0, 12.0, 13.0, 14.0, 15.0
230};
231 copyArray(engineConfiguration->injector.battLagCorrBattBins, injectorLagVbattBins);
232#endif // VBAT_INJECTOR_CURVE_SIZE
233#if VBAT_INJECTOR_CURVE_PRESSURE_SIZE == 2
234static const float injectorLagPressureBins[VBAT_INJECTOR_CURVE_PRESSURE_SIZE] = { 300, 600 };
235 copyArray(engineConfiguration->injector.battLagCorrPressBins, injectorLagPressureBins);
236#endif // VBAT_INJECTOR_CURVE_PRESSURE_SIZE
237#if (VBAT_INJECTOR_CURVE_PRESSURE_SIZE == 2) && (VBAT_INJECTOR_CURVE_SIZE == 8)
238static const float injectorLagCorrection[VBAT_INJECTOR_CURVE_PRESSURE_SIZE][VBAT_INJECTOR_CURVE_SIZE] = {
239 { 4.0, 3.0, 2.0, 1.7, 1.5, 1.35, 1.25, 1.20 },
240 { 4.0, 3.0, 2.0, 1.7, 1.5, 1.35, 1.25, 1.20 },
241};
243#endif
244}
scaled_channel< int16_t, 100, 1 > battLagCorrBattBins[VBAT_INJECTOR_CURVE_SIZE]
scaled_channel< uint32_t, 10, 1 > battLagCorrPressBins[VBAT_INJECTOR_CURVE_PRESSURE_SIZE]
scaled_channel< int16_t, 100, 1 > battLagCorrTable[VBAT_INJECTOR_CURVE_PRESSURE_SIZE][VBAT_INJECTOR_CURVE_SIZE]

Referenced by setCommonMazdaNB().

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

◆ setMiataNB2_Proteus_TCU()

void setMiataNB2_Proteus_TCU ( )

https://github.com/rusefi/rusefi/wiki/HOWTO-TCU-A42DE-on-Proteus

Definition at line 402 of file mazda_miata_vvt.cpp.

402 {
404
405 strcpy(engineConfiguration->engineCode, "NB2");
406 strcpy(engineConfiguration->engineMake, ENGINE_MAKE_MAZDA);
407 strcpy(engineConfiguration->vehicleName, "TCU test");
408
412
413
416
418
419 engineConfiguration->driveWheelRevPerKm = 544; // 205/50R15
422
423 // "Highside 2"
425 // "Highside 1"
427
428 // "Digital 1" green
431 // "Digital 6" white
434
435 // R
436 config->tcuSolenoidTable[0][0] = 1;
437 config->tcuSolenoidTable[0][1] = 0;
438 // P/N
439 config->tcuSolenoidTable[1][0] = 1;
440 config->tcuSolenoidTable[1][1] = 0;
441 // 1
442 config->tcuSolenoidTable[2][0] = 1;
443 config->tcuSolenoidTable[2][1] = 0;
444 // 2
445 config->tcuSolenoidTable[3][0] = 1;
446 config->tcuSolenoidTable[3][1] = 1;
447 // 3
448 config->tcuSolenoidTable[4][0] = 0;
449 config->tcuSolenoidTable[4][1] = 1;
450 // 4
451 config->tcuSolenoidTable[5][0] = 0;
452 config->tcuSolenoidTable[5][1] = 0;
453
454}
@ Unassigned
brain_input_pin_e triggerInputPins[TRIGGER_INPUT_PIN_COUNT]
uint8_t tcuSolenoidTable[TCU_SOLENOID_COUNT][TCU_GEAR_COUNT]

Referenced by applyEngineType().

Here is the caller graph for this function:

Variable Documentation

◆ ignition18vvtLoadBins

const float ignition18vvtLoadBins[IGN_LOAD_COUNT]
static
Initial value:
= {
25.0 , 29.10009765625 , 34.0 , 39.60009765625 ,
46.2001953125 , 53.89990234375 , 62.7998046875 ,
73.2001953125 , 85.400390625 , 99.5 , 116.0 ,
135.30078125 , 157.69921875 , 183.900390625 , 214.400390625 ,
250.0}

Definition at line 128 of file mazda_miata_vvt.cpp.

128 {
129 25.0 , 29.10009765625 , 34.0 , 39.60009765625 ,
130 46.2001953125 , 53.89990234375 , 62.7998046875 ,
131 73.2001953125 , 85.400390625 , 99.5 , 116.0 ,
132 135.30078125 , 157.69921875 , 183.900390625 , 214.400390625 ,
133 250.0};

Referenced by setCommonMazdaNB().

◆ ignition18vvtRpmBins

const float ignition18vvtRpmBins[IGN_RPM_COUNT]
static
Initial value:
= {
700.0, 850.0 , 943.0 ,
1112.0 , 1310.0 , 1545.0 ,
1821.0, 2146.0, 2530.0,
2982.0, 3515.0 , 4144.0 ,
4884.0 , 5757.0 , 6787.0, 8000.0}

Definition at line 121 of file mazda_miata_vvt.cpp.

121 {
122 700.0, 850.0 , 943.0 ,
123 1112.0 , 1310.0 , 1545.0 ,
124 1821.0, 2146.0, 2530.0,
125 2982.0, 3515.0 , 4144.0 ,
126 4884.0 , 5757.0 , 6787.0, 8000.0};

Referenced by setCommonMazdaNB().

◆ mafTransferKgH

const float mafTransferKgH[MAF_TRANSFER_SIZE]
static
Initial value:
= {
0.00,
0.00,
1.00,
3.00,
8.00,
19.00,
45.00,
100.00,
175.00,
350.00
}

Definition at line 203 of file mazda_miata_vvt.cpp.

203 {
204 0.00,
205 0.00,
206 1.00,
207 3.00,
208 8.00,
209 19.00,
210 45.00,
211 100.00,
212 175.00,
213 350.00
214};

Referenced by setMAFTransferFunction().

◆ mafTransferVolts

const float mafTransferVolts[MAF_TRANSFER_SIZE]
static
Initial value:
= {
0.50,
0.87,
1.07,
1.53,
1.85,
2.11,
2.46,
3.00,
3.51,
4.50
}

Definition at line 190 of file mazda_miata_vvt.cpp.

190 {
191 0.50,
192 0.87,
193 1.07,
194 1.53,
195 1.85,
196 2.11,
197 2.46,
198 3.00,
199 3.51,
200 4.50
201};

Referenced by setMAFTransferFunction().

◆ mapBased18vvtTimingTable

const uint8_t mapBased18vvtTimingTable[16][16]
static
Initial value:
= {
{14, 13, 13, 16, 21, 25, 28, 31, 34, 36, 38, 39, 40, 40, 40, 41, },
{14, 13, 13, 16, 21, 25, 28, 31, 34, 36, 38, 39, 40, 40, 40, 40, },
{14, 13, 13, 16, 21, 24, 27, 30, 33, 35, 37, 38, 39, 40, 40, 40, },
{15, 13, 13, 17, 21, 24, 27, 30, 33, 35, 36, 38, 38, 39, 39, 39, },
{15, 13, 13, 18, 21, 24, 26, 29, 32, 33, 36, 37, 38, 38, 38, 39, },
{15, 14, 14, 18, 21, 24, 26, 28, 30, 32, 34, 36, 37, 37, 38, 38, },
{15, 15, 14, 19, 21, 23, 25, 27, 29, 31, 33, 34, 35, 36, 36, 37, },
{16, 16, 15, 19, 21, 23, 24, 26, 28, 30, 31, 32, 33, 34, 34, 35, },
{16, 17, 16, 19, 20, 22, 23, 24, 26, 28, 29, 31, 31, 32, 33, 33, },
{16, 16, 17, 18, 19, 20, 21, 22, 23, 25, 26, 28, 28, 29, 30, 31, },
{15, 15, 16, 16, 17, 18, 19, 20, 21, 23, 24, 25, 26, 27, 28, 29, },
{13, 13, 14, 14, 15, 15, 17, 17, 19, 20, 22, 23, 24, 25, 26, 27, },
{11, 11, 11, 12, 12, 13, 14, 15, 16, 17, 19, 20, 21, 22, 24, 25, },
{8, 8, 9, 9, 9, 10, 11, 12, 13, 14, 16, 17, 18, 19, 21, 22, },
{5, 5, 5, 5, 6, 7, 7, 8, 9, 10, 12, 13, 14, 16, 17, 18, },
{1, 1, 1, 2, 2, 3, 3, 4, 5, 6, 7, 9, 10, 12, 13, 14, },
}

Definition at line 135 of file mazda_miata_vvt.cpp.

135 {
136 /* Generated by TS2C on Tue Apr 18 21:43:57 EDT 2017*/
137 {/* 0 25 *//* 0 700.0*/14, /* 1 850.0*/13, /* 2 943.0*/13, /* 3 1112.0*/16, /* 4 1310.0*/21, /* 5 1545.0*/25, /* 6 1821.0*/28, /* 7 2146.0*/31, /* 8 2530.0*/34, /* 9 2982.0*/36, /* 10 3515.0*/38, /* 11 4144.0*/39, /* 12 4884.0*/40, /* 13 5757.0*/40, /* 14 6787.0*/40, /* 15 8000.0*/41, },
138 {/* 1 29.100 *//* 0 700.0*/14, /* 1 850.0*/13, /* 2 943.0*/13, /* 3 1112.0*/16, /* 4 1310.0*/21, /* 5 1545.0*/25, /* 6 1821.0*/28, /* 7 2146.0*/31, /* 8 2530.0*/34, /* 9 2982.0*/36, /* 10 3515.0*/38, /* 11 4144.0*/39, /* 12 4884.0*/40, /* 13 5757.0*/40, /* 14 6787.0*/40, /* 15 8000.0*/40, },
139 {/* 2 34 *//* 0 700.0*/14, /* 1 850.0*/13, /* 2 943.0*/13, /* 3 1112.0*/16, /* 4 1310.0*/21, /* 5 1545.0*/24, /* 6 1821.0*/27, /* 7 2146.0*/30, /* 8 2530.0*/33, /* 9 2982.0*/35, /* 10 3515.0*/37, /* 11 4144.0*/38, /* 12 4884.0*/39, /* 13 5757.0*/40, /* 14 6787.0*/40, /* 15 8000.0*/40, },
140 {/* 3 39.600 *//* 0 700.0*/15, /* 1 850.0*/13, /* 2 943.0*/13, /* 3 1112.0*/17, /* 4 1310.0*/21, /* 5 1545.0*/24, /* 6 1821.0*/27, /* 7 2146.0*/30, /* 8 2530.0*/33, /* 9 2982.0*/35, /* 10 3515.0*/36, /* 11 4144.0*/38, /* 12 4884.0*/38, /* 13 5757.0*/39, /* 14 6787.0*/39, /* 15 8000.0*/39, },
141 {/* 4 46.200 *//* 0 700.0*/15, /* 1 850.0*/13, /* 2 943.0*/13, /* 3 1112.0*/18, /* 4 1310.0*/21, /* 5 1545.0*/24, /* 6 1821.0*/26, /* 7 2146.0*/29, /* 8 2530.0*/32, /* 9 2982.0*/33, /* 10 3515.0*/36, /* 11 4144.0*/37, /* 12 4884.0*/38, /* 13 5757.0*/38, /* 14 6787.0*/38, /* 15 8000.0*/39, },
142 {/* 5 53.900 *//* 0 700.0*/15, /* 1 850.0*/14, /* 2 943.0*/14, /* 3 1112.0*/18, /* 4 1310.0*/21, /* 5 1545.0*/24, /* 6 1821.0*/26, /* 7 2146.0*/28, /* 8 2530.0*/30, /* 9 2982.0*/32, /* 10 3515.0*/34, /* 11 4144.0*/36, /* 12 4884.0*/37, /* 13 5757.0*/37, /* 14 6787.0*/38, /* 15 8000.0*/38, },
143 {/* 6 62.800 *//* 0 700.0*/15, /* 1 850.0*/15, /* 2 943.0*/14, /* 3 1112.0*/19, /* 4 1310.0*/21, /* 5 1545.0*/23, /* 6 1821.0*/25, /* 7 2146.0*/27, /* 8 2530.0*/29, /* 9 2982.0*/31, /* 10 3515.0*/33, /* 11 4144.0*/34, /* 12 4884.0*/35, /* 13 5757.0*/36, /* 14 6787.0*/36, /* 15 8000.0*/37, },
144 {/* 7 73.200 *//* 0 700.0*/16, /* 1 850.0*/16, /* 2 943.0*/15, /* 3 1112.0*/19, /* 4 1310.0*/21, /* 5 1545.0*/23, /* 6 1821.0*/24, /* 7 2146.0*/26, /* 8 2530.0*/28, /* 9 2982.0*/30, /* 10 3515.0*/31, /* 11 4144.0*/32, /* 12 4884.0*/33, /* 13 5757.0*/34, /* 14 6787.0*/34, /* 15 8000.0*/35, },
145 {/* 8 85.400 *//* 0 700.0*/16, /* 1 850.0*/17, /* 2 943.0*/16, /* 3 1112.0*/19, /* 4 1310.0*/20, /* 5 1545.0*/22, /* 6 1821.0*/23, /* 7 2146.0*/24, /* 8 2530.0*/26, /* 9 2982.0*/28, /* 10 3515.0*/29, /* 11 4144.0*/31, /* 12 4884.0*/31, /* 13 5757.0*/32, /* 14 6787.0*/33, /* 15 8000.0*/33, },
146 {/* 9 99.500 *//* 0 700.0*/16, /* 1 850.0*/16, /* 2 943.0*/17, /* 3 1112.0*/18, /* 4 1310.0*/19, /* 5 1545.0*/20, /* 6 1821.0*/21, /* 7 2146.0*/22, /* 8 2530.0*/23, /* 9 2982.0*/25, /* 10 3515.0*/26, /* 11 4144.0*/28, /* 12 4884.0*/28, /* 13 5757.0*/29, /* 14 6787.0*/30, /* 15 8000.0*/31, },
147 {/* 10 116 *//* 0 700.0*/15, /* 1 850.0*/15, /* 2 943.0*/16, /* 3 1112.0*/16, /* 4 1310.0*/17, /* 5 1545.0*/18, /* 6 1821.0*/19, /* 7 2146.0*/20, /* 8 2530.0*/21, /* 9 2982.0*/23, /* 10 3515.0*/24, /* 11 4144.0*/25, /* 12 4884.0*/26, /* 13 5757.0*/27, /* 14 6787.0*/28, /* 15 8000.0*/29, },
148 {/* 11 135.301 *//* 0 700.0*/13, /* 1 850.0*/13, /* 2 943.0*/14, /* 3 1112.0*/14, /* 4 1310.0*/15, /* 5 1545.0*/15, /* 6 1821.0*/17, /* 7 2146.0*/17, /* 8 2530.0*/19, /* 9 2982.0*/20, /* 10 3515.0*/22, /* 11 4144.0*/23, /* 12 4884.0*/24, /* 13 5757.0*/25, /* 14 6787.0*/26, /* 15 8000.0*/27, },
149 {/* 12 157.699 *//* 0 700.0*/11, /* 1 850.0*/11, /* 2 943.0*/11, /* 3 1112.0*/12, /* 4 1310.0*/12, /* 5 1545.0*/13, /* 6 1821.0*/14, /* 7 2146.0*/15, /* 8 2530.0*/16, /* 9 2982.0*/17, /* 10 3515.0*/19, /* 11 4144.0*/20, /* 12 4884.0*/21, /* 13 5757.0*/22, /* 14 6787.0*/24, /* 15 8000.0*/25, },
150 {/* 13 183.900 *//* 0 700.0*/8, /* 1 850.0*/8, /* 2 943.0*/9, /* 3 1112.0*/9, /* 4 1310.0*/9, /* 5 1545.0*/10, /* 6 1821.0*/11, /* 7 2146.0*/12, /* 8 2530.0*/13, /* 9 2982.0*/14, /* 10 3515.0*/16, /* 11 4144.0*/17, /* 12 4884.0*/18, /* 13 5757.0*/19, /* 14 6787.0*/21, /* 15 8000.0*/22, },
151 {/* 14 214.400 *//* 0 700.0*/5, /* 1 850.0*/5, /* 2 943.0*/5, /* 3 1112.0*/5, /* 4 1310.0*/6, /* 5 1545.0*/7, /* 6 1821.0*/7, /* 7 2146.0*/8, /* 8 2530.0*/9, /* 9 2982.0*/10, /* 10 3515.0*/12, /* 11 4144.0*/13, /* 12 4884.0*/14, /* 13 5757.0*/16, /* 14 6787.0*/17, /* 15 8000.0*/18, },
152 {/* 15 250 *//* 0 700.0*/1, /* 1 850.0*/1, /* 2 943.0*/1, /* 3 1112.0*/2, /* 4 1310.0*/2, /* 5 1545.0*/3, /* 6 1821.0*/3, /* 7 2146.0*/4, /* 8 2530.0*/5, /* 9 2982.0*/6, /* 10 3515.0*/7, /* 11 4144.0*/9, /* 12 4884.0*/10, /* 13 5757.0*/12, /* 14 6787.0*/13, /* 15 8000.0*/14, },
153};

Referenced by setCommonMazdaNB().

◆ mapBased18vvtVeTable_NB_fuel_rail

const int8_t mapBased18vvtVeTable_NB_fuel_rail[16][16]
static
Initial value:
= {
{35, 36, 37, 35, 36, 37, 33, 31, 25, 24, 24, 25, 26, 29, 33, 36, },
{35, 37, 38, 37, 36, 37, 41, 39, 40, 37, 35, 36, 37, 35, 38, 40, },
{37, 40, 39, 37, 38, 41, 45, 47, 54, 48, 47, 55, 55, 49, 50, 51, },
{39, 44, 42, 40, 45, 48, 48, 52, 56, 53, 52, 58, 62, 57, 58, 58, },
{45, 56, 49, 45, 54, 53, 55, 54, 57, 55, 57, 59, 62, 59, 63, 62, },
{54, 61, 56, 52, 53, 58, 57, 59, 58, 58, 60, 64, 66, 64, 65, 63, },
{60, 67, 66, 60, 59, 59, 61, 63, 63, 60, 62, 69, 71, 67, 65, 63, },
{65, 70, 71, 67, 62, 61, 65, 63, 63, 64, 66, 69, 73, 71, 67, 65, },
{70, 74, 73, 75, 71, 66, 66, 65, 67, 69, 68, 72, 76, 75, 66, 65, },
{71, 75, 76, 74, 73, 72, 71, 70, 72, 72, 74, 76, 78, 76, 68, 64, },
{75, 76, 78, 76, 73, 74, 74, 74, 77, 76, 77, 76, 77, 76, 69, 65, },
{80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, },
{80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, },
{80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, },
{80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, },
{80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, },
}

Definition at line 87 of file mazda_miata_vvt.cpp.

87 {
88 /* Generated by TS2C on Tue Apr 18 21:46:03 EDT 2017*/
89 {/* 0 20 *//* 0 700.0*/35, /* 1 820.0*/36, /* 2 950.0*/37, /* 3 1100.0*/35, /* 4 1300.0*/36, /* 5 1550.0*/37, /* 6 1800.0*/33, /* 7 2150.0*/31, /* 8 2500.0*/25, /* 9 3000.0*/24, /* 10 3500.0*/24, /* 11 4150.0*/25, /* 12 4900.0*/26, /* 13 5800.0*/29, /* 14 6800.0*/33, /* 15 8000.0*/36, },
90 {/* 1 25 *//* 0 700.0*/35, /* 1 820.0*/37, /* 2 950.0*/38, /* 3 1100.0*/37, /* 4 1300.0*/36, /* 5 1550.0*/37, /* 6 1800.0*/41, /* 7 2150.0*/39, /* 8 2500.0*/40, /* 9 3000.0*/37, /* 10 3500.0*/35, /* 11 4150.0*/36, /* 12 4900.0*/37, /* 13 5800.0*/35, /* 14 6800.0*/38, /* 15 8000.0*/40, },
91 {/* 2 30 *//* 0 700.0*/37, /* 1 820.0*/40, /* 2 950.0*/39, /* 3 1100.0*/37, /* 4 1300.0*/38, /* 5 1550.0*/41, /* 6 1800.0*/45, /* 7 2150.0*/47, /* 8 2500.0*/54, /* 9 3000.0*/48, /* 10 3500.0*/47, /* 11 4150.0*/55, /* 12 4900.0*/55, /* 13 5800.0*/49, /* 14 6800.0*/50, /* 15 8000.0*/51, },
92 {/* 3 35 *//* 0 700.0*/39, /* 1 820.0*/44, /* 2 950.0*/42, /* 3 1100.0*/40, /* 4 1300.0*/45, /* 5 1550.0*/48, /* 6 1800.0*/48, /* 7 2150.0*/52, /* 8 2500.0*/56, /* 9 3000.0*/53, /* 10 3500.0*/52, /* 11 4150.0*/58, /* 12 4900.0*/62, /* 13 5800.0*/57, /* 14 6800.0*/58, /* 15 8000.0*/58, },
93 {/* 4 40 *//* 0 700.0*/45, /* 1 820.0*/56, /* 2 950.0*/49, /* 3 1100.0*/45, /* 4 1300.0*/54, /* 5 1550.0*/53, /* 6 1800.0*/55, /* 7 2150.0*/54, /* 8 2500.0*/57, /* 9 3000.0*/55, /* 10 3500.0*/57, /* 11 4150.0*/59, /* 12 4900.0*/62, /* 13 5800.0*/59, /* 14 6800.0*/63, /* 15 8000.0*/62, },
94 {/* 5 46 *//* 0 700.0*/54, /* 1 820.0*/61, /* 2 950.0*/56, /* 3 1100.0*/52, /* 4 1300.0*/53, /* 5 1550.0*/58, /* 6 1800.0*/57, /* 7 2150.0*/59, /* 8 2500.0*/58, /* 9 3000.0*/58, /* 10 3500.0*/60, /* 11 4150.0*/64, /* 12 4900.0*/66, /* 13 5800.0*/64, /* 14 6800.0*/65, /* 15 8000.0*/63, },
95 {/* 6 54 *//* 0 700.0*/60, /* 1 820.0*/67, /* 2 950.0*/66, /* 3 1100.0*/60, /* 4 1300.0*/59, /* 5 1550.0*/59, /* 6 1800.0*/61, /* 7 2150.0*/63, /* 8 2500.0*/63, /* 9 3000.0*/60, /* 10 3500.0*/62, /* 11 4150.0*/69, /* 12 4900.0*/71, /* 13 5800.0*/67, /* 14 6800.0*/65, /* 15 8000.0*/63, },
96 {/* 7 63 *//* 0 700.0*/65, /* 1 820.0*/70, /* 2 950.0*/71, /* 3 1100.0*/67, /* 4 1300.0*/62, /* 5 1550.0*/61, /* 6 1800.0*/65, /* 7 2150.0*/63, /* 8 2500.0*/63, /* 9 3000.0*/64, /* 10 3500.0*/66, /* 11 4150.0*/69, /* 12 4900.0*/73, /* 13 5800.0*/71, /* 14 6800.0*/67, /* 15 8000.0*/65, },
97 {/* 8 73 *//* 0 700.0*/70, /* 1 820.0*/74, /* 2 950.0*/73, /* 3 1100.0*/75, /* 4 1300.0*/71, /* 5 1550.0*/66, /* 6 1800.0*/66, /* 7 2150.0*/65, /* 8 2500.0*/67, /* 9 3000.0*/69, /* 10 3500.0*/68, /* 11 4150.0*/72, /* 12 4900.0*/76, /* 13 5800.0*/75, /* 14 6800.0*/66, /* 15 8000.0*/65, },
98 {/* 9 85 *//* 0 700.0*/71, /* 1 820.0*/75, /* 2 950.0*/76, /* 3 1100.0*/74, /* 4 1300.0*/73, /* 5 1550.0*/72, /* 6 1800.0*/71, /* 7 2150.0*/70, /* 8 2500.0*/72, /* 9 3000.0*/72, /* 10 3500.0*/74, /* 11 4150.0*/76, /* 12 4900.0*/78, /* 13 5800.0*/76, /* 14 6800.0*/68, /* 15 8000.0*/64, },
99 {/* 10 99 *//* 0 700.0*/75, /* 1 820.0*/76, /* 2 950.0*/78, /* 3 1100.0*/76, /* 4 1300.0*/73, /* 5 1550.0*/74, /* 6 1800.0*/74, /* 7 2150.0*/74, /* 8 2500.0*/77, /* 9 3000.0*/76, /* 10 3500.0*/77, /* 11 4150.0*/76, /* 12 4900.0*/77, /* 13 5800.0*/76, /* 14 6800.0*/69, /* 15 8000.0*/65, },
100 {/* 11 116 *//* 0 700.0*/80, /* 1 820.0*/80, /* 2 950.0*/80, /* 3 1100.0*/80, /* 4 1300.0*/80, /* 5 1550.0*/80, /* 6 1800.0*/80, /* 7 2150.0*/80, /* 8 2500.0*/80, /* 9 3000.0*/80, /* 10 3500.0*/80, /* 11 4150.0*/80, /* 12 4900.0*/80, /* 13 5800.0*/80, /* 14 6800.0*/80, /* 15 8000.0*/80, },
101 {/* 12 135 *//* 0 700.0*/80, /* 1 820.0*/80, /* 2 950.0*/80, /* 3 1100.0*/80, /* 4 1300.0*/80, /* 5 1550.0*/80, /* 6 1800.0*/80, /* 7 2150.0*/80, /* 8 2500.0*/80, /* 9 3000.0*/80, /* 10 3500.0*/80, /* 11 4150.0*/80, /* 12 4900.0*/80, /* 13 5800.0*/80, /* 14 6800.0*/80, /* 15 8000.0*/80, },
102 {/* 13 158 *//* 0 700.0*/80, /* 1 820.0*/80, /* 2 950.0*/80, /* 3 1100.0*/80, /* 4 1300.0*/80, /* 5 1550.0*/80, /* 6 1800.0*/80, /* 7 2150.0*/80, /* 8 2500.0*/80, /* 9 3000.0*/80, /* 10 3500.0*/80, /* 11 4150.0*/80, /* 12 4900.0*/80, /* 13 5800.0*/80, /* 14 6800.0*/80, /* 15 8000.0*/80, },
103 {/* 14 185 *//* 0 700.0*/80, /* 1 820.0*/80, /* 2 950.0*/80, /* 3 1100.0*/80, /* 4 1300.0*/80, /* 5 1550.0*/80, /* 6 1800.0*/80, /* 7 2150.0*/80, /* 8 2500.0*/80, /* 9 3000.0*/80, /* 10 3500.0*/80, /* 11 4150.0*/80, /* 12 4900.0*/80, /* 13 5800.0*/80, /* 14 6800.0*/80, /* 15 8000.0*/80, },
104 {/* 15 220 *//* 0 700.0*/80, /* 1 820.0*/80, /* 2 950.0*/80, /* 3 1100.0*/80, /* 4 1300.0*/80, /* 5 1550.0*/80, /* 6 1800.0*/80, /* 7 2150.0*/80, /* 8 2500.0*/80, /* 9 3000.0*/80, /* 10 3500.0*/80, /* 11 4150.0*/80, /* 12 4900.0*/80, /* 13 5800.0*/80, /* 14 6800.0*/80, /* 15 8000.0*/80, },
105};

Referenced by setCommonMazdaNB().

◆ mazda_miata_nb2_LoadBins

const float mazda_miata_nb2_LoadBins[VE_LOAD_COUNT]
Initial value:
= {20.0, 25.0, 30.0, 35.0,
40.0, 46.0, 54.0, 63.0,
73.0, 85.0, 99.0, 116.0,
135.0, 158.0, 185.0, 220.0}

Definition at line 113 of file mazda_miata_vvt.cpp.

113 {20.0, 25.0, 30.0, 35.0,
114 40.0, 46.0, 54.0, 63.0,
115 73.0, 85.0, 99.0, 116.0,
116 135.0, 158.0, 185.0, 220.0}

Referenced by setCommonMazdaNB().

◆ mazda_miata_nb2_RpmBins

const float mazda_miata_nb2_RpmBins[VE_RPM_COUNT]
Initial value:
= {700.0, 820.0, 950.0, 1100.0,
1300.0, 1550.0, 1800.0, 2150.0,
2500.0, 3000.0, 3500.0, 4150.0,
4900.0, 5800.0, 6800.0, 8000.0}

Definition at line 107 of file mazda_miata_vvt.cpp.

107 {700.0, 820.0, 950.0, 1100.0,
108 1300.0, 1550.0, 1800.0, 2150.0,
109 2500.0, 3000.0, 3500.0, 4150.0,
110 4900.0, 5800.0, 6800.0, 8000.0}

Referenced by setCommonMazdaNB().

◆ SCRIPT_TABLE_vvt_target

const uint8_t SCRIPT_TABLE_vvt_target[VVT_TABLE_SIZE][VVT_TABLE_SIZE]
static
Initial value:
= {
{1, 3, 10, 20, 27, 28, 11, 5, },
{3, 10, 19, 26, 30, 28, 11, 5, },
{7, 16, 24, 28, 30, 28, 11, 5, },
{11, 20, 27, 28, 30, 28, 11, 5, },
{13, 24, 31, 28, 30, 28, 11, 5, },
{15, 27, 33, 28, 30, 28, 11, 5, },
{17, 28, 33, 28, 30, 28, 11, 5, },
{17, 28, 33, 28, 30, 28, 11, 5, },
}

Definition at line 73 of file mazda_miata_vvt.cpp.

73 {
74 /* Generated by TS2C on Mon Feb 13 19:11:32 EST 2017*/
75 {/* 0 30 *//* 0 700.0*/1, /* 1 1000.0*/3, /* 2 2000.0*/10, /* 3 3000.0*/20, /* 4 3500.0*/27, /* 5 4500.0*/28, /* 6 5500.0*/11, /* 7 6500.0*/5, },
76 {/* 1 40 *//* 0 700.0*/3, /* 1 1000.0*/10, /* 2 2000.0*/19, /* 3 3000.0*/26, /* 4 3500.0*/30, /* 5 4500.0*/28, /* 6 5500.0*/11, /* 7 6500.0*/5, },
77 {/* 2 50 *//* 0 700.0*/7, /* 1 1000.0*/16, /* 2 2000.0*/24, /* 3 3000.0*/28, /* 4 3500.0*/30, /* 5 4500.0*/28, /* 6 5500.0*/11, /* 7 6500.0*/5, },
78 {/* 3 60 *//* 0 700.0*/11, /* 1 1000.0*/20, /* 2 2000.0*/27, /* 3 3000.0*/28, /* 4 3500.0*/30, /* 5 4500.0*/28, /* 6 5500.0*/11, /* 7 6500.0*/5, },
79 {/* 4 70 *//* 0 700.0*/13, /* 1 1000.0*/24, /* 2 2000.0*/31, /* 3 3000.0*/28, /* 4 3500.0*/30, /* 5 4500.0*/28, /* 6 5500.0*/11, /* 7 6500.0*/5, },
80 {/* 5 75 *//* 0 700.0*/15, /* 1 1000.0*/27, /* 2 2000.0*/33, /* 3 3000.0*/28, /* 4 3500.0*/30, /* 5 4500.0*/28, /* 6 5500.0*/11, /* 7 6500.0*/5, },
81 {/* 6 82 *//* 0 700.0*/17, /* 1 1000.0*/28, /* 2 2000.0*/33, /* 3 3000.0*/28, /* 4 3500.0*/30, /* 5 4500.0*/28, /* 6 5500.0*/11, /* 7 6500.0*/5, },
82 {/* 7 85 *//* 0 700.0*/17, /* 1 1000.0*/28, /* 2 2000.0*/33, /* 3 3000.0*/28, /* 4 3500.0*/30, /* 5 4500.0*/28, /* 6 5500.0*/11, /* 7 6500.0*/5, },
83};

Referenced by setMazdaMiataEngineNB2Defaults().

◆ vvt18LoadBins

const float vvt18LoadBins[VVT_TABLE_SIZE]
static
Initial value:
=
{30.0, 40.0, 50.0, 60.0, 70.0, 75.0, 82.0, 85.0}

Definition at line 69 of file mazda_miata_vvt.cpp.

70{30.0, 40.0, 50.0, 60.0, 70.0, 75.0, 82.0, 85.0}

Referenced by setMazdaMiataEngineNB2Defaults().

◆ vvt18RpmBins

const float vvt18RpmBins[VVT_TABLE_SIZE]
static
Initial value:
=
{700.0, 1000.0, 2000.0, 3000.0, 3500.0, 4500.0, 5500.0, 6500.0}

Definition at line 65 of file mazda_miata_vvt.cpp.

66{700.0, 1000.0, 2000.0, 3000.0, 3500.0, 4500.0, 5500.0, 6500.0}

Referenced by setMazdaMiataEngineNB2Defaults().

Go to the source code of this file.