auto-sync
This commit is contained in:
parent
6f3601cb75
commit
425a977ac6
|
@ -91,7 +91,7 @@ void setGy6139qmbDefaultEngineConfiguration(DECLARE_ENGINE_PARAMETER_F) {
|
|||
engineConfiguration->specs.cylindersCount = 1;
|
||||
setOperationMode(engineConfiguration, FOUR_STROKE_CRANK_SENSOR);
|
||||
|
||||
engineConfiguration->specs.firingOrder = FO_ONE_CYLINDER;
|
||||
engineConfiguration->specs.firingOrder = FO_1;
|
||||
|
||||
/**
|
||||
* We treat the trigger as 8-1 toothed wheel
|
||||
|
|
|
@ -32,7 +32,7 @@ void setBmwE34(DECLARE_ENGINE_PARAMETER_F) {
|
|||
//Base engine setting
|
||||
engineConfiguration->specs.cylindersCount = 6;
|
||||
engineConfiguration->specs.displacement = 2.91;
|
||||
engineConfiguration->specs.firingOrder = FO_1_THEN_5_THEN_3_THEN_6_THEN_2_THEN_4;
|
||||
engineConfiguration->specs.firingOrder = FO_1_5_3_6_2_4;
|
||||
engineConfiguration->injectionMode = IM_BATCH;
|
||||
engineConfiguration->twoWireBatchInjection = true;
|
||||
engineConfiguration->ignitionMode = IM_WASTED_SPARK;
|
||||
|
|
|
@ -80,7 +80,7 @@ void setCitroenBerlingoTU3JPConfiguration(DECLARE_ENGINE_PARAMETER_F) {
|
|||
engineConfiguration->globalTriggerAngleOffset = 114;
|
||||
engineConfiguration->specs.cylindersCount = 4;
|
||||
engineConfiguration->specs.displacement = 1.360;
|
||||
engineConfiguration->specs.firingOrder = FO_1_THEN_3_THEN_4_THEN2;
|
||||
engineConfiguration->specs.firingOrder = FO_1_3_4_2;
|
||||
engineConfiguration->ignitionMode = IM_WASTED_SPARK;
|
||||
engineConfiguration->injectionMode = IM_BATCH;
|
||||
engineConfiguration->crankingInjectionMode = IM_SIMULTANEOUS;
|
||||
|
|
|
@ -181,7 +181,7 @@ void setDodgeNeon1995EngineConfiguration(DECLARE_ENGINE_PARAMETER_F) {
|
|||
// set_ignition_mode 2
|
||||
engineConfiguration->ignitionMode = IM_WASTED_SPARK;
|
||||
// set_firing_order 2
|
||||
engineConfiguration->specs.firingOrder = FO_1_THEN_3_THEN_4_THEN2;
|
||||
engineConfiguration->specs.firingOrder = FO_1_3_4_2;
|
||||
|
||||
// set_global_trigger_offset_angle 497
|
||||
engineConfiguration->globalTriggerAngleOffset = 497;
|
||||
|
|
|
@ -17,7 +17,7 @@ EXTERN_ENGINE
|
|||
void setDodgeStratus(DECLARE_ENGINE_PARAMETER_F) {
|
||||
engineConfiguration->trigger.type = TT_DODGE_STRATUS;
|
||||
engineConfiguration->specs.cylindersCount = 6;
|
||||
engineConfiguration->specs.firingOrder = FO_1_THEN_2_THEN_3_THEN_4_THEN_5_THEN_6;
|
||||
engineConfiguration->specs.firingOrder = FO_1_2_3_4_5_6;
|
||||
|
||||
engineConfiguration->map.sensor.type = MT_DODGE_NEON_2003;
|
||||
setAlgorithm(LM_SPEED_DENSITY PASS_ENGINE_PARAMETER);
|
||||
|
|
|
@ -31,7 +31,7 @@ void setFordInline6(DECLARE_ENGINE_PARAMETER_F) {
|
|||
setOperationMode(engineConfiguration, FOUR_STROKE_CAM_SENSOR);
|
||||
|
||||
engineConfiguration->ignitionMode = IM_ONE_COIL;
|
||||
engineConfiguration->specs.firingOrder = FO_1_THEN_5_THEN_3_THEN_6_THEN_2_THEN_4;
|
||||
engineConfiguration->specs.firingOrder = FO_1_5_3_6_2_4;
|
||||
engineConfiguration->crankingInjectionMode = IM_SIMULTANEOUS;
|
||||
engineConfiguration->injectionMode = IM_BATCH;
|
||||
engineConfiguration->twoWireBatchInjection = true;
|
||||
|
|
|
@ -101,7 +101,7 @@ void setFordAspireEngineConfiguration(DECLARE_ENGINE_PARAMETER_F) {
|
|||
// Denso 195500-2110
|
||||
engineConfiguration->injector.flow = 119.8;
|
||||
|
||||
engineConfiguration->specs.firingOrder = FO_1_THEN_3_THEN_4_THEN2;
|
||||
engineConfiguration->specs.firingOrder = FO_1_3_4_2;
|
||||
engineConfiguration->globalTriggerAngleOffset = 175;
|
||||
engineConfiguration->ignitionOffset = 87;
|
||||
engineConfiguration->injectionOffset = 54 + 360;
|
||||
|
|
|
@ -25,7 +25,7 @@ void setFordFiestaDefaultEngineConfiguration(DECLARE_ENGINE_PARAMETER_F) {
|
|||
engineConfiguration->trigger.type = TT_TOOTHED_WHEEL_36_1;
|
||||
|
||||
engineConfiguration->ignitionMode = IM_WASTED_SPARK;
|
||||
engineConfiguration->specs.firingOrder = FO_1_THEN_3_THEN_4_THEN2;
|
||||
engineConfiguration->specs.firingOrder = FO_1_3_4_2;
|
||||
engineConfiguration->hasMafSensor = true;
|
||||
engineConfiguration->afr.hwChannel = EFI_ADC_NONE;
|
||||
engineConfiguration->mafAdcChannel = EFI_ADC_14;
|
||||
|
|
|
@ -76,7 +76,7 @@ void setHonda600(DECLARE_ENGINE_PARAMETER_F) {
|
|||
engineConfiguration->specs.cylindersCount = 4;
|
||||
engineConfiguration->crankingInjectionMode = IM_SIMULTANEOUS;
|
||||
engineConfiguration->injectionMode = IM_SEQUENTIAL;
|
||||
engineConfiguration->specs.firingOrder = FO_1_THEN_3_THEN_4_THEN2;
|
||||
engineConfiguration->specs.firingOrder = FO_1_3_4_2;
|
||||
engineConfiguration->injectionOffset = 320;
|
||||
engineConfiguration->cranking.rpm = 800;
|
||||
// engineConfiguration->ignitionMode = IM_WASTED_SPARK; //IM_INDIVIDUAL_COILS;
|
||||
|
|
|
@ -170,7 +170,7 @@ void common079721_2351(engine_configuration_s *engineConfiguration, board_config
|
|||
engineConfiguration->engineChartSize = 150;
|
||||
|
||||
engineConfiguration->specs.cylindersCount = 4;
|
||||
engineConfiguration->specs.firingOrder = FO_1_THEN_3_THEN_4_THEN2;
|
||||
engineConfiguration->specs.firingOrder = FO_1_3_4_2;
|
||||
|
||||
boardConfiguration->fuelPumpPin = GPIO_UNASSIGNED; // fuel pump is not controlled by ECU on this engine
|
||||
|
||||
|
|
|
@ -100,7 +100,7 @@ void setMiataNA_1_6_Configuration(DECLARE_ENGINE_PARAMETER_F) {
|
|||
engineConfiguration->specs.displacement = 1.6;
|
||||
|
||||
engineConfiguration->specs.cylindersCount = 4;
|
||||
engineConfiguration->specs.firingOrder = FO_1_THEN_3_THEN_4_THEN2;
|
||||
engineConfiguration->specs.firingOrder = FO_1_3_4_2;
|
||||
|
||||
engineConfiguration->vbattDividerCoeff = 9.75;// ((float) (8.2 + 33)) / 8.2 * 2;
|
||||
|
||||
|
|
|
@ -32,7 +32,7 @@ void setMazdaMiataNbEngineConfiguration(DECLARE_ENGINE_PARAMETER_F) {
|
|||
// set_ignition_mode 2
|
||||
engineConfiguration->ignitionMode = IM_WASTED_SPARK;
|
||||
// set_firing_order 2
|
||||
engineConfiguration->specs.firingOrder = FO_1_THEN_3_THEN_4_THEN2;
|
||||
engineConfiguration->specs.firingOrder = FO_1_3_4_2;
|
||||
|
||||
setThermistorConfiguration(&engineConfiguration->clt, 0, 32500, 30, 7550, 100, 700);
|
||||
engineConfiguration->clt.config.bias_resistor = 2700;
|
||||
|
|
|
@ -25,7 +25,7 @@ void setMitsubishiConfiguration(DECLARE_ENGINE_PARAMETER_F) {
|
|||
|
||||
// set_ignition_mode 2
|
||||
engineConfiguration->ignitionMode = IM_WASTED_SPARK;
|
||||
engineConfiguration->specs.firingOrder = FO_1_THEN_3_THEN_4_THEN2;
|
||||
engineConfiguration->specs.firingOrder = FO_1_3_4_2;
|
||||
|
||||
// set_global_trigger_offset_angle 671
|
||||
engineConfiguration->globalTriggerAngleOffset = 671;
|
||||
|
|
|
@ -19,7 +19,7 @@ void setSachs(DECLARE_ENGINE_PARAMETER_F) {
|
|||
engineConfiguration->specs.cylindersCount = 1;
|
||||
|
||||
setOperationMode(engineConfiguration, TWO_STROKE);
|
||||
engineConfiguration->specs.firingOrder = FO_ONE_CYLINDER;
|
||||
engineConfiguration->specs.firingOrder = FO_1;
|
||||
engineConfiguration->engineChartSize = 400;
|
||||
|
||||
// set_injection_offset 0
|
||||
|
|
|
@ -30,7 +30,7 @@ static void common2jz(DECLARE_ENGINE_PARAMETER_F) {
|
|||
|
||||
engineConfiguration->specs.displacement = 3.0;
|
||||
engineConfiguration->specs.cylindersCount = 6;
|
||||
engineConfiguration->specs.firingOrder = FO_1_THEN_5_THEN_3_THEN_6_THEN_2_THEN_4;
|
||||
engineConfiguration->specs.firingOrder = FO_1_5_3_6_2_4;
|
||||
// set_ignition_mode 1
|
||||
engineConfiguration->ignitionMode = IM_INDIVIDUAL_COILS;
|
||||
|
||||
|
|
|
@ -342,23 +342,23 @@ const char *getFiring_order_e(firing_order_e value){
|
|||
switch(value) {
|
||||
case FO_1_2_4_5_3:
|
||||
return "FO_1_2_4_5_3";
|
||||
case FO_1_THEN_2:
|
||||
case FO_1_2:
|
||||
return "FO_1_THEN_2";
|
||||
case FO_1_8_4_3_6_5_7_2:
|
||||
return "FO_1_8_4_3_6_5_7_2";
|
||||
case FO_1_THEN_2_THEN_4_THEN3:
|
||||
case FO_1_2_4_3:
|
||||
return "FO_1_THEN_2_THEN_4_THEN3";
|
||||
case FO_1_THEN_3_THEN_2_THEN4:
|
||||
case FO_1_3_2_4:
|
||||
return "FO_1_THEN_3_THEN_2_THEN4";
|
||||
case FO_1_THEN_3_THEN_4_THEN2:
|
||||
case FO_1_3_4_2:
|
||||
return "FO_1_THEN_3_THEN_4_THEN2";
|
||||
case FO_1_THEN_5_THEN_3_THEN_6_THEN_2_THEN_4:
|
||||
case FO_1_5_3_6_2_4:
|
||||
return "FO_1_THEN_5_THEN_3_THEN_6_THEN_2_THEN_4";
|
||||
case FO_1_THEN_4_THEN_2_THEN_5_THEN_3_THEN_6:
|
||||
case FO_1_4_2_5_3_6:
|
||||
return "FO_1_THEN_4_THEN_2_THEN_5_THEN_3_THEN_6";
|
||||
case FO_1_THEN_2_THEN_3_THEN_4_THEN_5_THEN_6:
|
||||
case FO_1_2_3_4_5_6:
|
||||
return "FO_1_THEN_2_THEN_3_THEN_4_THEN_5_THEN_6";
|
||||
case FO_ONE_CYLINDER:
|
||||
case FO_1:
|
||||
return "FO_ONE_CYLINDER";
|
||||
case FO_1_2_3:
|
||||
return "FO_1_2_3";
|
||||
|
|
|
@ -518,7 +518,7 @@ void setDefaultConfiguration(DECLARE_ENGINE_PARAMETER_F) {
|
|||
|
||||
engineConfiguration->pedalPositionChannel = EFI_ADC_NONE;
|
||||
|
||||
engineConfiguration->specs.firingOrder = FO_1_THEN_3_THEN_4_THEN2;
|
||||
engineConfiguration->specs.firingOrder = FO_1_3_4_2;
|
||||
engineConfiguration->crankingInjectionMode = IM_SIMULTANEOUS;
|
||||
engineConfiguration->injectionMode = IM_SEQUENTIAL;
|
||||
|
||||
|
|
|
@ -0,0 +1,44 @@
|
|||
/*
|
||||
* @file firing_order.h
|
||||
*
|
||||
* @date Jul 20, 2016
|
||||
* @author Andrey Belomutskiy, (c) 2012-2016
|
||||
*/
|
||||
|
||||
#ifndef CONTROLLERS_ALGO_FIRING_ORDER_H_
|
||||
#define CONTROLLERS_ALGO_FIRING_ORDER_H_
|
||||
|
||||
// for now I want most enums to be 32 bit integers. At some point maybe we will make the one-byte
|
||||
// this is about offsets and sizes in TunerStudio
|
||||
#define ENUM_32_BITS 2000000000
|
||||
|
||||
typedef enum {
|
||||
FO_1 = 0,
|
||||
|
||||
// 2 cylinder
|
||||
FO_1_2 = 8,
|
||||
|
||||
// 3 cylinder
|
||||
FO_1_2_3 = 10,
|
||||
|
||||
// 4 cylinder
|
||||
FO_1_3_4_2 = 1,
|
||||
FO_1_2_4_3 = 2,
|
||||
FO_1_3_2_4 = 3,
|
||||
// 8 cylinder
|
||||
FO_1_8_4_3_6_5_7_2 = 5,
|
||||
FO_1_8_7_2_6_5_4_3 = 11,
|
||||
FO_1_5_4_2_6_3_7_8 = 12,
|
||||
// 5 cylinder
|
||||
FO_1_2_4_5_3 = 6,
|
||||
|
||||
// 6 cylinder
|
||||
FO_1_5_3_6_2_4 = 4,
|
||||
FO_1_4_2_5_3_6 = 7,
|
||||
FO_1_2_3_4_5_6 = 9,
|
||||
|
||||
Force_4b_firing_order = ENUM_32_BITS,
|
||||
} firing_order_e;
|
||||
|
||||
|
||||
#endif /* CONTROLLERS_ALGO_FIRING_ORDER_H_ */
|
|
@ -11,11 +11,9 @@
|
|||
#ifndef RUSEFI_ENUMS_H_
|
||||
#define RUSEFI_ENUMS_H_
|
||||
|
||||
#include "firing_order.h"
|
||||
#include "efifeatures.h"
|
||||
|
||||
// for now I want most enums to be 32 bit integers. At some point maybe we will make the one-byte
|
||||
// this is about offsets and sizes in TunerStudio
|
||||
#define ENUM_32_BITS 2000000000
|
||||
|
||||
#define ENUM_16_BITS 20000
|
||||
|
||||
|
@ -318,34 +316,6 @@ typedef enum {
|
|||
Force_4b_pin_input_mode = ENUM_32_BITS,
|
||||
} pin_input_mode_e;
|
||||
|
||||
typedef enum {
|
||||
FO_ONE_CYLINDER = 0,
|
||||
|
||||
// 2 cylinder
|
||||
FO_1_THEN_2 = 8,
|
||||
|
||||
// 3 cylinder
|
||||
FO_1_2_3 = 10,
|
||||
|
||||
// 4 cylinder
|
||||
FO_1_THEN_3_THEN_4_THEN2 = 1,
|
||||
FO_1_THEN_2_THEN_4_THEN3 = 2,
|
||||
FO_1_THEN_3_THEN_2_THEN4 = 3,
|
||||
// 8 cylinder
|
||||
FO_1_8_4_3_6_5_7_2 = 5,
|
||||
FO_1_8_7_2_6_5_4_3 = 11,
|
||||
FO_1_5_4_2_6_3_7_8 = 12,
|
||||
// 5 cylinder
|
||||
FO_1_2_4_5_3 = 6,
|
||||
|
||||
// 6 cylinder
|
||||
FO_1_THEN_5_THEN_3_THEN_6_THEN_2_THEN_4 = 4,
|
||||
FO_1_THEN_4_THEN_2_THEN_5_THEN_3_THEN_6 = 7,
|
||||
FO_1_THEN_2_THEN_3_THEN_4_THEN_5_THEN_6 = 9,
|
||||
|
||||
Force_4b_firing_order = ENUM_32_BITS,
|
||||
} firing_order_e;
|
||||
|
||||
// todo: better enum name
|
||||
typedef enum {
|
||||
OM_NONE = 0,
|
||||
|
|
|
@ -333,31 +333,31 @@ static int order_1_2_3[] = {1, 2, 3};
|
|||
int getCylinderId(firing_order_e firingOrder, int index) {
|
||||
|
||||
switch (firingOrder) {
|
||||
case FO_ONE_CYLINDER:
|
||||
case FO_1:
|
||||
return 1;
|
||||
// 2 cylinder
|
||||
case FO_1_THEN_2:
|
||||
case FO_1_2:
|
||||
return order_1_2[index];
|
||||
// 3 cylinder
|
||||
case FO_1_2_3:
|
||||
return order_1_2_3[index];
|
||||
// 4 cylinder
|
||||
case FO_1_THEN_3_THEN_4_THEN2:
|
||||
case FO_1_3_4_2:
|
||||
return order_1_THEN_3_THEN_4_THEN2[index];
|
||||
case FO_1_THEN_2_THEN_4_THEN3:
|
||||
case FO_1_2_4_3:
|
||||
return order_1_THEN_2_THEN_4_THEN3[index];
|
||||
case FO_1_THEN_3_THEN_2_THEN4:
|
||||
case FO_1_3_2_4:
|
||||
return order_1_THEN_3_THEN_2_THEN4[index];
|
||||
// 5 cylinder
|
||||
case FO_1_2_4_5_3:
|
||||
return order_1_2_4_5_3[index];
|
||||
|
||||
// 6 cylinder
|
||||
case FO_1_THEN_5_THEN_3_THEN_6_THEN_2_THEN_4:
|
||||
case FO_1_5_3_6_2_4:
|
||||
return order_1_THEN_5_THEN_3_THEN_6_THEN_2_THEN_4[index];
|
||||
case FO_1_THEN_4_THEN_2_THEN_5_THEN_3_THEN_6:
|
||||
case FO_1_4_2_5_3_6:
|
||||
return order_1_THEN_4_THEN_2_THEN_5_THEN_3_THEN_6[index];
|
||||
case FO_1_THEN_2_THEN_3_THEN_4_THEN_5_THEN_6:
|
||||
case FO_1_2_3_4_5_6:
|
||||
return order_1_THEN_2_THEN_3_THEN_4_THEN_5_THEN_6[index];
|
||||
|
||||
// 8 cylinder
|
||||
|
|
Loading…
Reference in New Issue