const (#648)
This commit is contained in:
parent
a12a62b57a
commit
799923ac5d
|
@ -60,7 +60,7 @@ static const float ve18fsioLoadBins[FSIO_TABLE_8] =
|
|||
{30.0, 40.0, 50.0, 60.0, 70.0, 75.0, 82.0, 85.0}
|
||||
;
|
||||
|
||||
float fsio_table_random[FSIO_TABLE_8][FSIO_TABLE_8] = {
|
||||
float const fsio_table_random[FSIO_TABLE_8][FSIO_TABLE_8] = {
|
||||
/* Generated by TS2C on Mon Feb 13 19:11:32 EST 2017*/
|
||||
{/* 0 30.000 *//* 0 700.0*/1.000, /* 1 1000.0*/3.000, /* 2 2000.0*/10.000, /* 3 3000.0*/20.000, /* 4 3500.0*/27.000, /* 5 4500.0*/28.000, /* 6 5500.0*/11.000, /* 7 6500.0*/5.000, },
|
||||
{/* 1 40.000 *//* 0 700.0*/3.000, /* 1 1000.0*/10.000, /* 2 2000.0*/19.000, /* 3 3000.0*/26.000, /* 4 3500.0*/30.000, /* 5 4500.0*/28.000, /* 6 5500.0*/11.000, /* 7 6500.0*/5.000, },
|
||||
|
@ -72,7 +72,7 @@ float fsio_table_random[FSIO_TABLE_8][FSIO_TABLE_8] = {
|
|||
{/* 7 85.000 *//* 0 700.0*/17.000, /* 1 1000.0*/28.000, /* 2 2000.0*/33.000, /* 3 3000.0*/28.000, /* 4 3500.0*/30.000, /* 5 4500.0*/28.000, /* 6 5500.0*/11.000, /* 7 6500.0*/5.000, },
|
||||
};
|
||||
|
||||
float fsio_table_dyno[FSIO_TABLE_8][FSIO_TABLE_8] = {
|
||||
float const fsio_table_dyno[FSIO_TABLE_8][FSIO_TABLE_8] = {
|
||||
/* Generated by TS2C on Sun May 07 09:35:13 EDT 2017*/
|
||||
{/* 0 30.000 *//* 0 700.0*/1.000, /* 1 1000.0*/3.000, /* 2 2000.0*/10.000, /* 3 3000.0*/20.000, /* 4 3500.0*/20.000, /* 5 4500.0*/16.000, /* 6 5500.0*/11.000, /* 7 6500.0*/10.000, },
|
||||
{/* 1 40.000 *//* 0 700.0*/3.000, /* 1 1000.0*/10.000, /* 2 2000.0*/19.000, /* 3 3000.0*/26.000, /* 4 3500.0*/20.000, /* 5 4500.0*/16.000, /* 6 5500.0*/11.000, /* 7 6500.0*/10.000, },
|
||||
|
@ -87,7 +87,7 @@ float fsio_table_dyno[FSIO_TABLE_8][FSIO_TABLE_8] = {
|
|||
static const float tpsTspSame[TPS_TPS_ACCEL_TABLE] =
|
||||
{0.0, 10.0, 20.0, 35.0, 50.0, 65.0, 80.0, 100.0};
|
||||
|
||||
float tpsTpsTable[TPS_TPS_ACCEL_TABLE][TPS_TPS_ACCEL_TABLE] = {
|
||||
float const tpsTpsTable[TPS_TPS_ACCEL_TABLE][TPS_TPS_ACCEL_TABLE] = {
|
||||
/* Generated by TS2C on Tue Apr 18 21:29:16 EDT 2017*/
|
||||
{/* 0 0.000 *//* 0 0.0*/0.000, /* 1 10.0*/0.000, /* 2 20.0*/0.000, /* 3 35.0*/0.000, /* 4 50.0*/0.000, /* 5 65.0*/0.000, /* 6 80.0*/0.000, /* 7 100.0*/0.000, },
|
||||
{/* 1 10.000 *//* 0 0.0*/10.000, /* 1 10.0*/0.000, /* 2 20.0*/0.000, /* 3 35.0*/0.000, /* 4 50.0*/0.000, /* 5 65.0*/0.000, /* 6 80.0*/0.000, /* 7 100.0*/0.000, },
|
||||
|
|
|
@ -264,36 +264,36 @@ floatms_t getSparkDwell(int rpm DECLARE_ENGINE_PARAMETER_SUFFIX) {
|
|||
}
|
||||
|
||||
|
||||
static int order_1_2[] = {1, 2};
|
||||
static const int order_1_2[] = {1, 2};
|
||||
|
||||
static int order_1_2_3[] = {1, 2, 3};
|
||||
static const int order_1_2_3[] = {1, 2, 3};
|
||||
// 4 cylinder
|
||||
|
||||
static int order_1_THEN_3_THEN_4_THEN2[] = { 1, 3, 4, 2 };
|
||||
static int order_1_THEN_2_THEN_4_THEN3[] = { 1, 2, 4, 3 };
|
||||
static int order_1_THEN_3_THEN_2_THEN4[] = { 1, 3, 2, 4 };
|
||||
static const int order_1_THEN_3_THEN_4_THEN2[] = { 1, 3, 4, 2 };
|
||||
static const int order_1_THEN_2_THEN_4_THEN3[] = { 1, 2, 4, 3 };
|
||||
static const int order_1_THEN_3_THEN_2_THEN4[] = { 1, 3, 2, 4 };
|
||||
|
||||
// 5 cylinder
|
||||
static int order_1_2_4_5_3[] = {1, 2, 4, 5, 3};
|
||||
static const int order_1_2_4_5_3[] = {1, 2, 4, 5, 3};
|
||||
|
||||
// 6 cylinder
|
||||
static int order_1_THEN_5_THEN_3_THEN_6_THEN_2_THEN_4[] = { 1, 5, 3, 6, 2, 4 };
|
||||
static int order_1_THEN_4_THEN_2_THEN_5_THEN_3_THEN_6[] = { 1, 4, 2, 5, 3, 6 };
|
||||
static int order_1_THEN_2_THEN_3_THEN_4_THEN_5_THEN_6[] = { 1, 2, 3, 4, 5, 6 };
|
||||
static int order_1_6_3_2_5_4[] = {1, 6, 3, 2, 5, 4};
|
||||
static const int order_1_THEN_5_THEN_3_THEN_6_THEN_2_THEN_4[] = { 1, 5, 3, 6, 2, 4 };
|
||||
static const int order_1_THEN_4_THEN_2_THEN_5_THEN_3_THEN_6[] = { 1, 4, 2, 5, 3, 6 };
|
||||
static const int order_1_THEN_2_THEN_3_THEN_4_THEN_5_THEN_6[] = { 1, 2, 3, 4, 5, 6 };
|
||||
static const int order_1_6_3_2_5_4[] = {1, 6, 3, 2, 5, 4};
|
||||
|
||||
// 8 cylinder
|
||||
static int order_1_8_4_3_6_5_7_2[] = { 1, 8, 4, 3, 6, 5, 7, 2 };
|
||||
static const int order_1_8_4_3_6_5_7_2[] = { 1, 8, 4, 3, 6, 5, 7, 2 };
|
||||
|
||||
static int order_1_8_7_2_6_5_4_3[] = { 1, 8, 7, 2, 6, 5, 4, 3 };
|
||||
static int order_1_5_4_2_6_3_7_8[] = { 1, 5, 4, 2, 6, 3, 7, 8 };
|
||||
static const int order_1_8_7_2_6_5_4_3[] = { 1, 8, 7, 2, 6, 5, 4, 3 };
|
||||
static const int order_1_5_4_2_6_3_7_8[] = { 1, 5, 4, 2, 6, 3, 7, 8 };
|
||||
|
||||
// 10 cylinder
|
||||
static int order_1_10_9_4_3_6_5_8_7_2[] = {1, 10, 9, 4, 3, 6, 5, 8, 7, 2};
|
||||
static const 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 const 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 const 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) {
|
||||
|
||||
|
|
|
@ -1001,12 +1001,12 @@ typedef struct {
|
|||
|
||||
|
||||
#if ! EFI_UNIT_TEST || defined(__DOXYGEN__)
|
||||
plain_get_short_s getS_plain[] = {
|
||||
const plain_get_short_s getS_plain[] = {
|
||||
{"idle_pid_min", (uint16_t *)&engineConfiguration->idleRpmPid.minValue},
|
||||
{"idle_pid_max", (uint16_t *)&engineConfiguration->idleRpmPid.maxValue},
|
||||
};
|
||||
|
||||
plain_get_integer_s getI_plain[] = {
|
||||
const plain_get_integer_s getI_plain[] = {
|
||||
// {"cranking_rpm", &engineConfiguration->cranking.rpm},
|
||||
// {"cranking_injection_mode", setCrankingInjectionMode},
|
||||
// {"injection_mode", setInjectionMode},
|
||||
|
@ -1043,7 +1043,7 @@ plain_get_integer_s getI_plain[] = {
|
|||
// {"", },
|
||||
};
|
||||
|
||||
plain_get_float_s getF_plain[] = {
|
||||
const plain_get_float_s getF_plain[] = {
|
||||
{"cranking_dwell", &engineConfiguration->ignitionDwellForCrankingMs},
|
||||
{"idle_position", &boardConfiguration->manIdlePosition},
|
||||
{"ignition_offset", &engineConfiguration->ignitionOffset},
|
||||
|
@ -1060,7 +1060,7 @@ plain_get_float_s getF_plain[] = {
|
|||
static void getValue(const char *paramStr) {
|
||||
#if ! EFI_UNIT_TEST || defined(__DOXYGEN__)
|
||||
{
|
||||
plain_get_integer_s *currentI = &getI_plain[0];
|
||||
const plain_get_integer_s *currentI = &getI_plain[0];
|
||||
while (currentI < getI_plain + sizeof(getI_plain)/sizeof(getI_plain[0])) {
|
||||
if (strEqualCaseInsensitive(paramStr, currentI->token)) {
|
||||
scheduleMsg(&logger, "%s value: %d", currentI->token, *currentI->value);
|
||||
|
@ -1070,7 +1070,7 @@ static void getValue(const char *paramStr) {
|
|||
}
|
||||
}
|
||||
|
||||
plain_get_float_s *currentF = &getF_plain[0];
|
||||
const plain_get_float_s *currentF = &getF_plain[0];
|
||||
while (currentF < getF_plain + sizeof(getF_plain)/sizeof(getF_plain[0])) {
|
||||
if (strEqualCaseInsensitive(paramStr, currentF->token)) {
|
||||
float value = *currentF->value;
|
||||
|
@ -1126,7 +1126,7 @@ typedef struct {
|
|||
VoidFloat callback;
|
||||
} command_f_s;
|
||||
|
||||
command_f_s commandsF[] = {{"mock_iat_voltage", setMockIatVoltage},
|
||||
const command_f_s commandsF[] = {{"mock_iat_voltage", setMockIatVoltage},
|
||||
{"mock_pedal_position", setMockPedalPosition},
|
||||
{"mock_maf_voltage", setMockMafVoltage},
|
||||
{"mock_afr_voltage", setMockAfrVoltage},
|
||||
|
@ -1190,7 +1190,7 @@ static void setTpsErrorDetectionTooHigh(int v) {
|
|||
engineConfiguration->tpsErrorDetectionTooHigh = v;
|
||||
}
|
||||
|
||||
command_i_s commandsI[] = {{"ignition_mode", setIgnitionMode},
|
||||
const command_i_s commandsI[] = {{"ignition_mode", setIgnitionMode},
|
||||
{"call_from_pitstop", setCallFromPitStop},
|
||||
{"cranking_rpm", setCrankingRpm},
|
||||
{"cranking_injection_mode", setCrankingInjectionMode},
|
||||
|
@ -1242,7 +1242,7 @@ static void setValue(const char *paramStr, const char *valueStr) {
|
|||
float valueF = atoff(valueStr);
|
||||
int valueI = atoi(valueStr);
|
||||
|
||||
command_f_s *currentF = &commandsF[0];
|
||||
const command_f_s *currentF = &commandsF[0];
|
||||
while (currentF < commandsF + sizeof(commandsF)/sizeof(commandsF[0])) {
|
||||
if (strEqualCaseInsensitive(paramStr, currentF->token)) {
|
||||
currentF->callback(valueF);
|
||||
|
@ -1251,7 +1251,7 @@ static void setValue(const char *paramStr, const char *valueStr) {
|
|||
currentF++;
|
||||
}
|
||||
|
||||
command_i_s *currentI = &commandsI[0];
|
||||
const command_i_s *currentI = &commandsI[0];
|
||||
while (currentI < commandsI + sizeof(commandsI)/sizeof(commandsI[0])) {
|
||||
if (strEqualCaseInsensitive(paramStr, currentI->token)) {
|
||||
currentI->callback(valueI);
|
||||
|
|
|
@ -43,7 +43,7 @@ crc_t calc_crc(const crc_t message[], int nBytes) {
|
|||
return remainder;
|
||||
}
|
||||
|
||||
static uint32_t crc32_tab[] = { 0x00000000, 0x77073096, 0xee0e612c, 0x990951ba,
|
||||
static const uint32_t crc32_tab[] = { 0x00000000, 0x77073096, 0xee0e612c, 0x990951ba,
|
||||
0x076dc419, 0x706af48f, 0xe963a535, 0x9e6495a3, 0x0edb8832, 0x79dcb8a4,
|
||||
0xe0d5e91e, 0x97d2d988, 0x09b64c2b, 0x7eb17cbd, 0xe7b82d07, 0x90bf1d91,
|
||||
0x1db71064, 0x6ab020f2, 0xf3b97148, 0x84be41de, 0x1adad47d, 0x6ddde4eb,
|
||||
|
|
Loading…
Reference in New Issue