From 8fa1a6530b4fad020a61424a8c9258303cee6438 Mon Sep 17 00:00:00 2001 From: rusefillc Date: Mon, 8 Feb 2021 21:50:31 -0500 Subject: [PATCH] M62T vanos support #2243 --- firmware/config/engines/bmw_m73.cpp | 2 +- firmware/config/engines/mazda_miata_vvt.cpp | 2 +- firmware/config/engines/test_engine.cpp | 2 +- firmware/config/engines/toyota_jzs147.cpp | 2 +- firmware/config/engines/vw_b6.cpp | 2 +- firmware/controllers/algo/engine.cpp | 4 ++-- .../controllers/engine_cycle/main_trigger_callback.cpp | 2 +- firmware/controllers/generated/fsio_enums_generated.def | 2 +- firmware/controllers/generated/fsio_getters.def | 2 +- firmware/controllers/generated/fsio_names.def | 2 +- firmware/controllers/generated/fsio_strings.def | 2 +- firmware/controllers/generated/signature_all.h | 4 ++-- firmware/controllers/generated/signature_frankenso_na6.h | 4 ++-- firmware/controllers/generated/signature_hellen72.h | 4 ++-- firmware/controllers/generated/signature_hellen_cypress.h | 4 ++-- firmware/controllers/generated/signature_kin.h | 4 ++-- firmware/controllers/generated/signature_mre_f4.h | 4 ++-- firmware/controllers/generated/signature_mre_f7.h | 4 ++-- firmware/controllers/generated/signature_prometheus_405.h | 4 ++-- firmware/controllers/generated/signature_prometheus_469.h | 4 ++-- firmware/controllers/generated/signature_proteus_f4.h | 4 ++-- firmware/controllers/generated/signature_proteus_f7.h | 4 ++-- firmware/controllers/generated/signature_subaru_eg33_f7.h | 4 ++-- firmware/controllers/settings.cpp | 2 +- firmware/controllers/trigger/trigger_central.cpp | 8 ++++---- firmware/integration/rusefi_config.txt | 3 +-- unit_tests/tests/trigger/test_cam_vvt_input.cpp | 2 +- unit_tests/tests/trigger/test_quad_cam.cpp | 2 +- 28 files changed, 44 insertions(+), 45 deletions(-) diff --git a/firmware/config/engines/bmw_m73.cpp b/firmware/config/engines/bmw_m73.cpp index ed36250efe..59f03cbeed 100644 --- a/firmware/config/engines/bmw_m73.cpp +++ b/firmware/config/engines/bmw_m73.cpp @@ -94,7 +94,7 @@ void m73engine(DECLARE_CONFIG_PARAMETER_SIGNATURE) { CONFIG(isFasterEngineSpinUpEnabled) = true; CONFIG(fuelAlgorithm) = LM_ALPHA_N; - engineConfiguration->vvtMode = VVT_FIRST_HALF; + engineConfiguration->vvtMode[0] = VVT_FIRST_HALF; engineConfiguration->globalTriggerAngleOffset = 90; setOperationMode(engineConfiguration, FOUR_STROKE_CRANK_SENSOR); diff --git a/firmware/config/engines/mazda_miata_vvt.cpp b/firmware/config/engines/mazda_miata_vvt.cpp index 278f34b00e..f5e822fe0d 100644 --- a/firmware/config/engines/mazda_miata_vvt.cpp +++ b/firmware/config/engines/mazda_miata_vvt.cpp @@ -335,7 +335,7 @@ static void setMazdaMiataEngineNB2Defaults(DECLARE_CONFIG_PARAMETER_SIGNATURE) { engineConfiguration->vvtCamSensorUseRise = true; // set vvt_mode 3 - engineConfiguration->vvtMode = VVT_MIATA_NB2; + engineConfiguration->vvtMode[0] = VVT_MIATA_NB2; engineConfiguration->vvtOffset = 98; // 2003 red car value MEMCPY(config->veRpmBins, mazda_miata_nb2_RpmBins); diff --git a/firmware/config/engines/test_engine.cpp b/firmware/config/engines/test_engine.cpp index 69d31cf818..32b7955ec8 100644 --- a/firmware/config/engines/test_engine.cpp +++ b/firmware/config/engines/test_engine.cpp @@ -75,7 +75,7 @@ void setTestVVTEngineConfiguration(DECLARE_CONFIG_PARAMETER_SIGNATURE) { // set global_trigger_offset_angle 0 engineConfiguration->globalTriggerAngleOffset = 0; - engineConfiguration->vvtMode = VVT_SECOND_HALF; + engineConfiguration->vvtMode[0] = VVT_SECOND_HALF; engineConfiguration->debugMode = DBG_VVT; } diff --git a/firmware/config/engines/toyota_jzs147.cpp b/firmware/config/engines/toyota_jzs147.cpp index a42d5bb618..ce904f944d 100644 --- a/firmware/config/engines/toyota_jzs147.cpp +++ b/firmware/config/engines/toyota_jzs147.cpp @@ -110,7 +110,7 @@ void setToyota_2jz_vics(DECLARE_CONFIG_PARAMETER_SIGNATURE) { engineConfiguration->triggerInputPins[1] = GPIO_UNASSIGNED; // cam sensor will he handled by custom vtti code engineConfiguration->camInputs[0] = GPIOC_6; - engineConfiguration->vvtMode = VVT_2JZ; + engineConfiguration->vvtMode[0] = VVT_2JZ; // set global_trigger_offset_angle 155 engineConfiguration->globalTriggerAngleOffset = 155; // todo diff --git a/firmware/config/engines/vw_b6.cpp b/firmware/config/engines/vw_b6.cpp index 6c1462f5eb..7d02e82493 100644 --- a/firmware/config/engines/vw_b6.cpp +++ b/firmware/config/engines/vw_b6.cpp @@ -22,7 +22,7 @@ void setVwPassatB6(DECLARE_CONFIG_PARAMETER_SIGNATURE) { #if (BOARD_TLE8888_COUNT > 0) setOperationMode(engineConfiguration, FOUR_STROKE_CRANK_SENSOR); engineConfiguration->trigger.type = TT_TOOTHED_WHEEL_60_2; - engineConfiguration->vvtMode = VVT_BOSCH_QUICK_START; + engineConfiguration->vvtMode[0] = VVT_BOSCH_QUICK_START; engineConfiguration->map.sensor.type = MT_BOSCH_2_5; // seting Injectors flow rate equal 1214 cc/min diff --git a/firmware/controllers/algo/engine.cpp b/firmware/controllers/algo/engine.cpp index c9449e961c..208497b504 100644 --- a/firmware/controllers/algo/engine.cpp +++ b/firmware/controllers/algo/engine.cpp @@ -147,8 +147,8 @@ void Engine::initializeTriggerWaveform(Logging *logger DECLARE_ENGINE_PARAMETER_ } - initVvtShape(logger, engineConfiguration->vvtMode, &ENGINE(triggerCentral).vvtShape[0], initState PASS_ENGINE_PARAMETER_SUFFIX); - initVvtShape(logger, engineConfiguration->secondVvtMode, &ENGINE(triggerCentral).vvtShape[1], initState PASS_ENGINE_PARAMETER_SUFFIX); + initVvtShape(logger, engineConfiguration->vvtMode[0], &ENGINE(triggerCentral).vvtShape[0], initState PASS_ENGINE_PARAMETER_SUFFIX); + initVvtShape(logger, engineConfiguration->vvtMode[1], &ENGINE(triggerCentral).vvtShape[1], initState PASS_ENGINE_PARAMETER_SUFFIX); if (!TRIGGER_WAVEFORM(shapeDefinitionError)) { diff --git a/firmware/controllers/engine_cycle/main_trigger_callback.cpp b/firmware/controllers/engine_cycle/main_trigger_callback.cpp index 1793712b3a..bcabcd0997 100644 --- a/firmware/controllers/engine_cycle/main_trigger_callback.cpp +++ b/firmware/controllers/engine_cycle/main_trigger_callback.cpp @@ -371,7 +371,7 @@ uint32_t *cyccnt = (uint32_t*) &DWT->CYCCNT; void mainTriggerCallback(uint32_t trgEventIndex, efitick_t edgeTimestamp DECLARE_ENGINE_PARAMETER_SUFFIX) { ScopePerf perf(PE::MainTriggerCallback); - if (CONFIG(vvtMode) == VVT_MIATA_NB2 && ENGINE(triggerCentral.vvtSyncTimeNt) == 0) { + if (CONFIG(vvtMode[0]) == VVT_MIATA_NB2 && ENGINE(triggerCentral.vvtSyncTimeNt) == 0) { // this is a bit spaghetti code for sure // do not spark & do not fuel until we have VVT sync. NB2 is a special case // due to symmetrical crank wheel and we need to make sure no spark happens out of sync diff --git a/firmware/controllers/generated/fsio_enums_generated.def b/firmware/controllers/generated/fsio_enums_generated.def index 79b8ca5032..106f9df770 100644 --- a/firmware/controllers/generated/fsio_enums_generated.def +++ b/firmware/controllers/generated/fsio_enums_generated.def @@ -1,4 +1,4 @@ -// this file was generated automatically by rusEfi tool ConfigDefinition.jar based on gen_config.sh integration/rusefi_config.txt Mon Feb 08 21:41:01 UTC 2021 +// this file was generated automatically by rusEfi tool ConfigDefinition.jar based on gen_config.sh integration/rusefi_config.txt Mon Feb 08 21:38:22 EST 2021 // by class com.rusefi.output.FileFsioSettingsConsumer FSIO_SETTING_FANONTEMPERATURE = 1000, diff --git a/firmware/controllers/generated/fsio_getters.def b/firmware/controllers/generated/fsio_getters.def index cb857ce6b8..305bcedf9a 100644 --- a/firmware/controllers/generated/fsio_getters.def +++ b/firmware/controllers/generated/fsio_getters.def @@ -1,4 +1,4 @@ -// this file was generated automatically by rusEfi tool ConfigDefinition.jar based on gen_config.sh integration/rusefi_config.txt Mon Feb 08 21:41:01 UTC 2021 +// this file was generated automatically by rusEfi tool ConfigDefinition.jar based on gen_config.sh integration/rusefi_config.txt Mon Feb 08 21:38:22 EST 2021 // by class com.rusefi.output.FileFsioSettingsConsumer case FSIO_SETTING_FANONTEMPERATURE: diff --git a/firmware/controllers/generated/fsio_names.def b/firmware/controllers/generated/fsio_names.def index afdc562352..dd47b4f4c7 100644 --- a/firmware/controllers/generated/fsio_names.def +++ b/firmware/controllers/generated/fsio_names.def @@ -1,4 +1,4 @@ -// this file was generated automatically by rusEfi tool ConfigDefinition.jar based on gen_config.sh integration/rusefi_config.txt Mon Feb 08 21:41:01 UTC 2021 +// this file was generated automatically by rusEfi tool ConfigDefinition.jar based on gen_config.sh integration/rusefi_config.txt Mon Feb 08 21:38:22 EST 2021 // by class com.rusefi.output.FileFsioSettingsConsumer static LENameOrdinalPair lefanOnTemperature(FSIO_SETTING_FANONTEMPERATURE, "cfg_fanOnTemperature"); diff --git a/firmware/controllers/generated/fsio_strings.def b/firmware/controllers/generated/fsio_strings.def index 776c035f44..70e7f810f6 100644 --- a/firmware/controllers/generated/fsio_strings.def +++ b/firmware/controllers/generated/fsio_strings.def @@ -1,4 +1,4 @@ -// this file was generated automatically by rusEfi tool ConfigDefinition.jar based on gen_config.sh integration/rusefi_config.txt Mon Feb 08 21:41:01 UTC 2021 +// this file was generated automatically by rusEfi tool ConfigDefinition.jar based on gen_config.sh integration/rusefi_config.txt Mon Feb 08 21:38:22 EST 2021 // by class com.rusefi.output.FileFsioSettingsConsumer case FSIO_SETTING_FANONTEMPERATURE: diff --git a/firmware/controllers/generated/signature_all.h b/firmware/controllers/generated/signature_all.h index b733c10a7d..e9f6bd8f60 100644 --- a/firmware/controllers/generated/signature_all.h +++ b/firmware/controllers/generated/signature_all.h @@ -4,5 +4,5 @@ #define SIGNATURE_BOARD all #define SIGNATURE_DATE 2021.02.08 -#define SIGNATURE_HASH 3414537129 -#define TS_SIGNATURE "rusEFI 2021.02.08.all.3414537129" +#define SIGNATURE_HASH 2483621418 +#define TS_SIGNATURE "rusEFI 2021.02.08.all.2483621418" diff --git a/firmware/controllers/generated/signature_frankenso_na6.h b/firmware/controllers/generated/signature_frankenso_na6.h index 9944c159f1..f0b17c644c 100644 --- a/firmware/controllers/generated/signature_frankenso_na6.h +++ b/firmware/controllers/generated/signature_frankenso_na6.h @@ -4,5 +4,5 @@ #define SIGNATURE_BOARD frankenso_na6 #define SIGNATURE_DATE 2021.02.08 -#define SIGNATURE_HASH 1342152250 -#define TS_SIGNATURE "rusEFI 2021.02.08.frankenso_na6.1342152250" +#define SIGNATURE_HASH 275981241 +#define TS_SIGNATURE "rusEFI 2021.02.08.frankenso_na6.275981241" diff --git a/firmware/controllers/generated/signature_hellen72.h b/firmware/controllers/generated/signature_hellen72.h index e58b2263f6..0047682fd7 100644 --- a/firmware/controllers/generated/signature_hellen72.h +++ b/firmware/controllers/generated/signature_hellen72.h @@ -4,5 +4,5 @@ #define SIGNATURE_BOARD hellen72 #define SIGNATURE_DATE 2021.02.08 -#define SIGNATURE_HASH 3654413073 -#define TS_SIGNATURE "rusEFI 2021.02.08.hellen72.3654413073" +#define SIGNATURE_HASH 2254263954 +#define TS_SIGNATURE "rusEFI 2021.02.08.hellen72.2254263954" diff --git a/firmware/controllers/generated/signature_hellen_cypress.h b/firmware/controllers/generated/signature_hellen_cypress.h index 465a7e0181..7d0e080021 100644 --- a/firmware/controllers/generated/signature_hellen_cypress.h +++ b/firmware/controllers/generated/signature_hellen_cypress.h @@ -4,5 +4,5 @@ #define SIGNATURE_BOARD hellen_cypress #define SIGNATURE_DATE 2021.02.08 -#define SIGNATURE_HASH 2314823801 -#define TS_SIGNATURE "rusEFI 2021.02.08.hellen_cypress.2314823801" +#define SIGNATURE_HASH 3598046714 +#define TS_SIGNATURE "rusEFI 2021.02.08.hellen_cypress.3598046714" diff --git a/firmware/controllers/generated/signature_kin.h b/firmware/controllers/generated/signature_kin.h index afbf69e26a..a7422e6c3d 100644 --- a/firmware/controllers/generated/signature_kin.h +++ b/firmware/controllers/generated/signature_kin.h @@ -4,5 +4,5 @@ #define SIGNATURE_BOARD kin #define SIGNATURE_DATE 2021.02.08 -#define SIGNATURE_HASH 2314823801 -#define TS_SIGNATURE "rusEFI 2021.02.08.kin.2314823801" +#define SIGNATURE_HASH 3598046714 +#define TS_SIGNATURE "rusEFI 2021.02.08.kin.3598046714" diff --git a/firmware/controllers/generated/signature_mre_f4.h b/firmware/controllers/generated/signature_mre_f4.h index e62658b628..f3e28e0912 100644 --- a/firmware/controllers/generated/signature_mre_f4.h +++ b/firmware/controllers/generated/signature_mre_f4.h @@ -4,5 +4,5 @@ #define SIGNATURE_BOARD mre_f4 #define SIGNATURE_DATE 2021.02.08 -#define SIGNATURE_HASH 3846422851 -#define TS_SIGNATURE "rusEFI 2021.02.08.mre_f4.3846422851" +#define SIGNATURE_HASH 3134160064 +#define TS_SIGNATURE "rusEFI 2021.02.08.mre_f4.3134160064" diff --git a/firmware/controllers/generated/signature_mre_f7.h b/firmware/controllers/generated/signature_mre_f7.h index 1ffda5da2d..59549ff869 100644 --- a/firmware/controllers/generated/signature_mre_f7.h +++ b/firmware/controllers/generated/signature_mre_f7.h @@ -4,5 +4,5 @@ #define SIGNATURE_BOARD mre_f7 #define SIGNATURE_DATE 2021.02.08 -#define SIGNATURE_HASH 3846422851 -#define TS_SIGNATURE "rusEFI 2021.02.08.mre_f7.3846422851" +#define SIGNATURE_HASH 3134160064 +#define TS_SIGNATURE "rusEFI 2021.02.08.mre_f7.3134160064" diff --git a/firmware/controllers/generated/signature_prometheus_405.h b/firmware/controllers/generated/signature_prometheus_405.h index 64aef3e1d8..7c9000cd2e 100644 --- a/firmware/controllers/generated/signature_prometheus_405.h +++ b/firmware/controllers/generated/signature_prometheus_405.h @@ -4,5 +4,5 @@ #define SIGNATURE_BOARD prometheus_405 #define SIGNATURE_DATE 2021.02.08 -#define SIGNATURE_HASH 3641946527 -#define TS_SIGNATURE "rusEFI 2021.02.08.prometheus_405.3641946527" +#define SIGNATURE_HASH 2258570268 +#define TS_SIGNATURE "rusEFI 2021.02.08.prometheus_405.2258570268" diff --git a/firmware/controllers/generated/signature_prometheus_469.h b/firmware/controllers/generated/signature_prometheus_469.h index edd28eae2b..b5dc31a6e6 100644 --- a/firmware/controllers/generated/signature_prometheus_469.h +++ b/firmware/controllers/generated/signature_prometheus_469.h @@ -4,5 +4,5 @@ #define SIGNATURE_BOARD prometheus_469 #define SIGNATURE_DATE 2021.02.08 -#define SIGNATURE_HASH 3641946527 -#define TS_SIGNATURE "rusEFI 2021.02.08.prometheus_469.3641946527" +#define SIGNATURE_HASH 2258570268 +#define TS_SIGNATURE "rusEFI 2021.02.08.prometheus_469.2258570268" diff --git a/firmware/controllers/generated/signature_proteus_f4.h b/firmware/controllers/generated/signature_proteus_f4.h index 658a15b8a1..cefb009f08 100644 --- a/firmware/controllers/generated/signature_proteus_f4.h +++ b/firmware/controllers/generated/signature_proteus_f4.h @@ -4,5 +4,5 @@ #define SIGNATURE_BOARD proteus_f4 #define SIGNATURE_DATE 2021.02.08 -#define SIGNATURE_HASH 2897509254 -#define TS_SIGNATURE "rusEFI 2021.02.08.proteus_f4.2897509254" +#define SIGNATURE_HASH 4080584197 +#define TS_SIGNATURE "rusEFI 2021.02.08.proteus_f4.4080584197" diff --git a/firmware/controllers/generated/signature_proteus_f7.h b/firmware/controllers/generated/signature_proteus_f7.h index 7f446afa53..c812ebb567 100644 --- a/firmware/controllers/generated/signature_proteus_f7.h +++ b/firmware/controllers/generated/signature_proteus_f7.h @@ -4,5 +4,5 @@ #define SIGNATURE_BOARD proteus_f7 #define SIGNATURE_DATE 2021.02.08 -#define SIGNATURE_HASH 2897509254 -#define TS_SIGNATURE "rusEFI 2021.02.08.proteus_f7.2897509254" +#define SIGNATURE_HASH 4080584197 +#define TS_SIGNATURE "rusEFI 2021.02.08.proteus_f7.4080584197" diff --git a/firmware/controllers/generated/signature_subaru_eg33_f7.h b/firmware/controllers/generated/signature_subaru_eg33_f7.h index e8f542318d..c2607a8358 100644 --- a/firmware/controllers/generated/signature_subaru_eg33_f7.h +++ b/firmware/controllers/generated/signature_subaru_eg33_f7.h @@ -4,5 +4,5 @@ #define SIGNATURE_BOARD subaru_eg33_f7 #define SIGNATURE_DATE 2021.02.08 -#define SIGNATURE_HASH 2526856374 -#define TS_SIGNATURE "rusEFI 2021.02.08.subaru_eg33_f7.2526856374" +#define SIGNATURE_HASH 3373300021 +#define TS_SIGNATURE "rusEFI 2021.02.08.subaru_eg33_f7.3373300021" diff --git a/firmware/controllers/settings.cpp b/firmware/controllers/settings.cpp index 1fa15d166b..ffb7539e03 100644 --- a/firmware/controllers/settings.cpp +++ b/firmware/controllers/settings.cpp @@ -1282,7 +1282,7 @@ static void setValue(const char *paramStr, const char *valueStr) { } else if (strEqualCaseInsensitive(paramStr, "vvt_offset")) { engineConfiguration->vvtOffset = valueF; } else if (strEqualCaseInsensitive(paramStr, "vvt_mode")) { - engineConfiguration->vvtMode = (vvt_mode_e)valueI; + engineConfiguration->vvtMode[0] = (vvt_mode_e)valueI; } else if (strEqualCaseInsensitive(paramStr, "operation_mode")) { engineConfiguration->ambiguousOperationMode = (operation_mode_e)valueI; } else if (strEqualCaseInsensitive(paramStr, "vvtCamSensorUseRise")) { diff --git a/firmware/controllers/trigger/trigger_central.cpp b/firmware/controllers/trigger/trigger_central.cpp index 8a419d0d42..d6b093829a 100644 --- a/firmware/controllers/trigger/trigger_central.cpp +++ b/firmware/controllers/trigger/trigger_central.cpp @@ -129,7 +129,7 @@ void hwHandleVvtCamSignal(trigger_value_e front, efitick_t nowNt, int index DECL } - if (!vvtWithRealDecoder(engineConfiguration->vvtMode) && (CONFIG(vvtCamSensorUseRise) ^ (front != TV_FALL))) { + if (!vvtWithRealDecoder(engineConfiguration->vvtMode[camIndex]) && (CONFIG(vvtCamSensorUseRise) ^ (front != TV_FALL))) { // todo: there should be a way to always use real trigger code for this logic? return; } @@ -191,7 +191,7 @@ void hwHandleVvtCamSignal(trigger_value_e front, efitick_t nowNt, int index DECL #endif /* EFI_TUNER_STUDIO */ } - switch(engineConfiguration->vvtMode) { + switch(engineConfiguration->vvtMode[camIndex]) { case VVT_2JZ: // we do not know if we are in sync or out of sync, so we have to be looking for both possibilities if ((currentPosition < engineConfiguration->fsio_setting[14] || currentPosition > engineConfiguration->fsio_setting[15]) && @@ -227,7 +227,7 @@ void hwHandleVvtCamSignal(trigger_value_e front, efitick_t nowNt, int index DECL warning(CUSTOM_ERR_VVT_OUT_OF_RANGE, "Please adjust vvtOffset since position %f", tc->vvtPosition); } - switch (engineConfiguration->vvtMode) { + switch (engineConfiguration->vvtMode[camIndex]) { case VVT_FIRST_HALF: { @@ -625,7 +625,7 @@ void triggerInfo(void) { #if EFI_PROD_CODE if (HAVE_CAM_INPUT()) { scheduleMsg(logger, "VVT input: %s mode %s", hwPortname(engineConfiguration->camInputs[0]), - getVvt_mode_e(engineConfiguration->vvtMode)); + getVvt_mode_e(engineConfiguration->vvtMode[0])); scheduleMsg(logger, "VVT event counters: %d/%d", engine->triggerCentral.vvtEventRiseCounter, engine->triggerCentral.vvtEventFallCounter); } diff --git a/firmware/integration/rusefi_config.txt b/firmware/integration/rusefi_config.txt index 62a03ddba9..119260e7a8 100644 --- a/firmware/integration/rusefi_config.txt +++ b/firmware/integration/rusefi_config.txt @@ -1299,8 +1299,7 @@ float[MAP_ACCEL_TAPER] mapAccelTaperMult;;"mult", 1, 0, 0.0, 300, float[NARROW_BAND_WIDE_BAND_CONVERSION_SIZE] narrowToWideOxygenBins;Narrow Band WBO Approximation;"V", 1, 0, -10.0, 10.0, 3 float[NARROW_BAND_WIDE_BAND_CONVERSION_SIZE] narrowToWideOxygen;;"ratio", 1, 0, -40.0, 40.0, 2 - vvt_mode_e vvtMode;set vvt_mode X - vvt_mode_e secondVvtMode;set second_vvt_mode X + vvt_mode_e[CAMS_PER_BANK iterate] vvtMode;set vvt_mode X uint8_t[22] unusedOldBiquad;;"units", 1, 0, -20, 100, 0 float[CLT_TIMING_CURVE_SIZE] cltTimingBins;CLT-based timing correction;"C", 1, 0, -100.0, 250.0, 1 float[CLT_TIMING_CURVE_SIZE] cltTimingExtra;;"degree", 1, 0, -400.0, 400.0, 0 diff --git a/unit_tests/tests/trigger/test_cam_vvt_input.cpp b/unit_tests/tests/trigger/test_cam_vvt_input.cpp index f1fa09ca69..ad736cd9bc 100644 --- a/unit_tests/tests/trigger/test_cam_vvt_input.cpp +++ b/unit_tests/tests/trigger/test_cam_vvt_input.cpp @@ -82,7 +82,7 @@ TEST(trigger, testCamInput) { // changing to 'ONE TOOTH' trigger on CRANK with CAM/VVT setOperationMode(engineConfiguration, FOUR_STROKE_CRANK_SENSOR); engineConfiguration->useOnlyRisingEdgeForTrigger = true; - engineConfiguration->vvtMode = VVT_FIRST_HALF; + engineConfiguration->vvtMode[0] = VVT_FIRST_HALF; engineConfiguration->vvtOffset = 720; eth.setTriggerType(TT_ONE PASS_ENGINE_PARAMETER_SUFFIX); engineConfiguration->camInputs[0] = GPIOA_10; // we just need to indicate that we have CAM diff --git a/unit_tests/tests/trigger/test_quad_cam.cpp b/unit_tests/tests/trigger/test_quad_cam.cpp index 03ad51dc91..1dfce2bc42 100644 --- a/unit_tests/tests/trigger/test_quad_cam.cpp +++ b/unit_tests/tests/trigger/test_quad_cam.cpp @@ -15,7 +15,7 @@ TEST(trigger, testQuadCam) { // engineConfiguration->vvtMode = VVT_2JZ; // engineConfiguration->secondVvtMode = VVT_MIATA_NB2; - engineConfiguration->vvtMode = VVT_MIATA_NB2; + engineConfiguration->vvtMode[0] = VVT_MIATA_NB2; engineConfiguration->camInputs[0] = GPIOA_10; // we just need to indicate that we have CAM