Merge branch 'master' of https://github.com/rusefi/rusefi
This commit is contained in:
commit
c9c32c8db6
|
@ -5,9 +5,7 @@ set LDSCRIPT = config/boards/NUCLEO_F767/STM32F76xxI.ld
|
|||
|
||||
set PROJECT_BOARD=microrusefi
|
||||
set PROJECT_CPU=ARCH_STM32F7
|
||||
set EXTRA_PARAMS=-DDUMMY ^
|
||||
-DEFI_FATAL_ERROR_PIN=GPIOE_3 ^
|
||||
-DDEFAULT_ENGINE_TYPE=MRE_BOARD_TEST
|
||||
set DEFAULT_ENGINE_TYPE = -DDEFAULT_ENGINE_TYPE=MRE_BOARD_TEST
|
||||
|
||||
call config/boards/common_make.bat
|
||||
|
||||
|
|
|
@ -5,9 +5,6 @@ set LDSCRIPT = config/boards/NUCLEO_F767/STM32F76xxI.ld
|
|||
|
||||
set PROJECT_BOARD=microrusefi
|
||||
set PROJECT_CPU=ARCH_STM32F7
|
||||
set EXTRA_PARAMS=-DDUMMY ^
|
||||
-DEFI_FATAL_ERROR_PIN=GPIOE_3 ^
|
||||
-DDEFAULT_ENGINE_TYPE=MICRO_RUS_EFI
|
||||
|
||||
call config/boards/common_make.bat
|
||||
|
||||
|
|
|
@ -7,5 +7,10 @@ BOARDINC = $(PROJECT_DIR)/config/boards/nucleo_f767 $(PROJECT_DIR)/config/stm32f
|
|||
|
||||
LDSCRIPT= $(PROJECT_DIR)/config/boards/nucleo_f767/STM32F76xxI.ld
|
||||
|
||||
# Set this if you want a default engine type other than normal MRE
|
||||
ifeq ($(DEFAULT_ENGINE_TYPE),)
|
||||
DEFAULT_ENGINE_TYPE = -DDEFAULT_ENGINE_TYPE=MICRO_RUS_EFI
|
||||
endif
|
||||
|
||||
# Override DEFAULT_ENGINE_TYPE
|
||||
DDEFS += -DSTM32F767xx -DEFI_USE_OSC=TRUE -DFIRMWARE_ID=\"microRusEfi\"
|
||||
DDEFS += -DSTM32F767xx -DEFI_USE_OSC=TRUE -DEFI_FATAL_ERROR_PIN=GPIOE_3 -DFIRMWARE_ID=\"microRusEfi\" $(DEFAULT_ENGINE_TYPE)
|
||||
|
|
|
@ -9,6 +9,7 @@ ENGINES_SRC_CPP = $(PROJECT_DIR)/config/engines/ford_aspire.cpp \
|
|||
$(PROJECT_DIR)/config/engines/mazda_miata_1_6.cpp \
|
||||
$(PROJECT_DIR)/config/engines/mazda_miata_na8.cpp \
|
||||
$(PROJECT_DIR)/config/engines/mazda_miata_vvt.cpp \
|
||||
$(PROJECT_DIR)/config/engines/mazda_miata_custom_hunchback.cpp \
|
||||
$(PROJECT_DIR)/config/engines/citroenBerlingoTU3JP.cpp \
|
||||
$(PROJECT_DIR)/config/engines/dodge_neon.cpp \
|
||||
$(PROJECT_DIR)/config/engines/ford_fiesta.cpp \
|
||||
|
|
|
@ -0,0 +1,152 @@
|
|||
/*
|
||||
* @file mazda_miata_custom_hunchback.cpp
|
||||
*
|
||||
* rusEfi Green Race car - based on NA6 body with VVT swap
|
||||
*
|
||||
* Hunchback - VVT engine with NA fuel rail
|
||||
* set engine_type 54
|
||||
*
|
||||
* It's using ZM-DE 2000 protege 36/1 trigger wheel ZM 01-11-408 and there are some minor issues :(
|
||||
*
|
||||
* MAZDA_MIATA_2003_NA_RAIL
|
||||
*
|
||||
* @date Sep 20, 2019
|
||||
* @author Andrey Belomutskiy, (c) 2012-2019
|
||||
*/
|
||||
|
||||
#include "mazda_miata_vvt.h"
|
||||
#include "custom_engine.h"
|
||||
#include "fsio_impl.h"
|
||||
#include "ego.h"
|
||||
#include "thermistors.h"
|
||||
|
||||
EXTERN_CONFIG;
|
||||
|
||||
// todo: why would this not work?
|
||||
//extern const float mazda_miata_nb2_RpmBins[FUEL_RPM_COUNT];
|
||||
//extern const float mazda_miata_nb2_LoadBins[FUEL_LOAD_COUNT];
|
||||
|
||||
const float mazda_miata_nb2_RpmBins[FUEL_RPM_COUNT] = {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}
|
||||
;
|
||||
|
||||
const float mazda_miata_nb2_LoadBins[FUEL_LOAD_COUNT] = {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}
|
||||
;
|
||||
|
||||
static float const fsio_table_dyno[FSIO_TABLE_8][FSIO_TABLE_8] = {
|
||||
/* Generated by TS2C on Sun May 07 09:35:13 EDT 2017*/
|
||||
{/* 0 30.000 *//* 0 700.0*/1.000, /* 1 1000.0*/3.000, /* 2 2000.0*/10.000, /* 3 3000.0*/20.000, /* 4 3500.0*/20.000, /* 5 4500.0*/16.000, /* 6 5500.0*/11.000, /* 7 6500.0*/10.000, },
|
||||
{/* 1 40.000 *//* 0 700.0*/3.000, /* 1 1000.0*/10.000, /* 2 2000.0*/19.000, /* 3 3000.0*/26.000, /* 4 3500.0*/20.000, /* 5 4500.0*/16.000, /* 6 5500.0*/11.000, /* 7 6500.0*/10.000, },
|
||||
{/* 2 50.000 *//* 0 700.0*/7.000, /* 1 1000.0*/16.000, /* 2 2000.0*/24.000, /* 3 3000.0*/28.000, /* 4 3500.0*/20.000, /* 5 4500.0*/16.000, /* 6 5500.0*/11.000, /* 7 6500.0*/10.000, },
|
||||
{/* 3 60.000 *//* 0 700.0*/11.000, /* 1 1000.0*/20.000, /* 2 2000.0*/27.000, /* 3 3000.0*/28.000, /* 4 3500.0*/20.000, /* 5 4500.0*/16.000, /* 6 5500.0*/11.000, /* 7 6500.0*/10.000, },
|
||||
{/* 4 70.000 *//* 0 700.0*/13.000, /* 1 1000.0*/24.000, /* 2 2000.0*/31.000, /* 3 3000.0*/28.000, /* 4 3500.0*/20.000, /* 5 4500.0*/16.000, /* 6 5500.0*/11.000, /* 7 6500.0*/10.000, },
|
||||
{/* 5 75.000 *//* 0 700.0*/15.000, /* 1 1000.0*/27.000, /* 2 2000.0*/33.000, /* 3 3000.0*/28.000, /* 4 3500.0*/20.000, /* 5 4500.0*/16.000, /* 6 5500.0*/11.000, /* 7 6500.0*/10.000, },
|
||||
{/* 6 82.000 *//* 0 700.0*/17.000, /* 1 1000.0*/28.000, /* 2 2000.0*/33.000, /* 3 3000.0*/28.000, /* 4 3500.0*/20.000, /* 5 4500.0*/16.000, /* 6 5500.0*/11.000, /* 7 6500.0*/10.000, },
|
||||
{/* 7 85.000 *//* 0 700.0*/17.000, /* 1 1000.0*/28.000, /* 2 2000.0*/33.000, /* 3 3000.0*/28.000, /* 4 3500.0*/20.000, /* 5 4500.0*/16.000, /* 6 5500.0*/11.000, /* 7 6500.0*/10.000, },
|
||||
};
|
||||
|
||||
#if DEFAULT_FUEL_LOAD_COUNT == FUEL_LOAD_COUNT
|
||||
static const fuel_table_t mapBased18vvtVeTable_NA_fuel_rail = {
|
||||
/* Generated by TS2C on Sun May 07 09:37:15 EDT 2017*/
|
||||
{/* 0 20.000 *//* 0 700.0*/35.685, /* 1 820.0*/36.982, /* 2 950.0*/37.200, /* 3 1100.0*/35.796, /* 4 1300.0*/36.149, /* 5 1550.0*/42.781, /* 6 1800.0*/45.281, /* 7 2150.0*/34.447, /* 8 2500.0*/26.662, /* 9 3000.0*/27.834, /* 10 3500.0*/29.178, /* 11 4150.0*/32.136, /* 12 4900.0*/36.009, /* 13 5800.0*/32.815, /* 14 6800.0*/34.415, /* 15 8000.0*/36.896, },
|
||||
{/* 1 25.000 *//* 0 700.0*/35.593, /* 1 820.0*/38.290, /* 2 950.0*/38.543, /* 3 1100.0*/44.567, /* 4 1300.0*/42.543, /* 5 1550.0*/51.690, /* 6 1800.0*/50.893, /* 7 2150.0*/45.882, /* 8 2500.0*/42.473, /* 9 3000.0*/41.591, /* 10 3500.0*/39.830, /* 11 4150.0*/43.369, /* 12 4900.0*/38.590, /* 13 5800.0*/36.461, /* 14 6800.0*/38.698, /* 15 8000.0*/40.621, },
|
||||
{/* 2 30.000 *//* 0 700.0*/37.539, /* 1 820.0*/41.105, /* 2 950.0*/51.838, /* 3 1100.0*/48.730, /* 4 1300.0*/47.475, /* 5 1550.0*/51.808, /* 6 1800.0*/49.862, /* 7 2150.0*/47.648, /* 8 2500.0*/56.394, /* 9 3000.0*/51.537, /* 10 3500.0*/52.022, /* 11 4150.0*/60.170, /* 12 4900.0*/59.945, /* 13 5800.0*/80.000, /* 14 6800.0*/80.000, /* 15 8000.0*/80.000, },
|
||||
{/* 3 35.000 *//* 0 700.0*/39.606, /* 1 820.0*/44.472, /* 2 950.0*/53.027, /* 3 1100.0*/50.709, /* 4 1300.0*/52.243, /* 5 1550.0*/55.301, /* 6 1800.0*/55.630, /* 7 2150.0*/64.738, /* 8 2500.0*/68.993, /* 9 3000.0*/57.959, /* 10 3500.0*/59.814, /* 11 4150.0*/68.593, /* 12 4900.0*/66.688, /* 13 5800.0*/80.000, /* 14 6800.0*/80.000, /* 15 8000.0*/80.000, },
|
||||
{/* 4 40.000 *//* 0 700.0*/45.470, /* 1 820.0*/57.758, /* 2 950.0*/53.028, /* 3 1100.0*/47.634, /* 4 1300.0*/62.921, /* 5 1550.0*/62.927, /* 6 1800.0*/63.611, /* 7 2150.0*/68.833, /* 8 2500.0*/72.751, /* 9 3000.0*/63.612, /* 10 3500.0*/74.939, /* 11 4150.0*/84.469, /* 12 4900.0*/75.026, /* 13 5800.0*/80.000, /* 14 6800.0*/80.000, /* 15 8000.0*/80.000, },
|
||||
{/* 5 46.000 *//* 0 700.0*/55.036, /* 1 820.0*/63.090, /* 2 950.0*/58.650, /* 3 1100.0*/53.830, /* 4 1300.0*/59.599, /* 5 1550.0*/64.794, /* 6 1800.0*/67.608, /* 7 2150.0*/73.556, /* 8 2500.0*/75.610, /* 9 3000.0*/82.211, /* 10 3500.0*/80.998, /* 11 4150.0*/86.837, /* 12 4900.0*/91.399, /* 13 5800.0*/80.000, /* 14 6800.0*/80.000, /* 15 8000.0*/80.000, },
|
||||
{/* 6 54.000 *//* 0 700.0*/62.275, /* 1 820.0*/69.333, /* 2 950.0*/67.104, /* 3 1100.0*/63.689, /* 4 1300.0*/67.871, /* 5 1550.0*/68.809, /* 6 1800.0*/77.741, /* 7 2150.0*/82.000, /* 8 2500.0*/90.645, /* 9 3000.0*/96.308, /* 10 3500.0*/94.651, /* 11 4150.0*/96.667, /* 12 4900.0*/92.464, /* 13 5800.0*/80.000, /* 14 6800.0*/80.000, /* 15 8000.0*/80.000, },
|
||||
{/* 7 63.000 *//* 0 700.0*/67.369, /* 1 820.0*/73.738, /* 2 950.0*/72.983, /* 3 1100.0*/73.412, /* 4 1300.0*/78.288, /* 5 1550.0*/73.531, /* 6 1800.0*/79.228, /* 7 2150.0*/92.174, /* 8 2500.0*/105.553, /* 9 3000.0*/105.886, /* 10 3500.0*/100.172, /* 11 4150.0*/106.089, /* 12 4900.0*/103.000, /* 13 5800.0*/103.000, /* 14 6800.0*/108.000, /* 15 8000.0*/108.000, },
|
||||
{/* 8 73.000 *//* 0 700.0*/70.760, /* 1 820.0*/74.892, /* 2 950.0*/75.153, /* 3 1100.0*/79.664, /* 4 1300.0*/89.987, /* 5 1550.0*/90.422, /* 6 1800.0*/95.789, /* 7 2150.0*/98.367, /* 8 2500.0*/96.231, /* 9 3000.0*/100.179, /* 10 3500.0*/92.473, /* 11 4150.0*/101.756, /* 12 4900.0*/103.000, /* 13 5800.0*/103.000, /* 14 6800.0*/108.000, /* 15 8000.0*/108.000, },
|
||||
{/* 9 85.000 *//* 0 700.0*/72.255, /* 1 820.0*/76.109, /* 2 950.0*/79.744, /* 3 1100.0*/80.844, /* 4 1300.0*/83.493, /* 5 1550.0*/82.232, /* 6 1800.0*/85.762, /* 7 2150.0*/97.047, /* 8 2500.0*/98.763, /* 9 3000.0*/104.394, /* 10 3500.0*/102.008, /* 11 4150.0*/115.132, /* 12 4900.0*/103.000, /* 13 5800.0*/103.000, /* 14 6800.0*/108.000, /* 15 8000.0*/108.000, },
|
||||
{/* 10 99.000 *//* 0 700.0*/78.899, /* 1 820.0*/77.096, /* 2 950.0*/79.895, /* 3 1100.0*/76.554, /* 4 1300.0*/78.057, /* 5 1550.0*/78.602, /* 6 1800.0*/83.254, /* 7 2150.0*/91.812, /* 8 2500.0*/101.884, /* 9 3000.0*/108.911, /* 10 3500.0*/103.629, /* 11 4150.0*/116.945, /* 12 4900.0*/108.542, /* 13 5800.0*/103.625, /* 14 6800.0*/108.000, /* 15 8000.0*/108.000, },
|
||||
{/* 11 116.000 *//* 0 700.0*/80.000, /* 1 820.0*/80.000, /* 2 950.0*/80.000, /* 3 1100.0*/80.000, /* 4 1300.0*/80.000, /* 5 1550.0*/80.000, /* 6 1800.0*/80.000, /* 7 2150.0*/100.000, /* 8 2500.0*/100.000, /* 9 3000.0*/100.000, /* 10 3500.0*/106.000, /* 11 4150.0*/116.600, /* 12 4900.0*/108.000, /* 13 5800.0*/108.000, /* 14 6800.0*/108.000, /* 15 8000.0*/108.000, },
|
||||
{/* 12 135.000 *//* 0 700.0*/80.000, /* 1 820.0*/80.000, /* 2 950.0*/80.000, /* 3 1100.0*/80.000, /* 4 1300.0*/80.000, /* 5 1550.0*/80.000, /* 6 1800.0*/80.000, /* 7 2150.0*/100.000, /* 8 2500.0*/100.000, /* 9 3000.0*/100.000, /* 10 3500.0*/106.000, /* 11 4150.0*/116.600, /* 12 4900.0*/108.000, /* 13 5800.0*/108.000, /* 14 6800.0*/108.000, /* 15 8000.0*/108.000, },
|
||||
{/* 13 158.000 *//* 0 700.0*/80.000, /* 1 820.0*/80.000, /* 2 950.0*/80.000, /* 3 1100.0*/80.000, /* 4 1300.0*/80.000, /* 5 1550.0*/80.000, /* 6 1800.0*/80.000, /* 7 2150.0*/80.000, /* 8 2500.0*/80.000, /* 9 3000.0*/80.000, /* 10 3500.0*/80.000, /* 11 4150.0*/80.000, /* 12 4900.0*/80.000, /* 13 5800.0*/80.000, /* 14 6800.0*/80.000, /* 15 8000.0*/80.000, },
|
||||
{/* 14 185.000 *//* 0 700.0*/80.000, /* 1 820.0*/80.000, /* 2 950.0*/80.000, /* 3 1100.0*/80.000, /* 4 1300.0*/80.000, /* 5 1550.0*/80.000, /* 6 1800.0*/80.000, /* 7 2150.0*/80.000, /* 8 2500.0*/80.000, /* 9 3000.0*/80.000, /* 10 3500.0*/80.000, /* 11 4150.0*/80.000, /* 12 4900.0*/80.000, /* 13 5800.0*/80.000, /* 14 6800.0*/80.000, /* 15 8000.0*/80.000, },
|
||||
{/* 15 220.000 *//* 0 700.0*/80.000, /* 1 820.0*/80.000, /* 2 950.0*/80.000, /* 3 1100.0*/80.000, /* 4 1300.0*/80.000, /* 5 1550.0*/80.000, /* 6 1800.0*/80.000, /* 7 2150.0*/80.000, /* 8 2500.0*/80.000, /* 9 3000.0*/80.000, /* 10 3500.0*/80.000, /* 11 4150.0*/80.000, /* 12 4900.0*/80.000, /* 13 5800.0*/80.000, /* 14 6800.0*/80.000, /* 15 8000.0*/80.000, },
|
||||
};
|
||||
#endif
|
||||
|
||||
static const float mazda_miata_nb2_targetAfrRpmBins[FUEL_RPM_COUNT] = {650.0, 800.0, 1050.0, 1300.0,
|
||||
1550.0, 1800.0, 2050.0, 2300.0,
|
||||
2550.0, 2800.0, 3050.0, 3300.0,
|
||||
3550.0, 3800.0, 4050.0, 6400.0}
|
||||
;
|
||||
|
||||
static const float mazda_miata_nb2_targetAfrLoadBins[FUEL_LOAD_COUNT] = {10.0, 20.0, 30.0, 40.0,
|
||||
50.0, 60.0, 70.0, 80.0,
|
||||
90.0, 100.0, 110.0, 120.0,
|
||||
130.0, 140.0, 150.0, 160.0};
|
||||
|
||||
static const fuel_table_t target_AFR_hunchback = {
|
||||
/* Generated by TS2C on Sun May 07 09:48:38 EDT 2017*/
|
||||
{/* 0 10.000 *//* 0 650.0*/14.000, /* 1 800.0*/14.000, /* 2 1050.0*/14.000, /* 3 1300.0*/14.000, /* 4 1550.0*/14.000, /* 5 1800.0*/14.000, /* 6 2050.0*/14.000, /* 7 2300.0*/14.000, /* 8 2550.0*/14.000, /* 9 2800.0*/14.000, /* 10 3050.0*/14.000, /* 11 3300.0*/14.000, /* 12 3550.0*/14.000, /* 13 3800.0*/14.000, /* 14 4050.0*/14.000, /* 15 6400.0*/14.000, },
|
||||
{/* 1 20.000 *//* 0 650.0*/14.000, /* 1 800.0*/14.000, /* 2 1050.0*/14.000, /* 3 1300.0*/14.000, /* 4 1550.0*/14.000, /* 5 1800.0*/14.000, /* 6 2050.0*/14.000, /* 7 2300.0*/14.000, /* 8 2550.0*/14.000, /* 9 2800.0*/14.000, /* 10 3050.0*/14.000, /* 11 3300.0*/14.000, /* 12 3550.0*/14.000, /* 13 3800.0*/14.000, /* 14 4050.0*/14.000, /* 15 6400.0*/14.000, },
|
||||
{/* 2 30.000 *//* 0 650.0*/14.000, /* 1 800.0*/14.000, /* 2 1050.0*/14.000, /* 3 1300.0*/14.000, /* 4 1550.0*/14.000, /* 5 1800.0*/14.000, /* 6 2050.0*/14.000, /* 7 2300.0*/14.000, /* 8 2550.0*/14.000, /* 9 2800.0*/14.000, /* 10 3050.0*/14.000, /* 11 3300.0*/14.000, /* 12 3550.0*/14.000, /* 13 3800.0*/14.000, /* 14 4050.0*/14.000, /* 15 6400.0*/14.000, },
|
||||
{/* 3 40.000 *//* 0 650.0*/14.000, /* 1 800.0*/14.000, /* 2 1050.0*/14.000, /* 3 1300.0*/14.000, /* 4 1550.0*/14.000, /* 5 1800.0*/14.000, /* 6 2050.0*/14.000, /* 7 2300.0*/14.000, /* 8 2550.0*/14.000, /* 9 2800.0*/14.000, /* 10 3050.0*/14.000, /* 11 3300.0*/14.000, /* 12 3550.0*/14.000, /* 13 3800.0*/14.000, /* 14 4050.0*/14.000, /* 15 6400.0*/14.000, },
|
||||
{/* 4 50.000 *//* 0 650.0*/14.000, /* 1 800.0*/14.000, /* 2 1050.0*/14.000, /* 3 1300.0*/14.000, /* 4 1550.0*/14.000, /* 5 1800.0*/14.000, /* 6 2050.0*/14.000, /* 7 2300.0*/14.000, /* 8 2550.0*/14.000, /* 9 2800.0*/14.000, /* 10 3050.0*/14.000, /* 11 3300.0*/14.000, /* 12 3550.0*/14.000, /* 13 3800.0*/14.000, /* 14 4050.0*/14.000, /* 15 6400.0*/14.000, },
|
||||
{/* 5 60.000 *//* 0 650.0*/11.700, /* 1 800.0*/11.700, /* 2 1050.0*/11.700, /* 3 1300.0*/11.700, /* 4 1550.0*/11.700, /* 5 1800.0*/11.700, /* 6 2050.0*/11.700, /* 7 2300.0*/11.700, /* 8 2550.0*/11.700, /* 9 2800.0*/11.700, /* 10 3050.0*/11.700, /* 11 3300.0*/11.700, /* 12 3550.0*/11.700, /* 13 3800.0*/11.700, /* 14 4050.0*/11.000, /* 15 6400.0*/11.000, },
|
||||
{/* 6 70.000 *//* 0 650.0*/11.700, /* 1 800.0*/11.700, /* 2 1050.0*/11.700, /* 3 1300.0*/11.700, /* 4 1550.0*/11.700, /* 5 1800.0*/11.700, /* 6 2050.0*/11.700, /* 7 2300.0*/11.700, /* 8 2550.0*/11.700, /* 9 2800.0*/11.700, /* 10 3050.0*/11.700, /* 11 3300.0*/11.700, /* 12 3550.0*/11.700, /* 13 3800.0*/11.700, /* 14 4050.0*/11.000, /* 15 6400.0*/11.000, },
|
||||
{/* 7 80.000 *//* 0 650.0*/11.700, /* 1 800.0*/11.700, /* 2 1050.0*/11.700, /* 3 1300.0*/11.700, /* 4 1550.0*/11.700, /* 5 1800.0*/11.700, /* 6 2050.0*/11.700, /* 7 2300.0*/11.700, /* 8 2550.0*/11.700, /* 9 2800.0*/11.700, /* 10 3050.0*/11.700, /* 11 3300.0*/11.700, /* 12 3550.0*/11.700, /* 13 3800.0*/11.700, /* 14 4050.0*/11.000, /* 15 6400.0*/11.000, },
|
||||
{/* 8 90.000 *//* 0 650.0*/11.700, /* 1 800.0*/11.700, /* 2 1050.0*/11.700, /* 3 1300.0*/11.700, /* 4 1550.0*/11.700, /* 5 1800.0*/11.700, /* 6 2050.0*/11.700, /* 7 2300.0*/11.700, /* 8 2550.0*/11.700, /* 9 2800.0*/11.700, /* 10 3050.0*/11.700, /* 11 3300.0*/11.700, /* 12 3550.0*/11.700, /* 13 3800.0*/11.700, /* 14 4050.0*/11.000, /* 15 6400.0*/11.000, },
|
||||
{/* 9 100.000 *//* 0 650.0*/11.700, /* 1 800.0*/11.700, /* 2 1050.0*/11.700, /* 3 1300.0*/11.700, /* 4 1550.0*/11.700, /* 5 1800.0*/11.700, /* 6 2050.0*/11.700, /* 7 2300.0*/11.700, /* 8 2550.0*/11.700, /* 9 2800.0*/11.700, /* 10 3050.0*/11.700, /* 11 3300.0*/11.700, /* 12 3550.0*/11.700, /* 13 3800.0*/11.700, /* 14 4050.0*/11.000, /* 15 6400.0*/11.000, },
|
||||
{/* 10 110.000 *//* 0 650.0*/11.700, /* 1 800.0*/11.700, /* 2 1050.0*/11.700, /* 3 1300.0*/11.700, /* 4 1550.0*/11.700, /* 5 1800.0*/11.700, /* 6 2050.0*/11.700, /* 7 2300.0*/11.700, /* 8 2550.0*/11.700, /* 9 2800.0*/11.700, /* 10 3050.0*/11.700, /* 11 3300.0*/11.700, /* 12 3550.0*/11.700, /* 13 3800.0*/11.700, /* 14 4050.0*/11.000, /* 15 6400.0*/11.000, },
|
||||
{/* 11 120.000 *//* 0 650.0*/11.700, /* 1 800.0*/11.700, /* 2 1050.0*/11.700, /* 3 1300.0*/11.700, /* 4 1550.0*/11.700, /* 5 1800.0*/11.700, /* 6 2050.0*/11.700, /* 7 2300.0*/11.700, /* 8 2550.0*/11.700, /* 9 2800.0*/11.700, /* 10 3050.0*/11.700, /* 11 3300.0*/11.700, /* 12 3550.0*/11.700, /* 13 3800.0*/11.700, /* 14 4050.0*/11.000, /* 15 6400.0*/11.000, },
|
||||
{/* 12 130.000 *//* 0 650.0*/11.700, /* 1 800.0*/11.700, /* 2 1050.0*/11.700, /* 3 1300.0*/11.700, /* 4 1550.0*/11.700, /* 5 1800.0*/11.700, /* 6 2050.0*/11.700, /* 7 2300.0*/11.700, /* 8 2550.0*/11.700, /* 9 2800.0*/11.700, /* 10 3050.0*/11.700, /* 11 3300.0*/11.700, /* 12 3550.0*/11.700, /* 13 3800.0*/11.700, /* 14 4050.0*/11.000, /* 15 6400.0*/11.000, },
|
||||
{/* 13 140.000 *//* 0 650.0*/11.700, /* 1 800.0*/11.700, /* 2 1050.0*/11.700, /* 3 1300.0*/11.700, /* 4 1550.0*/11.700, /* 5 1800.0*/11.700, /* 6 2050.0*/11.700, /* 7 2300.0*/11.700, /* 8 2550.0*/11.700, /* 9 2800.0*/11.700, /* 10 3050.0*/11.700, /* 11 3300.0*/11.700, /* 12 3550.0*/11.700, /* 13 3800.0*/11.700, /* 14 4050.0*/11.000, /* 15 6400.0*/11.000, },
|
||||
{/* 14 150.000 *//* 0 650.0*/11.700, /* 1 800.0*/11.700, /* 2 1050.0*/11.700, /* 3 1300.0*/11.700, /* 4 1550.0*/11.700, /* 5 1800.0*/11.700, /* 6 2050.0*/11.700, /* 7 2300.0*/11.700, /* 8 2550.0*/11.700, /* 9 2800.0*/11.700, /* 10 3050.0*/11.700, /* 11 3300.0*/11.700, /* 12 3550.0*/11.700, /* 13 3800.0*/11.700, /* 14 4050.0*/11.000, /* 15 6400.0*/11.000, },
|
||||
{/* 15 160.000 *//* 0 650.0*/11.700, /* 1 800.0*/11.700, /* 2 1050.0*/11.700, /* 3 1300.0*/11.700, /* 4 1550.0*/11.700, /* 5 1800.0*/11.700, /* 6 2050.0*/11.700, /* 7 2300.0*/11.700, /* 8 2550.0*/11.700, /* 9 2800.0*/11.700, /* 10 3050.0*/11.700, /* 11 3300.0*/11.700, /* 12 3550.0*/11.700, /* 13 3800.0*/11.700, /* 14 4050.0*/11.000, /* 15 6400.0*/11.000, },
|
||||
};
|
||||
|
||||
void setMazdaMiata2003EngineConfigurationNaFuelRail(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
|
||||
setMazdaMiata2003EngineConfiguration(PASS_CONFIG_PARAMETER_SIGNATURE);
|
||||
|
||||
// todo: there should be a better way?
|
||||
for (int loadIndex = 0; loadIndex < FSIO_TABLE_8; loadIndex++) {
|
||||
for (int rpmIndex = 0; rpmIndex < FSIO_TABLE_8; rpmIndex++) {
|
||||
config->fsioTable1[loadIndex][rpmIndex] = fsio_table_dyno[loadIndex][rpmIndex];
|
||||
}
|
||||
}
|
||||
memcpy(config->veRpmBins, mazda_miata_nb2_RpmBins, sizeof(mazda_miata_nb2_RpmBins));
|
||||
memcpy(config->veLoadBins, mazda_miata_nb2_LoadBins, sizeof(mazda_miata_nb2_LoadBins));
|
||||
copyFuelTable(mapBased18vvtVeTable_NA_fuel_rail, config->veTable);
|
||||
|
||||
engineConfiguration->vvtOffset = 83; // 2002 green car value
|
||||
|
||||
memcpy(config->afrRpmBins, mazda_miata_nb2_targetAfrRpmBins, sizeof(mazda_miata_nb2_targetAfrRpmBins));
|
||||
memcpy(config->afrLoadBins, mazda_miata_nb2_targetAfrLoadBins, sizeof(mazda_miata_nb2_targetAfrLoadBins));
|
||||
copyTargetAfrTable(target_AFR_hunchback, config->afrTable);
|
||||
|
||||
boardConfiguration->ignitionPins[2] = GPIOC_7;
|
||||
|
||||
// Frankenso analog #7 pin 3J, W48 top <>W48 bottom jumper, not OEM
|
||||
engineConfiguration->afr.hwChannel = EFI_ADC_3; // PA3
|
||||
|
||||
engineConfiguration->mafAdcChannel = EFI_ADC_4; // PA4
|
||||
|
||||
setEgoSensor(ES_14Point7_Free PASS_CONFIG_PARAMETER_SUFFIX);
|
||||
|
||||
|
||||
// set cranking_fuel 9
|
||||
engineConfiguration->cranking.baseFuel = 9; // higher value for return system NA conversion since lower fuel pressure
|
||||
engineConfiguration->vbattDividerCoeff = 9.30; // actual value on my new board
|
||||
|
||||
engineConfiguration->useConstantDwellDuringCranking = true;
|
||||
engineConfiguration->ignitionDwellForCrankingMs = 8;
|
||||
|
||||
engineConfiguration->vvtOffset = 97;
|
||||
|
||||
|
||||
engineConfiguration->rpmHardLimit = 7200; // we want to survive the race, but we also want some fun!
|
||||
|
||||
// set idle_position 30
|
||||
boardConfiguration->manIdlePosition = 30;
|
||||
engineConfiguration->crankingIACposition = 65;
|
||||
}
|
||||
|
||||
|
|
@ -1,21 +1,18 @@
|
|||
/*
|
||||
* @file mazda_miata_vvt.cpp
|
||||
*
|
||||
* MAZDA_MIATA_2003
|
||||
* set engine_type 47
|
||||
*
|
||||
* @date Oct 4, 2016
|
||||
* @author Andrey Belomutskiy, (c) 2012-2018
|
||||
* @author Andrey Belomutskiy, (c) 2012-2019
|
||||
* http://rusefi.com/forum/viewtopic.php?f=3&t=1095
|
||||
*
|
||||
* todo: try ZM-DE 2000 protege 36/1 trigger wheel ZM 01-11-408
|
||||
*
|
||||
* See also TT_MAZDA_MIATA_VVT_TEST for trigger simulation
|
||||
*
|
||||
* Based on http://rusefi.com/wiki/index.php?title=Manual:Hardware_Frankenso_board#Default_Pinout
|
||||
*
|
||||
* Hunchback - VVT engine with NA fuel rail
|
||||
* set engine_type 54
|
||||
*
|
||||
* board #70 - red car, hunchback compatible
|
||||
* set engine_type 55
|
||||
*
|
||||
|
@ -73,18 +70,6 @@ float const fsio_table_vvt_target[FSIO_TABLE_8][FSIO_TABLE_8] = {
|
|||
{/* 7 85.000 *//* 0 700.0*/17.000, /* 1 1000.0*/28.000, /* 2 2000.0*/33.000, /* 3 3000.0*/28.000, /* 4 3500.0*/30.000, /* 5 4500.0*/28.000, /* 6 5500.0*/11.000, /* 7 6500.0*/5.000, },
|
||||
};
|
||||
|
||||
float const fsio_table_dyno[FSIO_TABLE_8][FSIO_TABLE_8] = {
|
||||
/* Generated by TS2C on Sun May 07 09:35:13 EDT 2017*/
|
||||
{/* 0 30.000 *//* 0 700.0*/1.000, /* 1 1000.0*/3.000, /* 2 2000.0*/10.000, /* 3 3000.0*/20.000, /* 4 3500.0*/20.000, /* 5 4500.0*/16.000, /* 6 5500.0*/11.000, /* 7 6500.0*/10.000, },
|
||||
{/* 1 40.000 *//* 0 700.0*/3.000, /* 1 1000.0*/10.000, /* 2 2000.0*/19.000, /* 3 3000.0*/26.000, /* 4 3500.0*/20.000, /* 5 4500.0*/16.000, /* 6 5500.0*/11.000, /* 7 6500.0*/10.000, },
|
||||
{/* 2 50.000 *//* 0 700.0*/7.000, /* 1 1000.0*/16.000, /* 2 2000.0*/24.000, /* 3 3000.0*/28.000, /* 4 3500.0*/20.000, /* 5 4500.0*/16.000, /* 6 5500.0*/11.000, /* 7 6500.0*/10.000, },
|
||||
{/* 3 60.000 *//* 0 700.0*/11.000, /* 1 1000.0*/20.000, /* 2 2000.0*/27.000, /* 3 3000.0*/28.000, /* 4 3500.0*/20.000, /* 5 4500.0*/16.000, /* 6 5500.0*/11.000, /* 7 6500.0*/10.000, },
|
||||
{/* 4 70.000 *//* 0 700.0*/13.000, /* 1 1000.0*/24.000, /* 2 2000.0*/31.000, /* 3 3000.0*/28.000, /* 4 3500.0*/20.000, /* 5 4500.0*/16.000, /* 6 5500.0*/11.000, /* 7 6500.0*/10.000, },
|
||||
{/* 5 75.000 *//* 0 700.0*/15.000, /* 1 1000.0*/27.000, /* 2 2000.0*/33.000, /* 3 3000.0*/28.000, /* 4 3500.0*/20.000, /* 5 4500.0*/16.000, /* 6 5500.0*/11.000, /* 7 6500.0*/10.000, },
|
||||
{/* 6 82.000 *//* 0 700.0*/17.000, /* 1 1000.0*/28.000, /* 2 2000.0*/33.000, /* 3 3000.0*/28.000, /* 4 3500.0*/20.000, /* 5 4500.0*/16.000, /* 6 5500.0*/11.000, /* 7 6500.0*/10.000, },
|
||||
{/* 7 85.000 *//* 0 700.0*/17.000, /* 1 1000.0*/28.000, /* 2 2000.0*/33.000, /* 3 3000.0*/28.000, /* 4 3500.0*/20.000, /* 5 4500.0*/16.000, /* 6 5500.0*/11.000, /* 7 6500.0*/10.000, },
|
||||
};
|
||||
|
||||
static const float tpsTspSame[TPS_TPS_ACCEL_TABLE] =
|
||||
{0.0, 10.0, 20.0, 35.0, 50.0, 65.0, 80.0, 100.0};
|
||||
|
||||
|
@ -101,13 +86,13 @@ float const tpsTpsTable[TPS_TPS_ACCEL_TABLE][TPS_TPS_ACCEL_TABLE] = {
|
|||
};
|
||||
|
||||
|
||||
static const float ve18vvtRpmBins[FUEL_RPM_COUNT] = {700.0, 820.0, 950.0, 1100.0,
|
||||
const float mazda_miata_nb2_RpmBins[FUEL_RPM_COUNT] = {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}
|
||||
;
|
||||
|
||||
static const float ve18vvtLoadBins[FUEL_LOAD_COUNT] = {20.0, 25.0, 30.0, 35.0,
|
||||
const float mazda_miata_nb2_LoadBins[FUEL_LOAD_COUNT] = {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}
|
||||
|
@ -147,59 +132,6 @@ static const fuel_table_t mapBased18vvtVeTable_NB_fuel_rail = {
|
|||
{/* 15 220.000 *//* 0 700.0*/80.000, /* 1 820.0*/80.000, /* 2 950.0*/80.000, /* 3 1100.0*/80.000, /* 4 1300.0*/80.000, /* 5 1550.0*/80.000, /* 6 1800.0*/80.000, /* 7 2150.0*/80.000, /* 8 2500.0*/80.000, /* 9 3000.0*/80.000, /* 10 3500.0*/80.000, /* 11 4150.0*/80.000, /* 12 4900.0*/80.000, /* 13 5800.0*/80.000, /* 14 6800.0*/80.000, /* 15 8000.0*/80.000, },
|
||||
};
|
||||
|
||||
static const fuel_table_t target_AFR_NA = {
|
||||
/* Generated by TS2C on Sun May 07 09:48:38 EDT 2017*/
|
||||
{/* 0 10.000 *//* 0 650.0*/14.000, /* 1 800.0*/14.000, /* 2 1050.0*/14.000, /* 3 1300.0*/14.000, /* 4 1550.0*/14.000, /* 5 1800.0*/14.000, /* 6 2050.0*/14.000, /* 7 2300.0*/14.000, /* 8 2550.0*/14.000, /* 9 2800.0*/14.000, /* 10 3050.0*/14.000, /* 11 3300.0*/14.000, /* 12 3550.0*/14.000, /* 13 3800.0*/14.000, /* 14 4050.0*/14.000, /* 15 6400.0*/14.000, },
|
||||
{/* 1 20.000 *//* 0 650.0*/14.000, /* 1 800.0*/14.000, /* 2 1050.0*/14.000, /* 3 1300.0*/14.000, /* 4 1550.0*/14.000, /* 5 1800.0*/14.000, /* 6 2050.0*/14.000, /* 7 2300.0*/14.000, /* 8 2550.0*/14.000, /* 9 2800.0*/14.000, /* 10 3050.0*/14.000, /* 11 3300.0*/14.000, /* 12 3550.0*/14.000, /* 13 3800.0*/14.000, /* 14 4050.0*/14.000, /* 15 6400.0*/14.000, },
|
||||
{/* 2 30.000 *//* 0 650.0*/14.000, /* 1 800.0*/14.000, /* 2 1050.0*/14.000, /* 3 1300.0*/14.000, /* 4 1550.0*/14.000, /* 5 1800.0*/14.000, /* 6 2050.0*/14.000, /* 7 2300.0*/14.000, /* 8 2550.0*/14.000, /* 9 2800.0*/14.000, /* 10 3050.0*/14.000, /* 11 3300.0*/14.000, /* 12 3550.0*/14.000, /* 13 3800.0*/14.000, /* 14 4050.0*/14.000, /* 15 6400.0*/14.000, },
|
||||
{/* 3 40.000 *//* 0 650.0*/14.000, /* 1 800.0*/14.000, /* 2 1050.0*/14.000, /* 3 1300.0*/14.000, /* 4 1550.0*/14.000, /* 5 1800.0*/14.000, /* 6 2050.0*/14.000, /* 7 2300.0*/14.000, /* 8 2550.0*/14.000, /* 9 2800.0*/14.000, /* 10 3050.0*/14.000, /* 11 3300.0*/14.000, /* 12 3550.0*/14.000, /* 13 3800.0*/14.000, /* 14 4050.0*/14.000, /* 15 6400.0*/14.000, },
|
||||
{/* 4 50.000 *//* 0 650.0*/14.000, /* 1 800.0*/14.000, /* 2 1050.0*/14.000, /* 3 1300.0*/14.000, /* 4 1550.0*/14.000, /* 5 1800.0*/14.000, /* 6 2050.0*/14.000, /* 7 2300.0*/14.000, /* 8 2550.0*/14.000, /* 9 2800.0*/14.000, /* 10 3050.0*/14.000, /* 11 3300.0*/14.000, /* 12 3550.0*/14.000, /* 13 3800.0*/14.000, /* 14 4050.0*/14.000, /* 15 6400.0*/14.000, },
|
||||
{/* 5 60.000 *//* 0 650.0*/11.700, /* 1 800.0*/11.700, /* 2 1050.0*/11.700, /* 3 1300.0*/11.700, /* 4 1550.0*/11.700, /* 5 1800.0*/11.700, /* 6 2050.0*/11.700, /* 7 2300.0*/11.700, /* 8 2550.0*/11.700, /* 9 2800.0*/11.700, /* 10 3050.0*/11.700, /* 11 3300.0*/11.700, /* 12 3550.0*/11.700, /* 13 3800.0*/11.700, /* 14 4050.0*/11.000, /* 15 6400.0*/11.000, },
|
||||
{/* 6 70.000 *//* 0 650.0*/11.700, /* 1 800.0*/11.700, /* 2 1050.0*/11.700, /* 3 1300.0*/11.700, /* 4 1550.0*/11.700, /* 5 1800.0*/11.700, /* 6 2050.0*/11.700, /* 7 2300.0*/11.700, /* 8 2550.0*/11.700, /* 9 2800.0*/11.700, /* 10 3050.0*/11.700, /* 11 3300.0*/11.700, /* 12 3550.0*/11.700, /* 13 3800.0*/11.700, /* 14 4050.0*/11.000, /* 15 6400.0*/11.000, },
|
||||
{/* 7 80.000 *//* 0 650.0*/11.700, /* 1 800.0*/11.700, /* 2 1050.0*/11.700, /* 3 1300.0*/11.700, /* 4 1550.0*/11.700, /* 5 1800.0*/11.700, /* 6 2050.0*/11.700, /* 7 2300.0*/11.700, /* 8 2550.0*/11.700, /* 9 2800.0*/11.700, /* 10 3050.0*/11.700, /* 11 3300.0*/11.700, /* 12 3550.0*/11.700, /* 13 3800.0*/11.700, /* 14 4050.0*/11.000, /* 15 6400.0*/11.000, },
|
||||
{/* 8 90.000 *//* 0 650.0*/11.700, /* 1 800.0*/11.700, /* 2 1050.0*/11.700, /* 3 1300.0*/11.700, /* 4 1550.0*/11.700, /* 5 1800.0*/11.700, /* 6 2050.0*/11.700, /* 7 2300.0*/11.700, /* 8 2550.0*/11.700, /* 9 2800.0*/11.700, /* 10 3050.0*/11.700, /* 11 3300.0*/11.700, /* 12 3550.0*/11.700, /* 13 3800.0*/11.700, /* 14 4050.0*/11.000, /* 15 6400.0*/11.000, },
|
||||
{/* 9 100.000 *//* 0 650.0*/11.700, /* 1 800.0*/11.700, /* 2 1050.0*/11.700, /* 3 1300.0*/11.700, /* 4 1550.0*/11.700, /* 5 1800.0*/11.700, /* 6 2050.0*/11.700, /* 7 2300.0*/11.700, /* 8 2550.0*/11.700, /* 9 2800.0*/11.700, /* 10 3050.0*/11.700, /* 11 3300.0*/11.700, /* 12 3550.0*/11.700, /* 13 3800.0*/11.700, /* 14 4050.0*/11.000, /* 15 6400.0*/11.000, },
|
||||
{/* 10 110.000 *//* 0 650.0*/11.700, /* 1 800.0*/11.700, /* 2 1050.0*/11.700, /* 3 1300.0*/11.700, /* 4 1550.0*/11.700, /* 5 1800.0*/11.700, /* 6 2050.0*/11.700, /* 7 2300.0*/11.700, /* 8 2550.0*/11.700, /* 9 2800.0*/11.700, /* 10 3050.0*/11.700, /* 11 3300.0*/11.700, /* 12 3550.0*/11.700, /* 13 3800.0*/11.700, /* 14 4050.0*/11.000, /* 15 6400.0*/11.000, },
|
||||
{/* 11 120.000 *//* 0 650.0*/11.700, /* 1 800.0*/11.700, /* 2 1050.0*/11.700, /* 3 1300.0*/11.700, /* 4 1550.0*/11.700, /* 5 1800.0*/11.700, /* 6 2050.0*/11.700, /* 7 2300.0*/11.700, /* 8 2550.0*/11.700, /* 9 2800.0*/11.700, /* 10 3050.0*/11.700, /* 11 3300.0*/11.700, /* 12 3550.0*/11.700, /* 13 3800.0*/11.700, /* 14 4050.0*/11.000, /* 15 6400.0*/11.000, },
|
||||
{/* 12 130.000 *//* 0 650.0*/11.700, /* 1 800.0*/11.700, /* 2 1050.0*/11.700, /* 3 1300.0*/11.700, /* 4 1550.0*/11.700, /* 5 1800.0*/11.700, /* 6 2050.0*/11.700, /* 7 2300.0*/11.700, /* 8 2550.0*/11.700, /* 9 2800.0*/11.700, /* 10 3050.0*/11.700, /* 11 3300.0*/11.700, /* 12 3550.0*/11.700, /* 13 3800.0*/11.700, /* 14 4050.0*/11.000, /* 15 6400.0*/11.000, },
|
||||
{/* 13 140.000 *//* 0 650.0*/11.700, /* 1 800.0*/11.700, /* 2 1050.0*/11.700, /* 3 1300.0*/11.700, /* 4 1550.0*/11.700, /* 5 1800.0*/11.700, /* 6 2050.0*/11.700, /* 7 2300.0*/11.700, /* 8 2550.0*/11.700, /* 9 2800.0*/11.700, /* 10 3050.0*/11.700, /* 11 3300.0*/11.700, /* 12 3550.0*/11.700, /* 13 3800.0*/11.700, /* 14 4050.0*/11.000, /* 15 6400.0*/11.000, },
|
||||
{/* 14 150.000 *//* 0 650.0*/11.700, /* 1 800.0*/11.700, /* 2 1050.0*/11.700, /* 3 1300.0*/11.700, /* 4 1550.0*/11.700, /* 5 1800.0*/11.700, /* 6 2050.0*/11.700, /* 7 2300.0*/11.700, /* 8 2550.0*/11.700, /* 9 2800.0*/11.700, /* 10 3050.0*/11.700, /* 11 3300.0*/11.700, /* 12 3550.0*/11.700, /* 13 3800.0*/11.700, /* 14 4050.0*/11.000, /* 15 6400.0*/11.000, },
|
||||
{/* 15 160.000 *//* 0 650.0*/11.700, /* 1 800.0*/11.700, /* 2 1050.0*/11.700, /* 3 1300.0*/11.700, /* 4 1550.0*/11.700, /* 5 1800.0*/11.700, /* 6 2050.0*/11.700, /* 7 2300.0*/11.700, /* 8 2550.0*/11.700, /* 9 2800.0*/11.700, /* 10 3050.0*/11.700, /* 11 3300.0*/11.700, /* 12 3550.0*/11.700, /* 13 3800.0*/11.700, /* 14 4050.0*/11.000, /* 15 6400.0*/11.000, },
|
||||
};
|
||||
|
||||
static const float targetAfrRpmBins[FUEL_RPM_COUNT] = {650.0, 800.0, 1050.0, 1300.0,
|
||||
1550.0, 1800.0, 2050.0, 2300.0,
|
||||
2550.0, 2800.0, 3050.0, 3300.0,
|
||||
3550.0, 3800.0, 4050.0, 6400.0}
|
||||
;
|
||||
|
||||
static const float targetAfrLoadBins[FUEL_LOAD_COUNT] = {10.0, 20.0, 30.0, 40.0,
|
||||
50.0, 60.0, 70.0, 80.0,
|
||||
90.0, 100.0, 110.0, 120.0,
|
||||
130.0, 140.0, 150.0, 160.0};
|
||||
|
||||
#if DEFAULT_FUEL_LOAD_COUNT == FUEL_LOAD_COUNT
|
||||
static const fuel_table_t mapBased18vvtVeTable_NA_fuel_rail = {
|
||||
/* Generated by TS2C on Sun May 07 09:37:15 EDT 2017*/
|
||||
{/* 0 20.000 *//* 0 700.0*/35.685, /* 1 820.0*/36.982, /* 2 950.0*/37.200, /* 3 1100.0*/35.796, /* 4 1300.0*/36.149, /* 5 1550.0*/42.781, /* 6 1800.0*/45.281, /* 7 2150.0*/34.447, /* 8 2500.0*/26.662, /* 9 3000.0*/27.834, /* 10 3500.0*/29.178, /* 11 4150.0*/32.136, /* 12 4900.0*/36.009, /* 13 5800.0*/32.815, /* 14 6800.0*/34.415, /* 15 8000.0*/36.896, },
|
||||
{/* 1 25.000 *//* 0 700.0*/35.593, /* 1 820.0*/38.290, /* 2 950.0*/38.543, /* 3 1100.0*/44.567, /* 4 1300.0*/42.543, /* 5 1550.0*/51.690, /* 6 1800.0*/50.893, /* 7 2150.0*/45.882, /* 8 2500.0*/42.473, /* 9 3000.0*/41.591, /* 10 3500.0*/39.830, /* 11 4150.0*/43.369, /* 12 4900.0*/38.590, /* 13 5800.0*/36.461, /* 14 6800.0*/38.698, /* 15 8000.0*/40.621, },
|
||||
{/* 2 30.000 *//* 0 700.0*/37.539, /* 1 820.0*/41.105, /* 2 950.0*/51.838, /* 3 1100.0*/48.730, /* 4 1300.0*/47.475, /* 5 1550.0*/51.808, /* 6 1800.0*/49.862, /* 7 2150.0*/47.648, /* 8 2500.0*/56.394, /* 9 3000.0*/51.537, /* 10 3500.0*/52.022, /* 11 4150.0*/60.170, /* 12 4900.0*/59.945, /* 13 5800.0*/80.000, /* 14 6800.0*/80.000, /* 15 8000.0*/80.000, },
|
||||
{/* 3 35.000 *//* 0 700.0*/39.606, /* 1 820.0*/44.472, /* 2 950.0*/53.027, /* 3 1100.0*/50.709, /* 4 1300.0*/52.243, /* 5 1550.0*/55.301, /* 6 1800.0*/55.630, /* 7 2150.0*/64.738, /* 8 2500.0*/68.993, /* 9 3000.0*/57.959, /* 10 3500.0*/59.814, /* 11 4150.0*/68.593, /* 12 4900.0*/66.688, /* 13 5800.0*/80.000, /* 14 6800.0*/80.000, /* 15 8000.0*/80.000, },
|
||||
{/* 4 40.000 *//* 0 700.0*/45.470, /* 1 820.0*/57.758, /* 2 950.0*/53.028, /* 3 1100.0*/47.634, /* 4 1300.0*/62.921, /* 5 1550.0*/62.927, /* 6 1800.0*/63.611, /* 7 2150.0*/68.833, /* 8 2500.0*/72.751, /* 9 3000.0*/63.612, /* 10 3500.0*/74.939, /* 11 4150.0*/84.469, /* 12 4900.0*/75.026, /* 13 5800.0*/80.000, /* 14 6800.0*/80.000, /* 15 8000.0*/80.000, },
|
||||
{/* 5 46.000 *//* 0 700.0*/55.036, /* 1 820.0*/63.090, /* 2 950.0*/58.650, /* 3 1100.0*/53.830, /* 4 1300.0*/59.599, /* 5 1550.0*/64.794, /* 6 1800.0*/67.608, /* 7 2150.0*/73.556, /* 8 2500.0*/75.610, /* 9 3000.0*/82.211, /* 10 3500.0*/80.998, /* 11 4150.0*/86.837, /* 12 4900.0*/91.399, /* 13 5800.0*/80.000, /* 14 6800.0*/80.000, /* 15 8000.0*/80.000, },
|
||||
{/* 6 54.000 *//* 0 700.0*/62.275, /* 1 820.0*/69.333, /* 2 950.0*/67.104, /* 3 1100.0*/63.689, /* 4 1300.0*/67.871, /* 5 1550.0*/68.809, /* 6 1800.0*/77.741, /* 7 2150.0*/82.000, /* 8 2500.0*/90.645, /* 9 3000.0*/96.308, /* 10 3500.0*/94.651, /* 11 4150.0*/96.667, /* 12 4900.0*/92.464, /* 13 5800.0*/80.000, /* 14 6800.0*/80.000, /* 15 8000.0*/80.000, },
|
||||
{/* 7 63.000 *//* 0 700.0*/67.369, /* 1 820.0*/73.738, /* 2 950.0*/72.983, /* 3 1100.0*/73.412, /* 4 1300.0*/78.288, /* 5 1550.0*/73.531, /* 6 1800.0*/79.228, /* 7 2150.0*/92.174, /* 8 2500.0*/105.553, /* 9 3000.0*/105.886, /* 10 3500.0*/100.172, /* 11 4150.0*/106.089, /* 12 4900.0*/103.000, /* 13 5800.0*/103.000, /* 14 6800.0*/108.000, /* 15 8000.0*/108.000, },
|
||||
{/* 8 73.000 *//* 0 700.0*/70.760, /* 1 820.0*/74.892, /* 2 950.0*/75.153, /* 3 1100.0*/79.664, /* 4 1300.0*/89.987, /* 5 1550.0*/90.422, /* 6 1800.0*/95.789, /* 7 2150.0*/98.367, /* 8 2500.0*/96.231, /* 9 3000.0*/100.179, /* 10 3500.0*/92.473, /* 11 4150.0*/101.756, /* 12 4900.0*/103.000, /* 13 5800.0*/103.000, /* 14 6800.0*/108.000, /* 15 8000.0*/108.000, },
|
||||
{/* 9 85.000 *//* 0 700.0*/72.255, /* 1 820.0*/76.109, /* 2 950.0*/79.744, /* 3 1100.0*/80.844, /* 4 1300.0*/83.493, /* 5 1550.0*/82.232, /* 6 1800.0*/85.762, /* 7 2150.0*/97.047, /* 8 2500.0*/98.763, /* 9 3000.0*/104.394, /* 10 3500.0*/102.008, /* 11 4150.0*/115.132, /* 12 4900.0*/103.000, /* 13 5800.0*/103.000, /* 14 6800.0*/108.000, /* 15 8000.0*/108.000, },
|
||||
{/* 10 99.000 *//* 0 700.0*/78.899, /* 1 820.0*/77.096, /* 2 950.0*/79.895, /* 3 1100.0*/76.554, /* 4 1300.0*/78.057, /* 5 1550.0*/78.602, /* 6 1800.0*/83.254, /* 7 2150.0*/91.812, /* 8 2500.0*/101.884, /* 9 3000.0*/108.911, /* 10 3500.0*/103.629, /* 11 4150.0*/116.945, /* 12 4900.0*/108.542, /* 13 5800.0*/103.625, /* 14 6800.0*/108.000, /* 15 8000.0*/108.000, },
|
||||
{/* 11 116.000 *//* 0 700.0*/80.000, /* 1 820.0*/80.000, /* 2 950.0*/80.000, /* 3 1100.0*/80.000, /* 4 1300.0*/80.000, /* 5 1550.0*/80.000, /* 6 1800.0*/80.000, /* 7 2150.0*/100.000, /* 8 2500.0*/100.000, /* 9 3000.0*/100.000, /* 10 3500.0*/106.000, /* 11 4150.0*/116.600, /* 12 4900.0*/108.000, /* 13 5800.0*/108.000, /* 14 6800.0*/108.000, /* 15 8000.0*/108.000, },
|
||||
{/* 12 135.000 *//* 0 700.0*/80.000, /* 1 820.0*/80.000, /* 2 950.0*/80.000, /* 3 1100.0*/80.000, /* 4 1300.0*/80.000, /* 5 1550.0*/80.000, /* 6 1800.0*/80.000, /* 7 2150.0*/100.000, /* 8 2500.0*/100.000, /* 9 3000.0*/100.000, /* 10 3500.0*/106.000, /* 11 4150.0*/116.600, /* 12 4900.0*/108.000, /* 13 5800.0*/108.000, /* 14 6800.0*/108.000, /* 15 8000.0*/108.000, },
|
||||
{/* 13 158.000 *//* 0 700.0*/80.000, /* 1 820.0*/80.000, /* 2 950.0*/80.000, /* 3 1100.0*/80.000, /* 4 1300.0*/80.000, /* 5 1550.0*/80.000, /* 6 1800.0*/80.000, /* 7 2150.0*/80.000, /* 8 2500.0*/80.000, /* 9 3000.0*/80.000, /* 10 3500.0*/80.000, /* 11 4150.0*/80.000, /* 12 4900.0*/80.000, /* 13 5800.0*/80.000, /* 14 6800.0*/80.000, /* 15 8000.0*/80.000, },
|
||||
{/* 14 185.000 *//* 0 700.0*/80.000, /* 1 820.0*/80.000, /* 2 950.0*/80.000, /* 3 1100.0*/80.000, /* 4 1300.0*/80.000, /* 5 1550.0*/80.000, /* 6 1800.0*/80.000, /* 7 2150.0*/80.000, /* 8 2500.0*/80.000, /* 9 3000.0*/80.000, /* 10 3500.0*/80.000, /* 11 4150.0*/80.000, /* 12 4900.0*/80.000, /* 13 5800.0*/80.000, /* 14 6800.0*/80.000, /* 15 8000.0*/80.000, },
|
||||
{/* 15 220.000 *//* 0 700.0*/80.000, /* 1 820.0*/80.000, /* 2 950.0*/80.000, /* 3 1100.0*/80.000, /* 4 1300.0*/80.000, /* 5 1550.0*/80.000, /* 6 1800.0*/80.000, /* 7 2150.0*/80.000, /* 8 2500.0*/80.000, /* 9 3000.0*/80.000, /* 10 3500.0*/80.000, /* 11 4150.0*/80.000, /* 12 4900.0*/80.000, /* 13 5800.0*/80.000, /* 14 6800.0*/80.000, /* 15 8000.0*/80.000, },
|
||||
};
|
||||
#endif
|
||||
|
||||
#if IGN_LOAD_COUNT == DEFAULT_IGN_LOAD_COUNT
|
||||
static const ignition_table_t mapBased18vvtTimingTable = {
|
||||
/* Generated by TS2C on Tue Apr 18 21:43:57 EDT 2017*/
|
||||
|
@ -297,8 +229,8 @@ static void setMazdaMiataEngineNB2Defaults(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
|
|||
engineConfiguration->vvtMode = MIATA_NB2;
|
||||
engineConfiguration->vvtOffset = 98; // 2003 red car value
|
||||
|
||||
memcpy(config->veRpmBins, ve18vvtRpmBins, sizeof(ve18vvtRpmBins));
|
||||
memcpy(config->veLoadBins, ve18vvtLoadBins, sizeof(ve18vvtLoadBins));
|
||||
memcpy(config->veRpmBins, mazda_miata_nb2_RpmBins, sizeof(mazda_miata_nb2_RpmBins));
|
||||
memcpy(config->veLoadBins, mazda_miata_nb2_LoadBins, sizeof(mazda_miata_nb2_LoadBins));
|
||||
copyFuelTable(mapBased18vvtVeTable_NB_fuel_rail, config->veTable);
|
||||
|
||||
memcpy(config->ignitionRpmBins, ignition18vvtRpmBins, sizeof(ignition18vvtRpmBins));
|
||||
|
@ -333,7 +265,7 @@ static void setMazdaMiataEngineNB2Defaults(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
|
|||
engineConfiguration->idleRpmPid.periodMs = 10;
|
||||
} // end of setMazdaMiataEngineNB2Defaults
|
||||
|
||||
|
||||
// MAZDA_MIATA_2003
|
||||
void setMazdaMiata2003EngineConfiguration(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
|
||||
setFrankensoConfiguration(PASS_CONFIG_PARAMETER_SIGNATURE);
|
||||
|
||||
|
@ -446,52 +378,6 @@ void setMazdaMiata2003EngineConfiguration(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
|
|||
|
||||
}
|
||||
|
||||
void setMazdaMiata2003EngineConfigurationNaFuelRail(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
|
||||
setMazdaMiata2003EngineConfiguration(PASS_CONFIG_PARAMETER_SIGNATURE);
|
||||
|
||||
// todo: there should be a better way?
|
||||
for (int loadIndex = 0; loadIndex < FSIO_TABLE_8; loadIndex++) {
|
||||
for (int rpmIndex = 0; rpmIndex < FSIO_TABLE_8; rpmIndex++) {
|
||||
config->fsioTable1[loadIndex][rpmIndex] = fsio_table_dyno[loadIndex][rpmIndex];
|
||||
}
|
||||
}
|
||||
memcpy(config->veRpmBins, ve18vvtRpmBins, sizeof(ve18vvtRpmBins));
|
||||
memcpy(config->veLoadBins, ve18vvtLoadBins, sizeof(ve18vvtLoadBins));
|
||||
copyFuelTable(mapBased18vvtVeTable_NA_fuel_rail, config->veTable);
|
||||
|
||||
engineConfiguration->vvtOffset = 83; // 2002 green car value
|
||||
|
||||
memcpy(config->afrRpmBins, targetAfrRpmBins, sizeof(targetAfrRpmBins));
|
||||
memcpy(config->afrLoadBins, targetAfrLoadBins, sizeof(targetAfrLoadBins));
|
||||
copyTargetAfrTable(target_AFR_NA, config->afrTable);
|
||||
|
||||
boardConfiguration->ignitionPins[2] = GPIOC_7;
|
||||
|
||||
// Frankenso analog #7 pin 3J, W48 top <>W48 bottom jumper, not OEM
|
||||
engineConfiguration->afr.hwChannel = EFI_ADC_3; // PA3
|
||||
|
||||
engineConfiguration->mafAdcChannel = EFI_ADC_4; // PA4
|
||||
|
||||
setEgoSensor(ES_14Point7_Free PASS_CONFIG_PARAMETER_SUFFIX);
|
||||
|
||||
|
||||
// set cranking_fuel 9
|
||||
engineConfiguration->cranking.baseFuel = 9; // higher value for return system NA conversion since lower fuel pressure
|
||||
engineConfiguration->vbattDividerCoeff = 9.30; // actual value on my new board
|
||||
|
||||
engineConfiguration->useConstantDwellDuringCranking = true;
|
||||
engineConfiguration->ignitionDwellForCrankingMs = 8;
|
||||
|
||||
engineConfiguration->vvtOffset = 97;
|
||||
|
||||
|
||||
engineConfiguration->rpmHardLimit = 7200; // we want to survive the race, but we also want some fun!
|
||||
|
||||
// set idle_position 30
|
||||
boardConfiguration->manIdlePosition = 30;
|
||||
engineConfiguration->crankingIACposition = 65;
|
||||
}
|
||||
|
||||
/**
|
||||
* red car setting with default 1991/1995 miata harness
|
||||
* board #70 - closer to default miata NA6 harness
|
||||
|
|
|
@ -92,7 +92,7 @@
|
|||
*/
|
||||
#define EFI_CLI_SUPPORT TRUE
|
||||
|
||||
#define EFI_RTC FALSE
|
||||
#define EFI_RTC TRUE
|
||||
|
||||
#define EFI_ALTERNATOR_CONTROL TRUE
|
||||
|
||||
|
|
|
@ -1136,7 +1136,7 @@ static void getValue(const char *paramStr) {
|
|||
}
|
||||
|
||||
#if EFI_RTC
|
||||
else if (strEqualCaseInsensitive(paramStr, "date")) {
|
||||
else if (strEqualCaseInsensitive(paramStr, CMD_DATE)) {
|
||||
printDateTime();
|
||||
}
|
||||
#endif
|
||||
|
@ -1357,7 +1357,7 @@ static void setValue(const char *paramStr, const char *valueStr) {
|
|||
} else if (strEqualCaseInsensitive(paramStr, "targetvbatt")) {
|
||||
engineConfiguration->targetVBatt = valueF;
|
||||
#if EFI_RTC
|
||||
} else if (strEqualCaseInsensitive(paramStr, "date")) {
|
||||
} else if (strEqualCaseInsensitive(paramStr, CMD_DATE)) {
|
||||
// rusEfi console invokes this method with timestamp in local timezone
|
||||
setDateTime(valueStr);
|
||||
#endif
|
||||
|
|
|
@ -1245,6 +1245,7 @@ end_struct
|
|||
|
||||
#define CMD_TRIGGERINFO "triggerinfo"
|
||||
#define CMD_WRITECONFIG "writeconfig"
|
||||
#define CMD_DATE "date"
|
||||
#define CMD_REBOOT "reboot"
|
||||
#define CMD_REBOOT_DFU "reboot_dfu"
|
||||
#define CMD_ENABLE "enable"
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
package com.rusefi.config.generated;
|
||||
|
||||
// this file was generated automatically by rusEfi tool ConfigDefinition.jar based on integration\rusefi_config.txt Wed Sep 11 20:00:32 EDT 2019
|
||||
// this file was generated automatically by rusEfi tool ConfigDefinition.jar based on integration\rusefi_config.txt Fri Sep 20 18:08:52 EDT 2019
|
||||
|
||||
// by class com.rusefi.output.FileJavaFieldsConsumer
|
||||
import com.rusefi.config.*;
|
||||
|
@ -237,6 +237,7 @@ public class Fields {
|
|||
public static final int clutchUpPinMode_offset = 971;
|
||||
public static final String CMD_CALIBRATE_PEDAL_DOWN = "calibrate_pedal_down";
|
||||
public static final String CMD_CALIBRATE_PEDAL_UP = "calibrate_pedal_up";
|
||||
public static final String CMD_DATE = "date";
|
||||
public static final String CMD_DISABLE = "disable";
|
||||
public static final String CMD_ENABLE = "enable";
|
||||
public static final String CMD_REBOOT = "reboot";
|
||||
|
@ -366,7 +367,6 @@ public class Fields {
|
|||
public static final int firingOrder_offset_hex = 194;
|
||||
public static final int fixedModeTiming_offset = 452;
|
||||
public static final int fixedTiming_offset = 2204;
|
||||
public static final int flexFuelSensor_offset = 3100;
|
||||
public static final int frequencyReportingMapInputPin_offset = 970;
|
||||
public static final int FSIO_ANALOG_INPUT_COUNT = 4;
|
||||
public static final int FSIO_COMMAND_COUNT = 16;
|
||||
|
@ -1219,6 +1219,7 @@ public class Fields {
|
|||
public static final int unusedAnotherOne_offset = 744;
|
||||
public static final int unusedAtBoardConfigurationEnd_offset = 980;
|
||||
public static final int unusedErrorPin_offset = 2040;
|
||||
public static final int unusedFlexFuelSensor_offset = 3100;
|
||||
public static final int unusedFormerWarmupAfrPid_offset = 1756;
|
||||
public static final int unusedh_offset = 1471;
|
||||
public static final int unusedMa2_offset = 711;
|
||||
|
@ -1989,7 +1990,7 @@ public class Fields {
|
|||
public static final Field OILPRESSURE_V2 = Field.create("OILPRESSURE_V2", 2704, FieldType.FLOAT);
|
||||
public static final Field OILPRESSURE_VALUE2 = Field.create("OILPRESSURE_VALUE2", 2708, FieldType.FLOAT);
|
||||
public static final Field ACCELEROMETERSPIDEVICE = Field.create("ACCELEROMETERSPIDEVICE", 2712, FieldType.INT8);
|
||||
public static final Field FLEXFUELSENSOR = Field.create("FLEXFUELSENSOR", 3100, FieldType.INT8, brain_input_pin_e);
|
||||
public static final Field UNUSEDFLEXFUELSENSOR = Field.create("UNUSEDFLEXFUELSENSOR", 3100, FieldType.INT8);
|
||||
public static final Field TEST557PIN = Field.create("TEST557PIN", 3101, FieldType.INT8, brain_pin_e);
|
||||
public static final Field STEPPERDIRECTIONPINMODE = Field.create("STEPPERDIRECTIONPINMODE", 3102, FieldType.INT8, pin_output_mode_e);
|
||||
public static final Field EXTERNALKNOCKSENSEADC = Field.create("EXTERNALKNOCKSENSEADC", 3103, FieldType.INT8, adc_channel_e);
|
||||
|
@ -2764,7 +2765,7 @@ public class Fields {
|
|||
OILPRESSURE_V2,
|
||||
OILPRESSURE_VALUE2,
|
||||
ACCELEROMETERSPIDEVICE,
|
||||
FLEXFUELSENSOR,
|
||||
UNUSEDFLEXFUELSENSOR,
|
||||
TEST557PIN,
|
||||
STEPPERDIRECTIONPINMODE,
|
||||
EXTERNALKNOCKSENSEADC,
|
||||
|
|
|
@ -48,7 +48,7 @@ import static com.rusefi.ui.storage.PersistentConfiguration.getConfig;
|
|||
* @see EngineSnifferPanel
|
||||
*/
|
||||
public class Launcher {
|
||||
public static final int CONSOLE_VERSION = 20190914;
|
||||
public static final int CONSOLE_VERSION = 20190919;
|
||||
public static final String INI_FILE_PATH = System.getProperty("ini_file_path", "..");
|
||||
public static final String INPUT_FILES_PATH = System.getProperty("input_files_path", "..");
|
||||
public static final String TOOLS_PATH = System.getProperty("tools_path", ".");
|
||||
|
@ -254,7 +254,9 @@ public class Launcher {
|
|||
if (ConnectionStatus.INSTANCE.getValue() == ConnectionStatus.Value.CONNECTED) {
|
||||
long unixGmtTime = System.currentTimeMillis() / 1000L;
|
||||
long withOffset = unixGmtTime + TimeZone.getDefault().getOffset(System.currentTimeMillis()) / 1000;
|
||||
CommandQueue.getInstance().write("set date " + withOffset, CommandQueue.DEFAULT_TIMEOUT,
|
||||
CommandQueue.getInstance().write("set " +
|
||||
Fields.CMD_DATE +
|
||||
" " + withOffset, CommandQueue.DEFAULT_TIMEOUT,
|
||||
InvocationConfirmationListener.VOID, false);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue