Most important feature: VAG W12 firing order

This commit is contained in:
rusefi 2019-09-14 14:47:22 -04:00
parent 3777b7662f
commit 664777587b
2 changed files with 5 additions and 0 deletions

View File

@ -46,6 +46,7 @@ typedef enum {
// 12 cylinder
FO_1_7_5_11_3_9_6_12_2_8_4_10 = 15, // bmw M70 etc
FO_1_7_4_10_2_8_6_12_3_9_5_11 = 16, // lamborghini, typical rusEfi use-case
FO_1_12_5_8_3_10_6_7_2_11_4_9 = 18, // VAG W12
// max used = 18

View File

@ -299,6 +299,7 @@ static const int order_1_10_9_4_3_6_5_8_7_2[] = {1, 10, 9, 4, 3, 6, 5, 8, 7, 2};
// 12 cyliner
static const int order_1_7_5_11_3_9_6_12_2_8_4_10[] = {1, 7, 5, 11, 3, 9, 6, 12, 2, 8, 4, 10};
static const int order_1_7_4_10_2_8_6_12_3_9_5_11[] = {1, 7, 4, 10, 2, 8, 6, 12, 3, 9, 5, 11};
static const int order_1_12_5_8_3_10_6_7_2_11_4_9[] = {1, 12, 5, 8, 3, 10, 6, 7, 2, 11, 4, 9};
static int getFiringOrderLength(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
@ -341,6 +342,7 @@ static int getFiringOrderLength(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
// 12 cylinder
case FO_1_7_5_11_3_9_6_12_2_8_4_10:
case FO_1_7_4_10_2_8_6_12_3_9_5_11:
case FO_1_12_5_8_3_10_6_7_2_11_4_9:
return 12;
default:
@ -422,6 +424,8 @@ int getCylinderId(int index DECLARE_ENGINE_PARAMETER_SUFFIX) {
return order_1_7_5_11_3_9_6_12_2_8_4_10[index];
case FO_1_7_4_10_2_8_6_12_3_9_5_11:
return order_1_7_4_10_2_8_6_12_3_9_5_11[index];
case FO_1_12_5_8_3_10_6_7_2_11_4_9:
return order_1_12_5_8_3_10_6_7_2_11_4_9[index];
default:
warning(CUSTOM_OBD_UNKNOWN_FIRING_ORDER, "getCylinderId not supported for %d", CONFIG(specs.firingOrder));