From 14baacfd59457d460c4508dfa4777145c778c662 Mon Sep 17 00:00:00 2001 From: rusefillc Date: Mon, 25 Dec 2023 01:29:42 -0500 Subject: [PATCH] only:not just Proteus --- firmware/config/boards/board_id.cpp | 2 +- .../boards/proteus/board_configuration.cpp | 8 ++++---- firmware/config/engines/custom_engine.h | 2 +- firmware/config/engines/harley.cpp | 16 ++++++++-------- .../algo/auto_generated_enginetypes.cpp | 2 +- .../controllers/algo/engine_configuration.cpp | 4 ++-- firmware/controllers/algo/engine_types.h | 2 +- firmware/tunerstudio/rusefi.input | 4 ++-- 8 files changed, 20 insertions(+), 20 deletions(-) diff --git a/firmware/config/boards/board_id.cpp b/firmware/config/boards/board_id.cpp index 1de3b71799..088ccdc4df 100644 --- a/firmware/config/boards/board_id.cpp +++ b/firmware/config/boards/board_id.cpp @@ -17,7 +17,7 @@ board_id_t getBoardId() { // a way to test harness patch cord return STATIC_BOARD_ID_PROTEUS_CANAM; } - if (engineConfiguration->engineType == engine_type_e::PROTEUS_HARLEY) { + if (engineConfiguration->engineType == engine_type_e::HARLEY) { // a way to test harness patch cord return STATIC_BOARD_ID_PROTEUS_HARLEY; } diff --git a/firmware/config/boards/proteus/board_configuration.cpp b/firmware/config/boards/proteus/board_configuration.cpp index 37cd7c52d5..ad811fbbc1 100644 --- a/firmware/config/boards/proteus/board_configuration.cpp +++ b/firmware/config/boards/proteus/board_configuration.cpp @@ -235,7 +235,7 @@ int getBoardMetaLowSideOutputsCount() { if (engineConfiguration->engineType == engine_type_e::MAVERICK_X3) { return getBoardMetaOutputsCount(); } - if (engineConfiguration->engineType == engine_type_e::PROTEUS_HARLEY) { + if (engineConfiguration->engineType == engine_type_e::HARLEY) { return getBoardMetaOutputsCount(); } if (engineConfiguration->engineType == engine_type_e::PROTEUS_SBC) { @@ -286,7 +286,7 @@ int getBoardMetaOutputsCount() { if (engineConfiguration->engineType == engine_type_e::ME17_9_MISC) { return efi::size(PROTEUS_ME17_ADAPTER_OUTPUTS); } - if (engineConfiguration->engineType == engine_type_e::PROTEUS_HARLEY) { + if (engineConfiguration->engineType == engine_type_e::HARLEY) { return efi::size(PROTEUS_HARLEY_OUTPUTS); } if (engineConfiguration->engineType == engine_type_e::PROTEUS_SBC) { @@ -297,7 +297,7 @@ int getBoardMetaOutputsCount() { int getBoardMetaDcOutputsCount() { if (engineConfiguration->engineType == engine_type_e::ME17_9_MISC || - engineConfiguration->engineType == engine_type_e::PROTEUS_HARLEY || + engineConfiguration->engineType == engine_type_e::HARLEY || engineConfiguration->engineType == engine_type_e::MAVERICK_X3 ) { return 1; @@ -309,7 +309,7 @@ Gpio* getBoardMetaOutputs() { if (engineConfiguration->engineType == engine_type_e::MAVERICK_X3) { return PROTEUS_CANAM_OUTPUTS; } - if (engineConfiguration->engineType == engine_type_e::PROTEUS_HARLEY) { + if (engineConfiguration->engineType == engine_type_e::HARLEY) { return PROTEUS_HARLEY_OUTPUTS; } if (engineConfiguration->engineType == engine_type_e::PROTEUS_SBC) { diff --git a/firmware/config/engines/custom_engine.h b/firmware/config/engines/custom_engine.h index fd5ebb281e..71f537d77f 100644 --- a/firmware/config/engines/custom_engine.h +++ b/firmware/config/engines/custom_engine.h @@ -32,7 +32,7 @@ void fuelBenchMode(); void proteusBoardTest(); void proteusLuaDemo(); void proteusStimQc(); -void proteusHarley(); +void setHarley(); void proteusDcWastegateTest(); void setTest33816EngineConfiguration(); diff --git a/firmware/config/engines/harley.cpp b/firmware/config/engines/harley.cpp index 64c470d7a4..50eac41365 100644 --- a/firmware/config/engines/harley.cpp +++ b/firmware/config/engines/harley.cpp @@ -9,10 +9,10 @@ static void harleyEngine() { /** - * PROTEUS_HARLEY + * HARLEY * set engine_type 6 */ -void proteusHarley() { +void setHarley() { harleyEngine(); engineConfiguration->displacement = 1.9; engineConfiguration->injectionMode = IM_SEQUENTIAL; @@ -112,22 +112,22 @@ end function onTick() - + if packet502[1] == 01 then offCounter = 0 counter543 = (counter543 + 1) % 64 packet543[7] = 64 + counter543 packet543[8] = crc8_j1850(packet543, 7) - APP = getSensor("AcceleratorPedal") + APP = getSensor("AcceleratorPedal") if APP == nil then packet543[5] = 0 else packet543[5] = APP *2 end - + txCan(1, 0x543, 0, packet543) txCan(1, 0x541, 0, packet541) - + if every200msTimer:getElapsedSeconds() > 0.2 then every200msTimer:reset(); txCan(1, 0x540, 0, packet540) @@ -137,7 +137,7 @@ function onTick() every50msTimer:reset(); txCan(1, 0x542, 0, packet542) end - + if everySecondTimer:getElapsedSeconds() > 1 then everySecondTimer:reset(); txCan(1, 0x502, 0, packet502) @@ -159,7 +159,7 @@ function onTick() else if offCounter == 0 then --goodbye sweet love txCan(1, 0x502, 0, packet502) --goodbye - offCounter = 1 --One shot + offCounter = 1 --One shot end end end diff --git a/firmware/controllers/algo/auto_generated_enginetypes.cpp b/firmware/controllers/algo/auto_generated_enginetypes.cpp index 10bb692c6d..451e559558 100644 --- a/firmware/controllers/algo/auto_generated_enginetypes.cpp +++ b/firmware/controllers/algo/auto_generated_enginetypes.cpp @@ -325,7 +325,7 @@ case engine_type_e::PROTEUS_E65_6H_MAN_IN_THE_MIDDLE: return "PROTEUS_E65_6H_MAN_IN_THE_MIDDLE"; case engine_type_e::PROTEUS_GM_LS_4: return "PROTEUS_GM_LS_4"; -case engine_type_e::PROTEUS_HARLEY: +case engine_type_e::HARLEY: return "PROTEUS_HARLEY"; case engine_type_e::PROTEUS_HONDA_OBD2A: return "PROTEUS_HONDA_OBD2A"; diff --git a/firmware/controllers/algo/engine_configuration.cpp b/firmware/controllers/algo/engine_configuration.cpp index 8c87d71827..e6458e0cb8 100644 --- a/firmware/controllers/algo/engine_configuration.cpp +++ b/firmware/controllers/algo/engine_configuration.cpp @@ -788,8 +788,8 @@ void resetConfigurationExt(configuration_callback_t boardCallback, engine_type_e case engine_type_e::PROTEUS_LUA_DEMO: proteusLuaDemo(); break; - case engine_type_e::PROTEUS_HARLEY: - proteusHarley(); + case engine_type_e::HARLEY: + setHarley(); break; case engine_type_e::PROTEUS_BMW_M73: setEngineBMW_M73_Proteus(); diff --git a/firmware/controllers/algo/engine_types.h b/firmware/controllers/algo/engine_types.h index 67896a1ed2..f2daeea1c0 100644 --- a/firmware/controllers/algo/engine_types.h +++ b/firmware/controllers/algo/engine_types.h @@ -36,7 +36,7 @@ enum class engine_type_e : uint16_t { MRE_SECONDARY_CAN = 4, NISSAN_PRIMERA = 5, - PROTEUS_HARLEY = 6, + HARLEY = 6, FORD_INLINE_6_1995 = 7, /** * one cylinder engine diff --git a/firmware/tunerstudio/rusefi.input b/firmware/tunerstudio/rusefi.input index 90d953ee79..9d82359b23 100644 --- a/firmware/tunerstudio/rusefi.input +++ b/firmware/tunerstudio/rusefi.input @@ -2211,7 +2211,7 @@ cmd_set_engine_type_PROTEUS_HONDA_OBD2A = "@@TS_IO_TEST_COMMAND_char@@@@ts_co cmd_set_engine_type_PROTEUS_MIATA_NB2 = "@@TS_IO_TEST_COMMAND_char@@@@ts_command_e_TS_SET_ENGINE_TYPE_16_hex@@@@engine_type_e_PROTEUS_MIATA_NB2_16_hex@@"@@if_show_Proteus_presets cmd_set_engine_type_Proteus_Miata_TCU = "@@TS_IO_TEST_COMMAND_char@@@@ts_command_e_TS_SET_ENGINE_TYPE_16_hex@@@@engine_type_e_MIATA_PROTEUS_TCU_16_hex@@"@@if_show_Proteus_presets 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_PROTEUS_HARLEY = "@@TS_IO_TEST_COMMAND_char@@@@ts_command_e_TS_SET_ENGINE_TYPE_16_hex@@@@engine_type_e_PROTEUS_HARLEY_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_SBC = "@@TS_IO_TEST_COMMAND_char@@@@ts_command_e_TS_SET_ENGINE_TYPE_16_hex@@@@engine_type_e_PROTEUS_SBC_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 @@ -4452,7 +4452,7 @@ dialog = tcuControls, "Transmission Settings" commandButton = "Proteus Miata NB2", cmd_set_engine_type_PROTEUS_MIATA_NB2@@if_show_Proteus_presets commandButton = "Proteus Honda K", cmd_set_engine_type_PROTEUS_HONDA_K@@if_show_Proteus_presets ; commandButton = "Proteus Honda OBD2A", cmd_set_engine_type_PROTEUS_HONDA_OBD2A@@if_show_Proteus_presets - commandButton = "Proteus Harley", cmd_set_engine_type_PROTEUS_HARLEY@@if_show_Proteus_presets + commandButton = "Proteus Harley", cmd_set_engine_type_HARLEY@@if_show_Proteus_presets commandButton = "Fuel Bench", cmd_set_engine_type_FUEL_BENCH commandButton = "SBC", cmd_set_engine_type_ALPHAX_8CHAN_SBC@@if_show_8chan_presets