From 3cfbea94839d47bf99363ef1c2aab635f06e4fe4 Mon Sep 17 00:00:00 2001 From: rusEfi Date: Sun, 22 May 2016 13:07:12 -0400 Subject: [PATCH] auto-sync --- firmware/controllers/algo/auto_generated_enums.cpp | 4 ++++ firmware/controllers/algo/rusefi_enums.h | 4 +++- firmware/controllers/math/engine_math.cpp | 4 ++++ firmware/controllers/trigger/trigger_decoder.cpp | 4 ++++ firmware/controllers/trigger/trigger_gm.cpp | 14 ++++++++++++++ firmware/controllers/trigger/trigger_gm.h | 1 + firmware/svnversion.h | 4 ++-- firmware/tunerstudio/rusefi.ini | 2 +- 8 files changed, 33 insertions(+), 4 deletions(-) diff --git a/firmware/controllers/algo/auto_generated_enums.cpp b/firmware/controllers/algo/auto_generated_enums.cpp index 0329f338c6..2faf6e8035 100644 --- a/firmware/controllers/algo/auto_generated_enums.cpp +++ b/firmware/controllers/algo/auto_generated_enums.cpp @@ -121,6 +121,8 @@ case Force_4b_trigger_type: return "Force_4b_trigger_type"; case TT_DODGE_NEON_1995: return "TT_DODGE_NEON_1995"; +case TT_GM_LS_24: + return "TT_GM_LS_24"; case TT_DODGE_NEON_2003: return "TT_DODGE_NEON_2003"; case TT_FORD_ASPIRE: @@ -350,6 +352,8 @@ case FO_ONE_CYLINDER: return "FO_ONE_CYLINDER"; case FO_1_2_3: return "FO_1_2_3"; +case FO_1_8_7_2_6_5_4_3: + return "FO_1_8_7_2_6_5_4_3"; case Force_4b_firing_order: return "Force_4b_firing_order"; } diff --git a/firmware/controllers/algo/rusefi_enums.h b/firmware/controllers/algo/rusefi_enums.h index bb4216e3ac..22f7ee9140 100644 --- a/firmware/controllers/algo/rusefi_enums.h +++ b/firmware/controllers/algo/rusefi_enums.h @@ -177,7 +177,9 @@ typedef enum { TT_ROVER_K = 26, - TT_UNUSED = 27, // this is used if we want to iterate over all trigger types + TT_GM_LS_24 = 27, + + TT_UNUSED = 28, // this is used if we want to iterate over all trigger types Force_4b_trigger_type = ENUM_32_BITS, } trigger_type_e; diff --git a/firmware/controllers/math/engine_math.cpp b/firmware/controllers/math/engine_math.cpp index 38ce310515..a5b228d32d 100644 --- a/firmware/controllers/math/engine_math.cpp +++ b/firmware/controllers/math/engine_math.cpp @@ -319,6 +319,8 @@ static int order_1_THEN_2_THEN_3_THEN_4_THEN_5_THEN_6[] = { 1, 2, 3, 4, 5, 6 }; static int order_1_8_4_3_6_5_7_2[] = { 1, 8, 4, 3, 6, 5, 7, 2 }; +static int order_1_8_7_2_6_5_4_3[] = { 1, 8, 7, 2, 6, 5, 4, 3 }; + static int order_1_2[] = {1, 2}; static int order_1_2_3[] = {1, 2, 3}; @@ -360,6 +362,8 @@ int getCylinderId(firing_order_e firingOrder, int index) { // 8 cylinder case FO_1_8_4_3_6_5_7_2: return order_1_8_4_3_6_5_7_2[index]; + case FO_1_8_7_2_6_5_4_3: + return order_1_8_7_2_6_5_4_3[index]; default: warning(OBD_PCM_Processor_Fault, "getCylinderId not supported for %d", firingOrder); diff --git a/firmware/controllers/trigger/trigger_decoder.cpp b/firmware/controllers/trigger/trigger_decoder.cpp index 54e69d8d0b..b3734173af 100644 --- a/firmware/controllers/trigger/trigger_decoder.cpp +++ b/firmware/controllers/trigger/trigger_decoder.cpp @@ -528,6 +528,10 @@ void TriggerShape::initializeTriggerShape(Logging *logger DECLARE_ENGINE_PARAMET initializeRoverK(triggerShape); break; + case TT_GM_LS_24: + initGmLS24(triggerShape); + break; + default: firmwareError("initializeTriggerShape() not implemented: %d", triggerConfig->type); return; diff --git a/firmware/controllers/trigger/trigger_gm.cpp b/firmware/controllers/trigger/trigger_gm.cpp index 419ed21d2f..d5cbc3f4e5 100644 --- a/firmware/controllers/trigger/trigger_gm.cpp +++ b/firmware/controllers/trigger/trigger_gm.cpp @@ -7,6 +7,7 @@ #include "trigger_gm.h" +// GM7X looks like this is not complete void configureGmTriggerShape(TriggerShape *s) { s->initialize(FOUR_STROKE_CAM_SENSOR, false); @@ -35,3 +36,16 @@ void configureGmTriggerShape(TriggerShape *s) { s->addEvent(720.0, T_PRIMARY, TV_FALL); } +/** + * https://www.mediafire.com/?40mfgeoe4ctti + * http://www.ls1gto.com/forums/archive/index.php/t-190549.htm + * http://www.ls2.com/forums/showthread.php/834483-LS-Timing-Reluctor-Wheels-Explained + * + */ +void initGmLS24(TriggerShape *s) { + + // todo: finish this + setToothedWheelConfiguration(s, 24, 0, FOUR_STROKE_CRANK_SENSOR); + +} + diff --git a/firmware/controllers/trigger/trigger_gm.h b/firmware/controllers/trigger/trigger_gm.h index 247dae53a8..47d7b34414 100644 --- a/firmware/controllers/trigger/trigger_gm.h +++ b/firmware/controllers/trigger/trigger_gm.h @@ -11,5 +11,6 @@ #include "trigger_structure.h" void configureGmTriggerShape(TriggerShape *s); +void initGmLS24(TriggerShape *s); #endif /* TRIGGER_GM_H_ */ diff --git a/firmware/svnversion.h b/firmware/svnversion.h index 09466a9060..33128d81be 100644 --- a/firmware/svnversion.h +++ b/firmware/svnversion.h @@ -1,5 +1,5 @@ // This file was generated by Version2Header -// Thu May 19 21:51:00 EDT 2016 +// Sun May 22 12:33:02 EDT 2016 #ifndef VCS_VERSION -#define VCS_VERSION "9916" +#define VCS_VERSION "9923" #endif diff --git a/firmware/tunerstudio/rusefi.ini b/firmware/tunerstudio/rusefi.ini index 73a2cd2111..6b6d904d5d 100644 --- a/firmware/tunerstudio/rusefi.ini +++ b/firmware/tunerstudio/rusefi.ini @@ -126,7 +126,7 @@ page = 1 tpsAdcChannel = bits, U32, 524, [0:4] "PA0", "PA1", "PA2", "PA3", "PA4", "PA5", "PA6", "PA7", "PB0", "PB1", "PC0", "PC1", "PC2", "PC3", "PC4", "PC5", "Disabled", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID" ;skipping overrideCrankingIgnition offset 528 sensorChartFrequency = scalar, S32, 532, "index", 1, 0, 0, 300, 0 ; size 4 - trigger_type = bits, U32, 536, [0:4], "custom toothed wheel", "ford aspire", "dodge neon", "Miata NA", "Miata NB", "GM_7X", "Cooper", "Mazda SOHC 4", "60/2", "36/1", "Accord CD", "MITSU", "ACCORD 2", "ACCORD DIP", "Neon 2003", "MAZDA D 1+4", "1+1", "1+60/2", "Single Tooth", "Dodge Ram 1+16", "60/2 VW", "Accord 1+24", "DODGE STRATUS", "36_2_2_2", "Nissan", "2JZ", "Rover K", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID" + trigger_type = bits, U32, 536, [0:4], "custom toothed wheel", "ford aspire", "dodge neon", "Miata NA", "Miata NB", "GM_7X", "Cooper", "Mazda SOHC 4", "60/2", "36/1", "Accord CD", "MITSU", "ACCORD 2", "ACCORD DIP", "Neon 2003", "MAZDA D 1+4", "1+1", "1+60/2", "Single Tooth", "Dodge Ram 1+16", "60/2 VW", "Accord 1+24", "DODGE STRATUS", "36_2_2_2", "Nissan", "2JZ", "Rover K", "GM LS 23", "trg28", "trg29", "trg30", "INVALID" trigger_customIsSynchronizationNeeded= bits, U32, 540, [0:0], "false", "true" trigger_customNeedSecondTriggerInput= bits, U32, 540, [1:1], "false", "true" trigger_useOnlyFirstChannel= bits, U32, 540, [2:2], "false", "true"