engine type clean-up

This commit is contained in:
rusefillc 2024-03-05 20:28:16 -05:00 committed by rusefillc
parent fbd28960b5
commit 91941691cf
55 changed files with 73 additions and 68 deletions

View File

@ -135,14 +135,14 @@ jobs:
m74_9,
s105,
t-b-g,
hellen72,
hellen81,
hellen88bmw,
hellen88bmw_avr,
hellen-nb1,
hellenMiataNA6,
hellenMiataNA96,
hellenMiataNB1,
hellenMiataNB2,
hellen-gm-e67,
hellenNA8_96,
hellenNA6,
hellen128,
hellen121vag,
hellen-honda-k,
@ -173,10 +173,6 @@ jobs:
include:
# Board configurations
# 'target' should match corresponding SHORT_BOARD_NAME
- build-target: hellen72
folder: config/boards/hellen/hellen72
skip-rate: 90
- build-target: hellen81
folder: config/boards/hellen/hellen81
skip-rate: 90
@ -238,10 +234,6 @@ jobs:
folder: config/boards/hellen/hellen88bmw
skip-rate: 99
- build-target: hellen-nb1
folder: config/boards/hellen/hellen-nb1
skip-rate: 99
- build-target: hellen-112-17
folder: config/boards/hellen/hellen-112-17
skip-rate: 50
@ -254,13 +246,21 @@ jobs:
folder: config/boards/hellen/hellen-gm-e67
skip-rate: 99
- build-target: hellenNA8_96
folder: config/boards/hellen/hellenNA8_96
- build-target: hellenMiataNA6
folder: config/boards/hellen/hellenMiataNA6
skip-rate: 99
- build-target: hellenNA6
folder: config/boards/hellen/hellen64_miataNA6_94
skip-rate: 90
- build-target: hellenMiataNA96
folder: config/boards/hellen/hellenMiataNA96
skip-rate: 99
- build-target: hellenMiataNB1
folder: config/boards/hellen/hellenMiataNB1
skip-rate: 99
- build-target: hellenMiataNB2
folder: config/boards/hellen/hellenMiataNB2
skip-rate: 99
- build-target: hellen128
folder: config/boards/hellen/hellen128

View File

@ -17,4 +17,6 @@ DDEFS += -DEFI_SOFTWARE_KNOCK=TRUE -DSTM32_ADC_USE_ADC3=TRUE
DDEFS += -DDISABLE_PIN_STATE_VALIDATION=TRUE
DDEFS += -DSTATIC_BOARD_ID=STATIC_BOARD_ID_HELLEN_NA6
DDEFS += -DHW_HELLEN_MIATA_NA6=1
include $(BOARDS_DIR)/hellen/hellen-common176.mk

View File

Before

Width:  |  Height:  |  Size: 323 KiB

After

Width:  |  Height:  |  Size: 323 KiB

View File

Before

Width:  |  Height:  |  Size: 323 KiB

After

Width:  |  Height:  |  Size: 323 KiB

View File

Before

Width:  |  Height:  |  Size: 506 KiB

After

Width:  |  Height:  |  Size: 506 KiB

View File

@ -162,5 +162,13 @@ Gpio* getBoardMetaOutputs() {
}
int getBoardMetaDcOutputsCount() {
if (engineConfiguration->engineType == engine_type_e::HONDA_OBD1 ||
engineConfiguration->engineType == engine_type_e::MAZDA_MIATA_NA6 ||
engineConfiguration->engineType == engine_type_e::MAZDA_MIATA_NA94 ||
engineConfiguration->engineType == engine_type_e::MAZDA_MIATA_NA96 ||
engineConfiguration->engineType == engine_type_e::MAZDA_MIATA_NB1 ||
engineConfiguration->engineType == engine_type_e::MAZDA_MIATA_NB2) {
return 0;
}
return 2;
}

View File

