rusefi/firmware/controllers/algo/firing_order.h

85 lines
2.5 KiB
C
Raw Normal View History

2016-07-20 16:04:27 -07:00
/*
* @file firing_order.h
*
2019-11-24 20:49:05 -08:00
* See also FiringOrderTSLogic.java
*
2016-07-20 16:04:27 -07:00
* @date Jul 20, 2016
2020-01-07 21:02:40 -08:00
* @author Andrey Belomutskiy, (c) 2012-2020
2016-07-20 16:04:27 -07:00
*/
2018-09-29 07:39:21 -07:00
#include "rusefi_enums.h"
2018-09-29 07:31:19 -07:00
2019-11-24 20:49:05 -08:00
#pragma once
2016-07-20 16:04:27 -07:00
2021-09-17 21:18:06 -07:00
/**
* thank you https://www.ingenieriaymecanicaautomotriz.com/firing-order-its-purpose-and-order-in-different-numbers-of-cylinders/
*/
2022-05-01 20:07:12 -07:00
typedef enum __attribute__ ((__packed__)) {
2016-07-20 16:04:27 -07:00
FO_1 = 0,
// 2 cylinder
FO_1_2 = 8,
// 3 cylinder
FO_1_2_3 = 10,
FO_1_3_2 = 24,
2016-07-20 16:04:27 -07:00
// 4 cylinder
2016-12-18 07:02:38 -08:00
FO_1_3_4_2 = 1, // typical inline 4
2016-07-20 16:04:27 -07:00
FO_1_2_4_3 = 2,
2016-12-18 07:02:38 -08:00
FO_1_3_2_4 = 3, // for example horizontally opposed engine
2019-08-15 16:36:16 -07:00
FO_1_4_3_2 = 17, // for example VW aircooled boxer engine
2017-02-07 22:03:36 -08:00
2016-07-20 16:04:27 -07:00
// 5 cylinder
FO_1_2_4_5_3 = 6,
// 6 cylinder
2021-09-17 21:18:06 -07:00
FO_1_5_3_6_2_4 = 4, // VAG VR6, Straight-6, Opel Omega A
FO_1_6_5_4_3_2 = 30, // GM 3800 engine
FO_1_4_5_2_3_6 = 31, // Chevrolet Corvair
FO_1_4_2_5_3_6 = 7, // Mercedes-Benz M104 engine
FO_1_2_3_4_5_6 = 9, // all Nissan v6, GM 60-Degree V6 engine
2017-01-12 21:03:30 -08:00
FO_1_6_3_2_5_4 = 13, // EG33
2021-07-08 17:42:35 -07:00
FO_1_4_3_6_2_5 = 27, // VAG v6 different from VAG VR6
2021-08-24 04:28:56 -07:00
FO_1_6_2_4_3_5 = 29, // Some 911
2016-07-20 16:04:27 -07:00
2020-05-04 20:38:32 -07:00
// todo: one day we shall support 7 cylinder radial, probably not before one actually approaches us
2021-09-17 21:18:06 -07:00
// 1-3-5-7-2-4-6 7-cylinder single row radial engine
2020-05-04 20:38:32 -07:00
2017-02-07 22:03:36 -08:00
// 8 cylinder
2023-03-26 08:26:38 -07:00
FO_1_8_4_3_6_5_7_2 = 5, // SBC, Dodge
2017-02-07 22:03:36 -08:00
FO_1_8_7_2_6_5_4_3 = 11,
FO_1_5_4_2_6_3_7_8 = 12, // Ford Mustang
2019-09-28 07:25:57 -07:00
FO_1_2_7_8_4_5_6_3 = 19,
2020-04-29 13:46:59 -07:00
FO_1_3_7_2_6_5_4_8 = 20, // Ford 5.0 HO and 351W
FO_1_2_3_4_5_6_7_8 = 25, // linearly incrementing, for V8 testing
FO_1_5_4_8_6_3_7_2 = 26, // Audi 4.2 40v V8
2024-01-11 09:49:49 -08:00
FO_1_5_4_8_3_7_2_6 = 32, // Ford Voodoo
FO_1_8_7_3_6_5_4_2 = 28, // VH41DE (Japaneese Y32 Variant)
2020-04-29 13:46:59 -07:00
// 9 cylinder - for instance radial :)
2020-05-04 20:38:32 -07:00
// PS: Matt says that 9cyl is actually 1-3-5-7-9-2-4-6-8 or 1-8-6-4-2-9-7-5-3 for reverse rotation
2020-04-29 13:46:59 -07:00
FO_1_2_3_4_5_6_7_8_9 = 21,
2017-02-07 22:03:36 -08:00
// 10 cylinder
FO_1_10_9_4_3_6_5_8_7_2 = 14, // dodge and viper ram v10
2021-09-17 21:18:06 -07:00
// 1-6-5-10-2-7-3-8-4-9 BMW S85
2017-02-07 22:03:36 -08:00
// 12 cylinder
2021-09-17 21:18:06 -07:00
FO_1_7_5_11_3_9_6_12_2_8_4_10 = 15, // bmw M70 & M73, Ferrari 456M GT V12
FO_1_7_4_10_2_8_6_12_3_9_5_11 = 16, // Lamborghini Diablo VT, typical rusEfi use-case
2021-09-18 11:57:24 -07:00
FO_1_12_5_8_3_10_6_7_2_11_4_9 = 18, // VAG W12, M120
2021-09-17 21:18:06 -07:00
// 1,12,7,6,3,10,11,2,5,8,9,4 Rolls-Royce Merlin
// 1,12,4,9,2,11,6,7,3,10,5,8 Lamborghini Aventador
2020-05-21 17:44:14 -07:00
FO_1_2_3_4_5_6_7_8_9_10_11_12 = 23, // mostly for hardware testing purposes
2017-02-07 22:03:36 -08:00
// 16 cylinder
// unfortunately not supported by default firmware because MAX_CYLINDER_COUNT=12 by default
2020-05-21 15:28:35 -07:00
FO_1_14_9_4_7_12_15_6_13_8_3_16_11_2_5_10 = 22, // WR16
2024-01-11 09:49:49 -08:00
// next value to use: 33
2017-02-07 22:03:36 -08:00
2016-07-20 16:04:27 -07:00
} firing_order_e;