|
|
|
@ -67,68 +67,6 @@ static void setMapVeTable() {
|
|
|
|
|
copyTable(config->veTable, hardCodedveTable);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static const uint8_t hardCodedVafveLoadBins[16] = {10, 20, 30, 40, 50, 60, 70, 80, 90, 100, 120, 140, 160, 180, 210, 240};
|
|
|
|
|
|
|
|
|
|
static const uint16_t hardCodedVafveRpmBins[16] = {650, 950, 1250, 1600, 1950, 2350, 2750, 3200, 3700, 4200, 4700, 5200, 5800, 6400, 7100, 7800};
|
|
|
|
|
|
|
|
|
|
static const uint8_t hardCodedVafveTable[16][16] = {
|
|
|
|
|
/* Generated by TS2C on Tue Aug 11 21:13:28 EDT 2020*/
|
|
|
|
|
{/* 0 10.000 *//* 0 650.0*/94, /* 1 950.0*/93, /* 2 1250.0*/95, /* 3 1600.0*/90, /* 4 1950.0*/90, /* 5 2350.0*/90, /* 6 2750.0*/90, /* 7 3200.0*/90, /* 8 3700.0*/90, /* 9 4200.0*/90, /* 10 4700.0*/90, /* 11 5200.0*/90, /* 12 5800.0*/100, /* 13 6400.0*/100, /* 14 7100.0*/100, /* 15 7800.0*/100, },
|
|
|
|
|
{/* 1 20.000 *//* 0 650.0*/94, /* 1 950.0*/97, /* 2 1250.0*/97, /* 3 1600.0*/93, /* 4 1950.0*/92, /* 5 2350.0*/90, /* 6 2750.0*/92, /* 7 3200.0*/95, /* 8 3700.0*/93, /* 9 4200.0*/93, /* 10 4700.0*/95, /* 11 5200.0*/97, /* 12 5800.0*/103, /* 13 6400.0*/104, /* 14 7100.0*/99, /* 15 7800.0*/100, },
|
|
|
|
|
{/* 2 30.000 *//* 0 650.0*/93, /* 1 950.0*/93, /* 2 1250.0*/96, /* 3 1600.0*/97, /* 4 1950.0*/97, /* 5 2350.0*/94, /* 6 2750.0*/92, /* 7 3200.0*/94, /* 8 3700.0*/92, /* 9 4200.0*/92, /* 10 4700.0*/98, /* 11 5200.0*/101, /* 12 5800.0*/103, /* 13 6400.0*/103, /* 14 7100.0*/99, /* 15 7800.0*/100, },
|
|
|
|
|
{/* 3 40.000 *//* 0 650.0*/100, /* 1 950.0*/97, /* 2 1250.0*/99, /* 3 1600.0*/97, /* 4 1950.0*/94, /* 5 2350.0*/91, /* 6 2750.0*/91, /* 7 3200.0*/93, /* 8 3700.0*/92, /* 9 4200.0*/91, /* 10 4700.0*/94, /* 11 5200.0*/99, /* 12 5800.0*/104, /* 13 6400.0*/104, /* 14 7100.0*/100, /* 15 7800.0*/100, },
|
|
|
|
|
{/* 4 50.000 *//* 0 650.0*/101, /* 1 950.0*/97, /* 2 1250.0*/98, /* 3 1600.0*/94, /* 4 1950.0*/92, /* 5 2350.0*/93, /* 6 2750.0*/94, /* 7 3200.0*/95, /* 8 3700.0*/94, /* 9 4200.0*/93, /* 10 4700.0*/94, /* 11 5200.0*/100, /* 12 5800.0*/104, /* 13 6400.0*/104, /* 14 7100.0*/100, /* 15 7800.0*/100, },
|
|
|
|
|
{/* 5 60.000 *//* 0 650.0*/102, /* 1 950.0*/100, /* 2 1250.0*/97, /* 3 1600.0*/95, /* 4 1950.0*/95, /* 5 2350.0*/94, /* 6 2750.0*/93, /* 7 3200.0*/95, /* 8 3700.0*/96, /* 9 4200.0*/95, /* 10 4700.0*/95, /* 11 5200.0*/101, /* 12 5800.0*/103, /* 13 6400.0*/104, /* 14 7100.0*/100, /* 15 7800.0*/100, },
|
|
|
|
|
{/* 6 70.000 *//* 0 650.0*/104, /* 1 950.0*/103, /* 2 1250.0*/99, /* 3 1600.0*/97, /* 4 1950.0*/97, /* 5 2350.0*/94, /* 6 2750.0*/94, /* 7 3200.0*/95, /* 8 3700.0*/95, /* 9 4200.0*/97, /* 10 4700.0*/97, /* 11 5200.0*/99, /* 12 5800.0*/101, /* 13 6400.0*/104, /* 14 7100.0*/99, /* 15 7800.0*/100, },
|
|
|
|
|
{/* 7 80.000 *//* 0 650.0*/104, /* 1 950.0*/104, /* 2 1250.0*/101, /* 3 1600.0*/99, /* 4 1950.0*/97, /* 5 2350.0*/94, /* 6 2750.0*/94, /* 7 3200.0*/94, /* 8 3700.0*/93, /* 9 4200.0*/95, /* 10 4700.0*/97, /* 11 5200.0*/99, /* 12 5800.0*/102, /* 13 6400.0*/104, /* 14 7100.0*/99, /* 15 7800.0*/100, },
|
|
|
|
|
{/* 8 90.000 *//* 0 650.0*/105, /* 1 950.0*/103, /* 2 1250.0*/103, /* 3 1600.0*/100, /* 4 1950.0*/97, /* 5 2350.0*/96, /* 6 2750.0*/95, /* 7 3200.0*/94, /* 8 3700.0*/90, /* 9 4200.0*/92, /* 10 4700.0*/95, /* 11 5200.0*/99, /* 12 5800.0*/103, /* 13 6400.0*/104, /* 14 7100.0*/99, /* 15 7800.0*/100, },
|
|
|
|
|
{/* 9 100.000 *//* 0 650.0*/105, /* 1 950.0*/103, /* 2 1250.0*/103, /* 3 1600.0*/103, /* 4 1950.0*/98, /* 5 2350.0*/99, /* 6 2750.0*/98, /* 7 3200.0*/92, /* 8 3700.0*/88, /* 9 4200.0*/89, /* 10 4700.0*/94, /* 11 5200.0*/100, /* 12 5800.0*/103, /* 13 6400.0*/104, /* 14 7100.0*/100, /* 15 7800.0*/100, },
|
|
|
|
|
{/* 10 120.000 *//* 0 650.0*/105, /* 1 950.0*/104, /* 2 1250.0*/104, /* 3 1600.0*/104, /* 4 1950.0*/104, /* 5 2350.0*/105, /* 6 2750.0*/103, /* 7 3200.0*/97, /* 8 3700.0*/92, /* 9 4200.0*/93, /* 10 4700.0*/100, /* 11 5200.0*/103, /* 12 5800.0*/104, /* 13 6400.0*/104, /* 14 7100.0*/100, /* 15 7800.0*/100, },
|
|
|
|
|
{/* 11 140.000 *//* 0 650.0*/100, /* 1 950.0*/100, /* 2 1250.0*/100, /* 3 1600.0*/100, /* 4 1950.0*/100, /* 5 2350.0*/100, /* 6 2750.0*/100, /* 7 3200.0*/102, /* 8 3700.0*/102, /* 9 4200.0*/100, /* 10 4700.0*/100, /* 11 5200.0*/100, /* 12 5800.0*/100, /* 13 6400.0*/100, /* 14 7100.0*/100, /* 15 7800.0*/100, },
|
|
|
|
|
{/* 12 160.000 *//* 0 650.0*/100, /* 1 950.0*/100, /* 2 1250.0*/100, /* 3 1600.0*/100, /* 4 1950.0*/100, /* 5 2350.0*/100, /* 6 2750.0*/100, /* 7 3200.0*/101, /* 8 3700.0*/101, /* 9 4200.0*/100, /* 10 4700.0*/100, /* 11 5200.0*/100, /* 12 5800.0*/100, /* 13 6400.0*/100, /* 14 7100.0*/100, /* 15 7800.0*/100, },
|
|
|
|
|
{/* 13 180.000 *//* 0 650.0*/100, /* 1 950.0*/100, /* 2 1250.0*/100, /* 3 1600.0*/100, /* 4 1950.0*/100, /* 5 2350.0*/100, /* 6 2750.0*/100, /* 7 3200.0*/100, /* 8 3700.0*/100, /* 9 4200.0*/100, /* 10 4700.0*/100, /* 11 5200.0*/100, /* 12 5800.0*/100, /* 13 6400.0*/100, /* 14 7100.0*/100, /* 15 7800.0*/100, },
|
|
|
|
|
{/* 14 210.000 *//* 0 650.0*/100, /* 1 950.0*/100, /* 2 1250.0*/100, /* 3 1600.0*/100, /* 4 1950.0*/100, /* 5 2350.0*/100, /* 6 2750.0*/100, /* 7 3200.0*/100, /* 8 3700.0*/100, /* 9 4200.0*/100, /* 10 4700.0*/100, /* 11 5200.0*/100, /* 12 5800.0*/100, /* 13 6400.0*/100, /* 14 7100.0*/100, /* 15 7800.0*/100, },
|
|
|
|
|
{/* 15 240.000 *//* 0 650.0*/100, /* 1 950.0*/100, /* 2 1250.0*/100, /* 3 1600.0*/100, /* 4 1950.0*/100, /* 5 2350.0*/100, /* 6 2750.0*/100, /* 7 3200.0*/100, /* 8 3700.0*/100, /* 9 4200.0*/100, /* 10 4700.0*/100, /* 11 5200.0*/100, /* 12 5800.0*/100, /* 13 6400.0*/100, /* 14 7100.0*/100, /* 15 7800.0*/100, },
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
/* Generated by TS2C on Tue Aug 11 21:13:28 EDT 2020*/
|
|
|
|
|
static void setVafVeTable() {
|
|
|
|
|
copyArray(config->veLoadBins, hardCodedVafveLoadBins);
|
|
|
|
|
copyArray(config->veRpmBins, hardCodedVafveRpmBins);
|
|
|
|
|
copyTable(config->veTable, hardCodedVafveTable);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static const uint8_t hardCodedVafignitionLoadBins[16] = {10, 16, 21, 26, 32, 39, 47, 56, 66, 77, 89, 101, 113, 125, 137, 149};
|
|
|
|
|
|
|
|
|
|
static const uint16_t hardCodedVafignitionRpmBins[16] = {500, 900, 1200, 1500, 1800, 2300, 2900, 3400, 3900, 4300, 4800, 5300, 5900, 6500, 7200, 8000};
|
|
|
|
|
|
|
|
|
|
static const uint8_t hardCodedVafignitionTable[16][16] = {
|
|
|
|
|
/* Generated by TS2C on Tue Aug 11 21:13:28 EDT 2020*/
|
|
|
|
|
{/* 0 10.000 *//* 0 500.0*/15, /* 1 900.0*/7, /* 2 1200.0*/14, /* 3 1500.0*/23, /* 4 1800.0*/31, /* 5 2300.0*/34, /* 6 2900.0*/35, /* 7 3400.0*/36, /* 8 3900.0*/37, /* 9 4300.0*/37, /* 10 4800.0*/38, /* 11 5300.0*/38, /* 12 5900.0*/38, /* 13 6500.0*/39, /* 14 7200.0*/40, /* 15 8000.0*/41, },
|
|
|
|
|
{/* 1 16.000 *//* 0 500.0*/15, /* 1 900.0*/7, /* 2 1200.0*/14, /* 3 1500.0*/23, /* 4 1800.0*/31, /* 5 2300.0*/34, /* 6 2900.0*/35, /* 7 3400.0*/36, /* 8 3900.0*/37, /* 9 4300.0*/37, /* 10 4800.0*/38, /* 11 5300.0*/38, /* 12 5900.0*/38, /* 13 6500.0*/39, /* 14 7200.0*/40, /* 15 8000.0*/41, },
|
|
|
|
|
{/* 2 21.000 *//* 0 500.0*/15, /* 1 900.0*/7, /* 2 1200.0*/13, /* 3 1500.0*/23, /* 4 1800.0*/31, /* 5 2300.0*/34, /* 6 2900.0*/34, /* 7 3400.0*/35, /* 8 3900.0*/36, /* 9 4300.0*/37, /* 10 4800.0*/37, /* 11 5300.0*/37, /* 12 5900.0*/38, /* 13 6500.0*/39, /* 14 7200.0*/39, /* 15 8000.0*/40, },
|
|
|
|
|
{/* 3 26.000 *//* 0 500.0*/15, /* 1 900.0*/7, /* 2 1200.0*/14, /* 3 1500.0*/23, /* 4 1800.0*/31, /* 5 2300.0*/33, /* 6 2900.0*/34, /* 7 3400.0*/35, /* 8 3900.0*/36, /* 9 4300.0*/36, /* 10 4800.0*/37, /* 11 5300.0*/37, /* 12 5900.0*/37, /* 13 6500.0*/38, /* 14 7200.0*/39, /* 15 8000.0*/40, },
|
|
|
|
|
{/* 4 32.000 *//* 0 500.0*/15, /* 1 900.0*/7, /* 2 1200.0*/15, /* 3 1500.0*/24, /* 4 1800.0*/30, /* 5 2300.0*/33, /* 6 2900.0*/34, /* 7 3400.0*/35, /* 8 3900.0*/35, /* 9 4300.0*/36, /* 10 4800.0*/36, /* 11 5300.0*/36, /* 12 5900.0*/37, /* 13 6500.0*/38, /* 14 7200.0*/38, /* 15 8000.0*/39, },
|
|
|
|
|
{/* 5 39.000 *//* 0 500.0*/15, /* 1 900.0*/7, /* 2 1200.0*/16, /* 3 1500.0*/24, /* 4 1800.0*/30, /* 5 2300.0*/32, /* 6 2900.0*/33, /* 7 3400.0*/34, /* 8 3900.0*/35, /* 9 4300.0*/35, /* 10 4800.0*/35, /* 11 5300.0*/35, /* 12 5900.0*/36, /* 13 6500.0*/37, /* 14 7200.0*/38, /* 15 8000.0*/38, },
|
|
|
|
|
{/* 6 47.000 *//* 0 500.0*/15, /* 1 900.0*/7, /* 2 1200.0*/17, /* 3 1500.0*/24, /* 4 1800.0*/30, /* 5 2300.0*/32, /* 6 2900.0*/33, /* 7 3400.0*/33, /* 8 3900.0*/34, /* 9 4300.0*/34, /* 10 4800.0*/35, /* 11 5300.0*/35, /* 12 5900.0*/35, /* 13 6500.0*/36, /* 14 7200.0*/37, /* 15 8000.0*/38, },
|
|
|
|
|
{/* 7 56.000 *//* 0 500.0*/16, /* 1 900.0*/8, /* 2 1200.0*/18, /* 3 1500.0*/24, /* 4 1800.0*/29, /* 5 2300.0*/31, /* 6 2900.0*/32, /* 7 3400.0*/33, /* 8 3900.0*/33, /* 9 4300.0*/33, /* 10 4800.0*/34, /* 11 5300.0*/34, /* 12 5900.0*/35, /* 13 6500.0*/35, /* 14 7200.0*/36, /* 15 8000.0*/37, },
|
|
|
|
|
{/* 8 66.000 *//* 0 500.0*/17, /* 1 900.0*/9, /* 2 1200.0*/20, /* 3 1500.0*/24, /* 4 1800.0*/29, /* 5 2300.0*/31, /* 6 2900.0*/31, /* 7 3400.0*/32, /* 8 3900.0*/32, /* 9 4300.0*/32, /* 10 4800.0*/33, /* 11 5300.0*/33, /* 12 5900.0*/34, /* 13 6500.0*/34, /* 14 7200.0*/35, /* 15 8000.0*/36, },
|
|
|
|
|
{/* 9 77.000 *//* 0 500.0*/18, /* 1 900.0*/13, /* 2 1200.0*/21, /* 3 1500.0*/25, /* 4 1800.0*/29, /* 5 2300.0*/30, /* 6 2900.0*/31, /* 7 3400.0*/31, /* 8 3900.0*/31, /* 9 4300.0*/31, /* 10 4800.0*/32, /* 11 5300.0*/32, /* 12 5900.0*/33, /* 13 6500.0*/33, /* 14 7200.0*/34, /* 15 8000.0*/35, },
|
|
|
|
|
{/* 10 89.000 *//* 0 500.0*/19, /* 1 900.0*/16, /* 2 1200.0*/23, /* 3 1500.0*/25, /* 4 1800.0*/28, /* 5 2300.0*/29, /* 6 2900.0*/30, /* 7 3400.0*/30, /* 8 3900.0*/30, /* 9 4300.0*/30, /* 10 4800.0*/31, /* 11 5300.0*/31, /* 12 5900.0*/31, /* 13 6500.0*/32, /* 14 7200.0*/33, /* 15 8000.0*/34, },
|
|
|
|
|
{/* 11 101.000 *//* 0 500.0*/19, /* 1 900.0*/20, /* 2 1200.0*/23, /* 3 1500.0*/25, /* 4 1800.0*/28, /* 5 2300.0*/29, /* 6 2900.0*/29, /* 7 3400.0*/29, /* 8 3900.0*/29, /* 9 4300.0*/29, /* 10 4800.0*/29, /* 11 5300.0*/30, /* 12 5900.0*/30, /* 13 6500.0*/31, /* 14 7200.0*/32, /* 15 8000.0*/33, },
|
|
|
|
|
{/* 12 113.000 *//* 0 500.0*/19, /* 1 900.0*/21, /* 2 1200.0*/23, /* 3 1500.0*/25, /* 4 1800.0*/27, /* 5 2300.0*/28, /* 6 2900.0*/28, /* 7 3400.0*/28, /* 8 3900.0*/28, /* 9 4300.0*/28, /* 10 4800.0*/28, /* 11 5300.0*/29, /* 12 5900.0*/29, /* 13 6500.0*/30, /* 14 7200.0*/31, /* 15 8000.0*/32, },
|
|
|
|
|
{/* 13 125.000 *//* 0 500.0*/19, /* 1 900.0*/21, /* 2 1200.0*/23, /* 3 1500.0*/25, /* 4 1800.0*/27, /* 5 2300.0*/27, /* 6 2900.0*/27, /* 7 3400.0*/27, /* 8 3900.0*/26, /* 9 4300.0*/27, /* 10 4800.0*/27, /* 11 5300.0*/27, /* 12 5900.0*/28, /* 13 6500.0*/29, /* 14 7200.0*/30, /* 15 8000.0*/30, },
|
|
|
|
|
{/* 14 137.000 *//* 0 500.0*/18, /* 1 900.0*/20, /* 2 1200.0*/23, /* 3 1500.0*/24, /* 4 1800.0*/26, /* 5 2300.0*/26, /* 6 2900.0*/26, /* 7 3400.0*/26, /* 8 3900.0*/25, /* 9 4300.0*/26, /* 10 4800.0*/26, /* 11 5300.0*/26, /* 12 5900.0*/27, /* 13 6500.0*/28, /* 14 7200.0*/29, /* 15 8000.0*/29, },
|
|
|
|
|
{/* 15 149.000 *//* 0 500.0*/16, /* 1 900.0*/20, /* 2 1200.0*/22, /* 3 1500.0*/24, /* 4 1800.0*/26, /* 5 2300.0*/26, /* 6 2900.0*/26, /* 7 3400.0*/25, /* 8 3900.0*/24, /* 9 4300.0*/25, /* 10 4800.0*/25, /* 11 5300.0*/25, /* 12 5900.0*/26, /* 13 6500.0*/27, /* 14 7200.0*/28, /* 15 8000.0*/28, },
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
/* Generated by TS2C on Tue Aug 11 21:13:28 EDT 2020*/
|
|
|
|
|
static void setVafIgnitionTable() {
|
|
|
|
|
copyArray(config->ignitionLoadBins, hardCodedVafignitionLoadBins);
|
|
|
|
|
copyArray(config->ignitionRpmBins, hardCodedVafignitionRpmBins);
|
|
|
|
|
copyTable(config->ignitionTable, hardCodedVafignitionTable);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#if IGN_LOAD_COUNT == DEFAULT_IGN_LOAD_COUNT
|
|
|
|
|
static const uint8_t mapBased16IgnitionTable[16][16] = {
|
|
|
|
|
/* Generated by TS2C on Wed Jun 15 21:22:11 EDT 2016*/
|
|
|
|
@ -301,34 +239,6 @@ void setMiataNA6_MAP_Frankenso() {
|
|
|
|
|
miataNAcommon();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void setMiataNA6_VAF_Frankenso() {
|
|
|
|
|
setMiataNA6_MAP_Frankenso();
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Stage 0 we only have OEM TPS switch
|
|
|
|
|
* See throttlePedalUpPin
|
|
|
|
|
*/
|
|
|
|
|
engineConfiguration->tps1_1AdcChannel = EFI_ADC_NONE;
|
|
|
|
|
// todo: MAF-based ignition table?
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* set engine_type 12
|
|
|
|
|
*/
|
|
|
|
|
void setMiataNA6_VAF_MRE() {
|
|
|
|
|
setMiataNA6_MAP_MRE();
|
|
|
|
|
|
|
|
|
|
engineConfiguration->fuelAlgorithm = LM_REAL_MAF;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
setVafVeTable();
|
|
|
|
|
setVafIgnitionTable();
|
|
|
|
|
|
|
|
|
|
#if (BOARD_TLE8888_COUNT > 0)
|
|
|
|
|
|
|
|
|
|
engineConfiguration->isSdCardEnabled = true;
|
|
|
|
|
#endif /* BOARD_TLE8888_COUNT */
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* set engine_type 66
|
|
|
|
|