This commit is contained in:
rusefillc 2024-03-07 06:39:50 -05:00 committed by rusefillc
parent de49fbcddb
commit 509736c601
12 changed files with 23 additions and 41 deletions

View File

@ -28,7 +28,7 @@ board_id_t getBoardId() {
#endif
#if HW_MICRO_RUSEFI
if (engineConfiguration->engineType == engine_type_e::MRE_M111) {
if (engineConfiguration->engineType == engine_type_e::MERCEDES_M111) {
return STATIC_BOARD_ID_MRE_M111;
}
#endif

View File

@ -135,8 +135,6 @@ void setBoardDefaultConfiguration() {
setInjectorPins();
setIgnitionPins();
engineConfiguration->enableSoftwareKnock = true;
engineConfiguration->fuelPumpPin = Gpio::D15;
engineConfiguration->idle.solenoidPin = Gpio::Unassigned;
engineConfiguration->fanPin = Gpio::D12; // OUT_PWM8
@ -149,7 +147,7 @@ void setBoardDefaultConfiguration() {
// "required" hardware is done - set some reasonable defaults
setupDefaultSensorInputs();
setM111EngineConfiguration();
setMercedesM111EngineConfiguration();
/**
* Jimmy best tune

View File

@ -227,14 +227,14 @@ MRE_LS_2, // SC clutch
};
int getBoardMetaOutputsCount() {
if (engineConfiguration->engineType == engine_type_e::MRE_M111) {
if (engineConfiguration->engineType == engine_type_e::MERCEDES_M111) {
return efi::size(M111_OUTPUTS);
}
return efi::size(MRE_OUTPUTS);
}
Gpio* getBoardMetaOutputs() {
if (engineConfiguration->engineType == engine_type_e::MRE_M111) {
if (engineConfiguration->engineType == engine_type_e::MERCEDES_M111) {
return M111_OUTPUTS;
}
return MRE_OUTPUTS;

View File

@ -18,7 +18,7 @@
#include "mre_meta.h"
#endif // HW_MICRO_RUSEFI
void setM111EngineConfiguration() {
void setMercedesM111EngineConfiguration() {
engineConfiguration->cylindersCount = 4;
engineConfiguration->firingOrder = FO_1_3_4_2;
engineConfiguration->displacement = 2.295f;
@ -69,10 +69,7 @@ void setM111EngineConfiguration() {
#endif // HW_MICRO_RUSEFI
strcpy(engineConfiguration->gpPwmNote[1], "SC Clutch");
}
void setMreM111EngineConfiguration() {
setM111EngineConfiguration();
#if HW_MICRO_RUSEFI
engineConfiguration->fuelPumpPin = MRE_GPOUT_1; // more or less MRE default
@ -88,10 +85,7 @@ void setMreM111EngineConfiguration() {
setTPS1Calibration(891, 69, 98, 926);
// honda cable position sensor
setPPSCalibration(0.38, 4.77, 4.64, 2.47);
}
void setProteusM111EngineConfiguration() {
setM111EngineConfiguration();
#if HW_PROTEUS
engineConfiguration->triggerInputPins[0] = PROTEUS_VR_1;
engineConfiguration->camInputs[0] = PROTEUS_DIGITAL_2;

View File

@ -7,10 +7,5 @@
#pragma once
void setM111EngineConfiguration();
/**
* set engine_type 68
*/
void setMreM111EngineConfiguration();
void setMercedesM111EngineConfiguration();
void setProteusM111EngineConfiguration();

View File

@ -6,16 +6,13 @@
*/
#include "pch.h"
#include "m111.h"
#if HW_HELLEN
#include "hellen_meta.h"
#endif // HW_HELLEN
static void common() {
}
void setHellenMercedes128_4_cyl() {
common();
setMercedesM111EngineConfiguration();
#if HW_HELLEN
engineConfiguration->injectionPins[0] = Gpio::H144_LS_7;
engineConfiguration->injectionPins[1] = H176_LS_6;
@ -30,7 +27,6 @@ void setHellenMercedes128_4_cyl() {
// is this M104 or M112 or both?
void setHellenMercedes128_6_cyl() {
common();
engineConfiguration->cylindersCount = 6;
// 1-4-2-5-3-6 M104
engineConfiguration->firingOrder = FO_1_4_3_6_2_5; // M112
@ -38,7 +34,6 @@ void setHellenMercedes128_6_cyl() {
// M113
void setHellenMercedes128_8_cyl() {
common();
engineConfiguration->cylindersCount = 8;
engineConfiguration->firingOrder = FO_1_5_4_2_6_3_7_8;
}

View File

@ -713,13 +713,17 @@ void resetConfigurationExt(configuration_callback_t boardCallback, engine_type_e
setTestEngineIssue366rise();
break;
#endif // EFI_UNIT_TEST
#if HW_MICRO_RUSEFI || HW_PROTEUS
case engine_type_e::MERCEDES_M111:
setMercedesM111EngineConfiguration();
break;
#endif
#if HW_MICRO_RUSEFI
case engine_type_e::MRE_VW_B6:
setMreVwPassatB6();
break;
case engine_type_e::MRE_M111:
setMreM111EngineConfiguration();
break;
case engine_type_e::MRE_SECONDARY_CAN:
mreSecondaryCan();
break;
@ -784,9 +788,6 @@ void resetConfigurationExt(configuration_callback_t boardCallback, engine_type_e
case engine_type_e::ME17_9_MISC:
setSlingshot();
break;
case engine_type_e::PROTEUS_M111:
setProteusM111EngineConfiguration();
break;
case engine_type_e::WASTEGATE_PROTEUS_TEST:
proteusDcWastegateTest();
break;

View File

@ -54,7 +54,7 @@ enum class engine_type_e : uint16_t {
FORD_ESCORT_GT = 14,
FUEL_BENCH = 15,
MITSUBISHI_4G93 = 16,
PROTEUS_M111 = 17,
UNUSED17 = 17,
TEST_33816 = 18,
@ -149,7 +149,7 @@ enum class engine_type_e : uint16_t {
UNUSED_65 = 65,
HONDA_OBD1 = 66,
UNUSED67 = 67,
MRE_M111 = 68,
MERCEDES_M111 = 68,
MAZDA_MIATA_NB2 = 69,

View File

@ -2216,7 +2216,7 @@ cmd_set_engine_type_MITSUBISHI_3A92 = "@@TS_IO_TEST_COMMAND_char@@@@ts_comm
cmd_set_engine_type_MITSUBISHI_4G93 = "@@TS_IO_TEST_COMMAND_char@@@@ts_command_e_TS_SET_ENGINE_TYPE_16_hex@@@@engine_type_e_MITSUBISHI_4G93_16_hex@@"
cmd_set_engine_type_TOYOTA_1NZ_FE = "@@TS_IO_TEST_COMMAND_char@@@@ts_command_e_TS_SET_ENGINE_TYPE_16_hex@@@@engine_type_e_TOYOTA_1NZ_FE_16_hex@@"
cmd_set_engine_type_MRE_M111 = "@@TS_IO_TEST_COMMAND_char@@@@ts_command_e_TS_SET_ENGINE_TYPE_16_hex@@@@engine_type_e_MRE_M111_16_hex@@"
cmd_set_engine_type_MERCEDES_M111 = "@@TS_IO_TEST_COMMAND_char@@@@ts_command_e_TS_SET_ENGINE_TYPE_16_hex@@@@engine_type_e_MERCEDES_M111_16_hex@@"
cmd_set_engine_type_MAZDA_MIATA_NA6 = "@@TS_IO_TEST_COMMAND_char@@@@ts_command_e_TS_SET_ENGINE_TYPE_16_hex@@@@engine_type_e_MAZDA_MIATA_NA6_16_hex@@"
cmd_set_engine_type_MAZDA_MIATA_NA94 = "@@TS_IO_TEST_COMMAND_char@@@@ts_command_e_TS_SET_ENGINE_TYPE_16_hex@@@@engine_type_e_MAZDA_MIATA_NA94_16_hex@@"
@ -2254,7 +2254,6 @@ cmd_set_engine_type_Proteus_Miata_TCU = "@@TS_IO_TEST_COMMAND_char@@@@ts_comm
cmd_set_engine_type_PROTEUS_LUA_DEMO = "@@TS_IO_TEST_COMMAND_char@@@@ts_command_e_TS_SET_ENGINE_TYPE_16_hex@@@@engine_type_e_PROTEUS_LUA_DEMO_16_hex@@"@@if_show_Proteus_presets
cmd_set_engine_type_HARLEY = "@@TS_IO_TEST_COMMAND_char@@@@ts_command_e_TS_SET_ENGINE_TYPE_16_hex@@@@engine_type_e_HARLEY_16_hex@@"@@if_show_Proteus_presets
cmd_set_engine_type_PROTEUS_NISSAN_VQ35 = "@@TS_IO_TEST_COMMAND_char@@@@ts_command_e_TS_SET_ENGINE_TYPE_16_hex@@@@engine_type_e_PROTEUS_NISSAN_VQ35_16_hex@@"@@if_show_Proteus_presets
cmd_set_engine_type_PROTEUS_M111 = "@@TS_IO_TEST_COMMAND_char@@@@ts_command_e_TS_SET_ENGINE_TYPE_16_hex@@@@engine_type_e_PROTEUS_M111_16_hex@@"@@if_show_Proteus_presets
cmd_set_engine_type_GM_SBC = "@@TS_IO_TEST_COMMAND_char@@@@ts_command_e_TS_SET_ENGINE_TYPE_16_hex@@@@engine_type_e_GM_SBC_16_hex@@"@@if_show_Proteus_presets
cmd_set_engine_type_GM_SBC = "@@TS_IO_TEST_COMMAND_char@@@@ts_command_e_TS_SET_ENGINE_TYPE_16_hex@@@@engine_type_e_GM_SBC_16_hex@@"@@if_show_8chan_presets
@ -4560,7 +4559,7 @@ dialog = tcuControls, "Transmission Settings"
; commandButton = "Mitsubishi 4G93", cmd_set_engine_type_MITSUBISHI_4G93
; commandButton = "Toyota 1NZ-FE", cmd_set_engine_type_TOYOTA_1NZ_FE@@if_show_4chan_presets
commandButton = "microRusEFI M111", cmd_set_engine_type_MRE_M111@@if_show_microRusEFI_presets
commandButton = "microRusEFI M111", cmd_set_engine_type_MERCEDES_M111@@if_show_microRusEFI_presets
commandButton = "microRusEFI GDI VAG B6 test", cmd_set_engine_type_microRusEFI_VW_B6@@if_show_microRusEFI_presets
; commandButton = "microRusEFI BCM", cmd_set_engine_type_microRusEFI_MRE_BODY_CONTROL@@if_show_microRusEFI_presets
commandButton = "microRusEFI CAN Extender", cmd_set_engine_type_MRE_SECONDARY_CAN@@if_show_microRusEFI_presets
@ -4570,7 +4569,7 @@ dialog = tcuControls, "Transmission Settings"
commandButton = "Hyundai PB", cmd_set_engine_type_HYUNDAI_PB@@if_show_8chan_presets
; commandButton = "Proteus Nissan VQ", cmd_set_engine_type_PROTEUS_NISSAN_VQ35@@if_show_Proteus_presets
commandButton = "Proteus M111", cmd_set_engine_type_PROTEUS_M111@@if_show_Proteus_presets
commandButton = "Proteus M111", cmd_set_engine_type_MERCEDES_M111@@if_show_Proteus_presets
commandButton = "Proteus M73 v12", cmd_set_engine_type_Proteus_M73@@if_show_Proteus_presets
commandButton = "Proteus GDI VAG B6 test", cmd_set_engine_type_PROTEUS_VW_B6@@if_show_Proteus_presets
commandButton = "Proteus GM Gen4", cmd_set_engine_type_PROTEUS_GM_LS_4@@if_show_Proteus_presets

View File

@ -29,6 +29,6 @@ public class TuneCanToolRunner extends TuneCanTool {
processREOtune(1507, engine_type_e.HELLEN_154_HYUNDAI_COUPE_BK2, "COUPE-BK2", "coupleBK2");
processREOtune(1576, engine_type_e.HYUNDAI_PB, "PB", "pb");
processREOtune(1591, engine_type_e.BMW_M52, "M52", "");
processREOtune(1490, engine_type_e.MRE_M111, "m111-alex", "");
processREOtune(1490, engine_type_e.MERCEDES_M111, "m111-alex", "");
}
}

View File

@ -33,7 +33,7 @@ public class WriteSimulatorConfiguration {
for (engine_type_e type : new engine_type_e[]{
// [CannedTunes] see 'rusEfiFunctionalTest.cpp' which exports default tunes into binary files for us
// [CannedTunes] TuneCanToolRunner for last third step
engine_type_e.MRE_M111,
engine_type_e.MERCEDES_M111,
engine_type_e.BMW_M52,
engine_type_e.MAZDA_MIATA_NA6,
engine_type_e.MAZDA_MIATA_NA94,

View File

@ -184,7 +184,7 @@ void rusEfiFunctionalTest(void) {
// [CannedTunes] at the moment we manually sync this list with WriteSimulatorConfiguration.java
for (auto const type : {
engine_type_e::MRE_M111,
engine_type_e::MERCEDES_M111,
engine_type_e::BMW_M52,
engine_type_e::MAZDA_MIATA_NA6,
engine_type_e::MAZDA_MIATA_NA94,