@ -267,7 +267,7 @@ void setMiataNA6_MAP_Frankenso() {
engineConfiguration->ignitionPins[3] = Gpio::Unassigned;
}
void setHellenNA94() {
void setMazdaMiataNA94() {
miataNAcommonEngineSettings();
strcpy(engineConfiguration->engineCode, "94");
/**
@ -285,10 +285,12 @@ void setHellenNA94() {
engineConfiguration->fan2OnTemperature = 95;
engineConfiguration->fan2OffTemperature = 91;
#if HW_HELLEN_MIATA_NA6
engineConfiguration->fan2Pin = Gpio::D9; // 3S - A/C Fan 94-95
#endif //HW_HELLEN_MIATA_NA6
}
void setHellenNA6() {
void setMazdaMiataNA6() {
miataNAcommonEngineSettings();
engineConfiguration->map.sensor.type = MT_MPX4250;
}

View File

@ -22,6 +22,6 @@ void miataNAcommonEngineSettings();
/**
* set engine_type 34
*/
void setHellenNA6();
void setMazdaMiataNA6();
void setHellenNA94();
void setMazdaMiataNA94();

View File

@ -451,10 +451,12 @@ void setMiataNB2_Proteus_TCU() {
#endif // HW_PROTEUS
#if HW_HELLEN
static void setMazdaMiataEngineNB1Defaults() {
void setMazdaMiataNB1() {
setCommonMazdaNB();
strcpy(engineConfiguration->engineCode, "NB1");
engineConfiguration->injector.flow = 256;
// Vehicle speed/gears
engineConfiguration->totalGearsCount = 5;
engineConfiguration->gearRatio[0] = 3.136;
@ -468,13 +470,7 @@ static void setMazdaMiataEngineNB1Defaults() {
engineConfiguration->finalGearRatio = 4.3;
}
void setHellenNB1() {
setMazdaMiataEngineNB1Defaults();
engineConfiguration->injector.flow = 256;
}
void setMiataNB2_Hellen72() {
void setMazdaMiataNB2() {
setMazdaMiataEngineNB2Defaults();
strcpy(engineConfiguration->vehicleName, "H72 test");
@ -484,8 +480,8 @@ void setMiataNB2_Hellen72() {
}
void setMiataNB2_Hellen72_36() {
setMiataNB2_Hellen72();
void setMazdaMiataNB2_36() {
setMazdaMiataNB2();
engineConfiguration->trigger.type = trigger_type_e::TT_TOOTHED_WHEEL_36_1;
engineConfiguration->globalTriggerAngleOffset = 76;

View File

@ -17,12 +17,11 @@
*/
void setMiataNB2_Proteus_TCU();
void setMazdaMiataNB1();
/**
* set engine_type 69
*/
void setMiataNB2_Hellen72();
void setMiataNB2_Hellen72_36();
void setMazdaMiataNB2();
void setMazdaMiataNB2_36();
void setHellenNB1();

View File

@ -756,6 +756,27 @@ void resetConfigurationExt(configuration_callback_t boardCallback, engine_type_e
break;
#endif
#if HW_HELLEN
case engine_type_e::MAZDA_MIATA_NA96:
setMazdaMiata96();
break;
case engine_type_e::MAZDA_MIATA_NA6:
setMazdaMiataNA6();
break;
case engine_type_e::MAZDA_MIATA_NA94:
setMazdaMiataNA94();
break;
case engine_type_e::MAZDA_MIATA_NB1:
setMazdaMiataNB1();
break;
case engine_type_e::MAZDA_MIATA_NB2:
setMazdaMiataNB2();
break;
case engine_type_e::MAZDA_MIATA_NB2_36:
setMazdaMiataNB2_36();
break;
#endif
#if HW_PROTEUS
case engine_type_e::MAVERICK_X3:
setMaverickX3();
@ -851,21 +872,6 @@ void resetConfigurationExt(configuration_callback_t boardCallback, engine_type_e
break;
#endif
#if HW_HELLEN_NB1
case engine_type_e::MAZDA_MIATA_NB1:
setHellenNB1();
break;
#endif
#if HW_HELLEN_NB2
case engine_type_e::MAZDA_MIATA_NB2:
setMiataNB2_Hellen72();
break;
case engine_type_e::MAZDA_MIATA_NB2_36:
setMiataNB2_Hellen72_36();
break;
#endif
#if HW_HELLEN_121_VAG
case engine_type_e::HELLEN_121_VAG_5_CYL:
setHellen121Vag_5_cyl();
@ -889,18 +895,9 @@ void resetConfigurationExt(configuration_callback_t boardCallback, engine_type_e
case engine_type_e::TOYOTA_1NZ_FE:
setToyota1NZFE();
break;
case engine_type_e::MAZDA_MIATA_NA96:
setMazdaMiata96();
break;
case engine_type_e::HELLEN_121_VAG_4_CYL:
case engine_type_e::HELLEN_154_VAG:
break;
case engine_type_e::MAZDA_MIATA_NA6:
setHellenNA6();
break;
case engine_type_e::MAZDA_MIATA_NA94:
setHellenNA94();
break;
case engine_type_e::HELLEN_HONDA_BCM:
setHondaCivicBcm();
break;

View File

@ -193,7 +193,7 @@ enum class engine_type_e : uint16_t {
UNUSED93 = 93,
HELLEN_NB1_36 = 94,
UNUSED94 = 94,
HELLEN_154_HYUNDAI_COUPE_BK2 = 95,

View File

@ -42,15 +42,16 @@ for BOARD in \
"config/boards/hellen/hellen88bmw hellen88bmw" \
"config/boards/hellen/uaefi uaefi" \
"config/boards/hellen/hellen-112-17 hellen-112-17" \
"config/boards/hellen/hellen72 hellen72" \
"config/boards/hellen/hellen81 hellen81" \
"config/boards/hellen/hellen-nb1 hellen-nb1" \
"config/boards/hellen/hellenMiataNA6 hellenMiataNA6" \
"config/boards/hellen/hellenMiataNA96 hellenMiataNA96" \
"config/boards/hellen/hellenMiataNB1 hellenMiataNB1" \
"config/boards/hellen/hellenMiataNB2 hellenMiataNB2" \
"config/boards/hellen/hellen-gm-e67 hellen-gm-e67" \
"config/boards/hellen/hellen64_miataNA6_94 hellenNA6" \
"config/boards/hellen/hellenNA8_96 hellenNA8_96" \
"config/boards/hellen/small-can-board small-can-board" \
"config/boards/microrusefi mre_f7" \
"config/boards/microrusefi mre_f4" \
"config/boards/at_start_f435 at_start_f435" \
"config/boards/m74_9 m74_9" \
"config/boards/s105 s105" \
"config/boards/test-build-guards t-b-g" \
@ -60,6 +61,7 @@ for BOARD in \
"config/boards/proteus proteus_f7" \
"config/boards/proteus proteus_f4" \
"config/boards/proteus proteus_h7" \
"config/boards/f407-discovery f407-discovery" \
"config/boards/f429-discovery f429-discovery" \
"config/boards/f469-discovery f469-discovery" \
"config/boards/nucleo_f413 stm32f413_nucleo" \
@ -68,8 +70,6 @@ for BOARD in \
"config/boards/nucleo_h743 nucleo_h743" \
"config/boards/atlas atlas"\
"config/boards/tdg-pdm8 tdg-pdm8"\
"config/boards/f407-discovery f407-discovery" \
"config/boards/at_start_f435 at_start_f435" \
; do
BOARD_DIR=$(echo "$BOARD" | cut -d " " -f 1)
SHORT_BOARD_NAME=$(echo "$BOARD" | cut -d " " -f 2)

View File

@ -179,6 +179,7 @@ public class CommonFunctionalTest extends RusefiTestBase {
ecu.setEngineType(engine_type_e.SACHS);
ecu.changeRpm(1200);
}
@Test
public void test2003DodgeNeon() {
ecu.setEngineType(engine_type_e.DODGE_NEON_2003_CRANK);

View File

@ -99,7 +99,7 @@ public enum engine_type_e {
HONDA_OBD2A,
SIMULATOR_CONFIG,
UNUSED93,
HELLEN_NB1_36,
UNUSED94,
HELLEN_154_HYUNDAI_COUPE_BK2,
WASTEGATE_PROTEUS_TEST,
UNUSED_97,

View File

@ -121,7 +121,7 @@ public class ReaderStateImpl implements ReaderState {
try (BufferedReader definitionReader = new BufferedReader(readerProvider.read(fileNameWithRoot))) {
readBufferedReader(definitionReader, destinations);
} catch (Throwable e) {
throw new IllegalStateException("While processing " + fileNameWithRoot);
throw new IllegalStateException("While processing " + fileNameWithRoot, e);
}
if (destCDefinesFileName != null) {