Skip to content

Commit

Permalink
Lamborghini Diablo firing order
Browse files Browse the repository at this point in the history
  • Loading branch information
rusefi committed Jun 9, 2017
1 parent 1af12ec commit e4d8834
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 3 deletions.
2 changes: 2 additions & 0 deletions firmware/controllers/algo/auto_generated_enums.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -398,6 +398,8 @@ case FO_1_10_9_4_3_6_5_8_7_2:
return "FO_1_10_9_4_3_6_5_8_7_2";
case FO_1_7_5_11_3_9_6_12_2_8_4_10:
return "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:
return "FO_1_7_4_10_2_8_6_12_3_9_5_11";
case Force_4b_firing_order:
return "Force_4b_firing_order";
}
Expand Down
1 change: 1 addition & 0 deletions firmware/controllers/algo/firing_order.h
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,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

// max used = 15

Expand Down
4 changes: 4 additions & 0 deletions firmware/controllers/math/engine_math.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -329,6 +329,7 @@ static 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 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 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 int getFiringOrderLength(DECLARE_ENGINE_PARAMETER_SIGNATURE) {

Expand Down Expand Up @@ -369,6 +370,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:
return 12;

default:
Expand Down Expand Up @@ -435,6 +437,8 @@ int getCylinderId(int index DECLARE_ENGINE_PARAMETER_SUFFIX) {
// 12 cylinder
case FO_1_7_5_11_3_9_6_12_2_8_4_10:
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];

default:
warning(CUSTOM_OBD_UNKNOWN_FIRING_ORDER, "getCylinderId not supported for %d", CONFIG(specs.firingOrder));
Expand Down
2 changes: 1 addition & 1 deletion firmware/integration/rusefi_config.txt
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,7 @@ cylinders_count_t cylindersCount;
! FO_1_8_4_3_6_5_7_2 = 5
! FO_1_2_4_5_3 = 6

custom firing_order_e 4 bits, U32, @OFFSET@, [0:4], "One Cylinder", "1-3-4-2", "1-2-4-3", "1-3-2-4", "1-5-3-6-2-4", "1-8-4-3-6-5-7-2", "1-2-4-5-3", "1-4-2-5-3-6", "1-2", "1_2_3_4_5_6", "1-2-3", "1-8-7-2-6-5-4-3", "1-5-4-2-6-3-7-8", "1-6-3-2-5-4", "1-10-9-4-3-6-5-8-7_2", "1-7-5-11-3-9-6-12-2-8-4-10", "fo16", "fo17", "INVALID"
custom firing_order_e 4 bits, U32, @OFFSET@, [0:4], "One Cylinder", "1-3-4-2", "1-2-4-3", "1-3-2-4", "1-5-3-6-2-4", "1-8-4-3-6-5-7-2", "1-2-4-5-3", "1-4-2-5-3-6", "1-2", "1_2_3_4_5_6", "1-2-3", "1-8-7-2-6-5-4-3", "1-5-4-2-6-3-7-8", "1-6-3-2-5-4", "1-10-9-4-3-6-5-8-7_2", "1-7-5-11-3-9-6-12-2-8-4-10", "1-7-4-10-2-8-6-12-3-9-5-11", "fo17", "fo18", "fo19", "fo20", "INVALID"
firing_order_e firingOrder;
end_struct

Expand Down
4 changes: 2 additions & 2 deletions firmware/tunerstudio/rusefi.ini
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ enable2ndByteCanID = false

; see PAGE_0_SIZE in C source code
; CONFIG_DEFINITION_START
; this section was generated automatically by ConfigDefinition.jar based on rusefi_config.txt Wed Jun 07 23:04:15 EDT 2017
; this section was generated automatically by ConfigDefinition.jar based on rusefi_config.txt Thu Jun 08 20:34:52 EDT 2017

pageSize = 16376
page = 1
Expand Down Expand Up @@ -126,7 +126,7 @@ page = 1
sparkDwellValues = array, F32, 368, [8], "ms", 1, 0.0, 0.0, 30.0, 2
displacement = scalar, F32, 400, "L", 1, 0, 0, 1000.0, 2
cylindersCount = bits, U32, 404, [0:3], "INVALID", 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, "INVALID", "INVALID", "INVALID"
firingOrder = bits, U32, 408, [0:4], "One Cylinder", "1-3-4-2", "1-2-4-3", "1-3-2-4", "1-5-3-6-2-4", "1-8-4-3-6-5-7-2", "1-2-4-5-3", "1-4-2-5-3-6", "1-2", "1_2_3_4_5_6", "1-2-3", "1-8-7-2-6-5-4-3", "1-5-4-2-6-3-7-8", "1-6-3-2-5-4", "1-10-9-4-3-6-5-8-7_2", "1-7-5-11-3-9-6-12-2-8-4-10", "fo16", "fo17", "INVALID"
firingOrder = bits, U32, 408, [0:4], "One Cylinder", "1-3-4-2", "1-2-4-3", "1-3-2-4", "1-5-3-6-2-4", "1-8-4-3-6-5-7-2", "1-2-4-5-3", "1-4-2-5-3-6", "1-2", "1_2_3_4_5_6", "1-2-3", "1-8-7-2-6-5-4-3", "1-5-4-2-6-3-7-8", "1-6-3-2-5-4", "1-10-9-4-3-6-5-8-7_2", "1-7-5-11-3-9-6-12-2-8-4-10", "1-7-4-10-2-8-6-12-3-9-5-11", "fo17", "fo18", "fo19", "fo20", "INVALID"
cylinderBore = scalar, F32, 412, "mm", 1, 0, 0, 20000.0, 2
sensorSnifferRpmThreshold = scalar, S32, 416, "RPM", 1, 0, 0,30000, 0
rpmHardLimit = scalar, S32, 420, "rpm", 1, 0, 0, 20000.0, 2
Expand Down

0 comments on commit e4d8834

Please sign in to comment.