20#if IAT_IGN_CORR_COUNT == 8
21 copyArray(
config->ignitionIatCorrTempBins, { -40, 0, 10, 20, 30, 40, 50, 60});
24 for (
size_t i = 3; i < IAT_IGN_CORR_COUNT; i++) {
26 copyArray(
config->ignitionIatCorrTable[i], {0.0, 0.0, 0.0, 0.0, 0.0, -1.0, -2.0, -3.0});
31 copyArray(
config->ignitionIatCorrTable[2], {0.0, 0.0, 0.0, 0.0, 0.0, 0.0, -1.0, -2.0});
41#if CLT_TIMING_TEMP_AXIS_SIZE == 5
42 for (
size_t i = 0; i < CLT_TIMING_TEMP_AXIS_SIZE; i++) {
44 copyArray(
config->ignitionCltCorrTable[i], {0.0, 0.0, 0.0, 0.0, 0.0});
53#if TRAILING_SPARK_SIZE == 4
54 for (
size_t i = 0; i < TRAILING_SPARK_SIZE; i++) {
55 copyArray(
config->trailingSparkTable[i], {7,9,10,12});
73#define round10(x) efiRound(x, 0.1)
76 map = std::min(map, 100.0f);
80 return round10(advance + 0.1 * (100 - map));
81 return round10(advance + 0.1 * (100 - map) * rpm / 3000);
95 for (
int loadIndex = 0; loadIndex < IGN_LOAD_COUNT; loadIndex++) {
96 float load =
config->ignitionLoadBins[loadIndex];
97 for (
int rpmIndex = 0;rpmIndex<IGN_RPM_COUNT;rpmIndex++) {
98 float rpm =
config->ignitionRpmBins[rpmIndex];
137#if IGN_TRIM_SIZE == 4
138 copyArray(
config->ignTrimRpmBins, { 1000, 3000, 5000, 7000 });
139 copyArray(
config->ignTrimLoadBins, { 20, 50, 80, 100 });
146 for (
size_t i = 0; i < efi::size(
config->ignBlends); i++) {
147 auto& blend =
config->ignBlends[i];
static void setDefaultCltTimingCorrection()
static void setDefaultTrailingSparkTable()
static void buildTimingMap(float advanceMax)
float getInitialAdvance(float rpm, float map, float advanceMax)
static void setDefaultMultisparkParameters()
void setDefaultIgnition()
static float getAdvanceForRpm(float rpm, float advanceMax)
static void setDefaultIatTimingCorrection()
float interpolateMsg(const char *msg, float x1, float y1, float x2, float y2, float x)
Linear interpolation by two points.
void setConstantDwell(floatms_t dwellMs)
Sets the same dwell time across the whole getRpm() range set dwell X.
static constexpr persistent_config_s * config
static constexpr engine_configuration_s * engineConfiguration
void setTimingRpmBin(float from, float to)
bool warning(ObdCode code, const char *fmt,...)
void setRpmTableBin(TValue(&array)[TSize])
void setLinearCurve(TValue(&array)[TSize], float from, float to, float precision=0.01f)