this seems mostly dead?
This commit is contained in:
parent
e78b93ee07
commit
a0da677a1e
|
@ -214,44 +214,4 @@ size_t getMultiSparkCount(int rpm) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @param octane gas octane number
|
|
||||||
* @param bore in mm
|
|
||||||
*/
|
|
||||||
float getTopAdvanceForBore(chamber_style_e style, int octane, double compression, double bore) {
|
|
||||||
int octaneCorrection;
|
|
||||||
if ( octane <= 90) {
|
|
||||||
octaneCorrection = -2;
|
|
||||||
} else if (octane < 94) {
|
|
||||||
octaneCorrection = -1;
|
|
||||||
} else {
|
|
||||||
octaneCorrection = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
int compressionCorrection;
|
|
||||||
if (compression <= 9) {
|
|
||||||
compressionCorrection = 2;
|
|
||||||
} else if (compression <= 10) {
|
|
||||||
compressionCorrection = 1;
|
|
||||||
} else if (compression <= 11) {
|
|
||||||
compressionCorrection = 0;
|
|
||||||
} else {
|
|
||||||
// compression ratio above 11
|
|
||||||
compressionCorrection = -2;
|
|
||||||
}
|
|
||||||
int base;
|
|
||||||
if (style == CS_OPEN) {
|
|
||||||
base = 33;
|
|
||||||
} else if (style == CS_CLOSED) {
|
|
||||||
base = 28;
|
|
||||||
} else {
|
|
||||||
// CS_SWIRL_TUMBLE
|
|
||||||
base = 22;
|
|
||||||
}
|
|
||||||
|
|
||||||
float boreCorrection = (bore - 4 * 25.4) / 25.4 * 6;
|
|
||||||
float result = base + octaneCorrection + compressionCorrection + boreCorrection;
|
|
||||||
return ((int)(result * 10)) / 10.0;
|
|
||||||
}
|
|
||||||
|
|
||||||
#endif // EFI_ENGINE_CONTROL
|
#endif // EFI_ENGINE_CONTROL
|
||||||
|
|
|
@ -506,13 +506,6 @@ typedef enum {
|
||||||
Internal_ForceMyEnumIntSize_timing_mode = ENUM_32_BITS,
|
Internal_ForceMyEnumIntSize_timing_mode = ENUM_32_BITS,
|
||||||
} timing_mode_e;
|
} timing_mode_e;
|
||||||
|
|
||||||
typedef enum {
|
|
||||||
CS_OPEN = 0,
|
|
||||||
CS_CLOSED = 1,
|
|
||||||
CS_SWIRL_TUMBLE = 2,
|
|
||||||
|
|
||||||
Internal_ForceMyEnumIntSize_chamber_stype = ENUM_32_BITS,
|
|
||||||
} chamber_style_e;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Net Body Computer types
|
* Net Body Computer types
|
||||||
|
|
|
@ -64,6 +64,55 @@ TEST(misc, testEngineMath) {
|
||||||
ASSERT_NEAR(56.9762f/*kg/h*/, engine->engineState.airflowEstimate, EPS4D);
|
ASSERT_NEAR(56.9762f/*kg/h*/, engine->engineState.airflowEstimate, EPS4D);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
typedef enum {
|
||||||
|
CS_OPEN = 0,
|
||||||
|
CS_CLOSED = 1,
|
||||||
|
CS_SWIRL_TUMBLE = 2,
|
||||||
|
|
||||||
|
Internal_ForceMyEnumIntSize_chamber_stype = ENUM_32_BITS,
|
||||||
|
} chamber_style_e;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param octane gas octane number
|
||||||
|
* @param bore in mm
|
||||||
|
*/
|
||||||
|
static float getTopAdvanceForBore(chamber_style_e style, int octane, double compression, double bore) {
|
||||||
|
int octaneCorrection;
|
||||||
|
if ( octane <= 90) {
|
||||||
|
octaneCorrection = -2;
|
||||||
|
} else if (octane < 94) {
|
||||||
|
octaneCorrection = -1;
|
||||||
|
} else {
|
||||||
|
octaneCorrection = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
int compressionCorrection;
|
||||||
|
if (compression <= 9) {
|
||||||
|
compressionCorrection = 2;
|
||||||
|
} else if (compression <= 10) {
|
||||||
|
compressionCorrection = 1;
|
||||||
|
} else if (compression <= 11) {
|
||||||
|
compressionCorrection = 0;
|
||||||
|
} else {
|
||||||
|
// compression ratio above 11
|
||||||
|
compressionCorrection = -2;
|
||||||
|
}
|
||||||
|
int base;
|
||||||
|
if (style == CS_OPEN) {
|
||||||
|
base = 33;
|
||||||
|
} else if (style == CS_CLOSED) {
|
||||||
|
base = 28;
|
||||||
|
} else {
|
||||||
|
// CS_SWIRL_TUMBLE
|
||||||
|
base = 22;
|
||||||
|
}
|
||||||
|
|
||||||
|
float boreCorrection = (bore - 4 * 25.4) / 25.4 * 6;
|
||||||
|
float result = base + octaneCorrection + compressionCorrection + boreCorrection;
|
||||||
|
return ((int)(result * 10)) / 10.0;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
TEST(misc, testIgnitionMapGenerator) {
|
TEST(misc, testIgnitionMapGenerator) {
|
||||||
printf("*************************************************** testIgnitionMapGenerator\r\n");
|
printf("*************************************************** testIgnitionMapGenerator\r\n");
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue