From 1493973beab35035733cba7dc536b3176f079d4c Mon Sep 17 00:00:00 2001 From: rusefillc Date: Wed, 20 Oct 2021 10:38:01 -0400 Subject: [PATCH] very old very dead code --- firmware/console/status_loop.cpp | 2 +- .../controllers/gauges/lcd_controller.cpp | 2 +- firmware/controllers/settings.cpp | 44 +------------------ .../controllers/trigger/trigger_central.cpp | 2 +- .../trigger/trigger_emulator_algo.cpp | 2 +- .../tests/trigger/test_trigger_decoder.cpp | 2 - 6 files changed, 5 insertions(+), 49 deletions(-) diff --git a/firmware/console/status_loop.cpp b/firmware/console/status_loop.cpp index b1d5510770..19e7492620 100644 --- a/firmware/console/status_loop.cpp +++ b/firmware/console/status_loop.cpp @@ -199,7 +199,7 @@ void printOverallStatus(efitimesec_t nowSeconds) { } timeOfPreviousPrintVersion = nowSeconds; int seconds = getTimeNowSeconds(); - printCurrentState(&logger, seconds, getConfigurationName(engineConfiguration->engineType), FIRMWARE_ID); + printCurrentState(&logger, seconds, getEngine_type_e(engineConfiguration->engineType), FIRMWARE_ID); #if EFI_PROD_CODE printOutPin(PROTOCOL_CRANK1, CONFIG(triggerInputPins)[0]); printOutPin(PROTOCOL_CRANK2, CONFIG(triggerInputPins)[1]); diff --git a/firmware/controllers/gauges/lcd_controller.cpp b/firmware/controllers/gauges/lcd_controller.cpp index 29fa706e61..2764904df0 100644 --- a/firmware/controllers/gauges/lcd_controller.cpp +++ b/firmware/controllers/gauges/lcd_controller.cpp @@ -139,7 +139,7 @@ static void showLine(lcd_line_e line, int /*screenY*/) { lcdPrintf("ver %s %d", VCS_VERSION, getRusEfiVersion()); return; case LL_CONFIG: - lcdPrintf("config %s", getConfigurationName(engineConfiguration->engineType)); + lcdPrintf("config %s", getEngine_type_e(engineConfiguration->engineType)); return; case LL_RPM: { diff --git a/firmware/controllers/settings.cpp b/firmware/controllers/settings.cpp index dbdaaec868..abba566e38 100644 --- a/firmware/controllers/settings.cpp +++ b/firmware/controllers/settings.cpp @@ -92,7 +92,7 @@ static void printOutputs(const engine_configuration_s *engineConfiguration) { */ void printConfiguration(const engine_configuration_s *engineConfiguration) { - efiPrintf("Template %s/%d trigger %s/%s/%d", getConfigurationName(engineConfiguration->engineType), + efiPrintf("Template %s/%d trigger %s/%s/%d", getEngine_type_e(engineConfiguration->engineType), engineConfiguration->engineType, getTrigger_type_e(engineConfiguration->trigger.type), getEngine_load_mode_e(engineConfiguration->fuelAlgorithm), engineConfiguration->fuelAlgorithm); @@ -1303,48 +1303,6 @@ void initSettings(void) { #endif /* !EFI_UNIT_TEST */ -/** - * These should be not very long because these are displayed on the LCD as is - */ -const char* getConfigurationName(engine_type_e engineType) { - switch (engineType) { - case DEFAULT_FRANKENSO: - return "DEFAULT_FRANKENSO"; - case DODGE_NEON_1995: - return "Neon95"; - case FORD_ASPIRE_1996: - return "Aspire"; - case NISSAN_PRIMERA: - return "Primera"; - case HONDA_ACCORD_CD: - return "Accord3"; - case HONDA_ACCORD_CD_TWO_WIRES: - return "Accord2"; - case HONDA_ACCORD_1_24_SHIFTED: - return "Accord24sh"; - case HONDA_ACCORD_CD_DIP: - return "HondaD"; - case FORD_INLINE_6_1995: - return "Fordi6"; - case GY6_139QMB: - return "Gy6139"; - case MAZDA_MIATA_NB1: - return "MiataNB1"; - case FORD_ESCORT_GT: - return "EscrtGT"; - case CITROEN_TU3JP: - return "TU3JP"; - case MITSU_4G93: - return "Mi4G93"; - case MIATA_1990: - return "MX590"; - case MIATA_1996: - return "MX596"; - default: - return getEngine_type_e(engineType); - } -} - void setEngineType(int value DECLARE_ENGINE_PARAMETER_SUFFIX) { { #if EFI_PROD_CODE diff --git a/firmware/controllers/trigger/trigger_central.cpp b/firmware/controllers/trigger/trigger_central.cpp index f0e01409d5..109a3eeb02 100644 --- a/firmware/controllers/trigger/trigger_central.cpp +++ b/firmware/controllers/trigger/trigger_central.cpp @@ -667,7 +667,7 @@ void triggerInfo(void) { #endif /* HAL_TRIGGER_USE_PAL */ efiPrintf("Template %s (%d) trigger %s (%d) useRiseEdge=%s onlyFront=%s useOnlyFirstChannel=%s tdcOffset=%.2f", - getConfigurationName(engineConfiguration->engineType), engineConfiguration->engineType, + getEngine_type_e(engineConfiguration->engineType), engineConfiguration->engineType, getTrigger_type_e(engineConfiguration->trigger.type), engineConfiguration->trigger.type, boolToString(TRIGGER_WAVEFORM(useRiseEdge)), boolToString(engineConfiguration->useOnlyRisingEdgeForTrigger), boolToString(engineConfiguration->trigger.useOnlyFirstChannel), TRIGGER_WAVEFORM(tdcPosition)); diff --git a/firmware/controllers/trigger/trigger_emulator_algo.cpp b/firmware/controllers/trigger/trigger_emulator_algo.cpp index bba98cb046..c26b91301f 100644 --- a/firmware/controllers/trigger/trigger_emulator_algo.cpp +++ b/firmware/controllers/trigger/trigger_emulator_algo.cpp @@ -204,7 +204,7 @@ void onConfigurationChangeRpmEmulatorCallback(engine_configuration_s *previousCo } void initTriggerEmulator(DECLARE_ENGINE_PARAMETER_SIGNATURE) { - efiPrintf("Emulating %s", getConfigurationName(engineConfiguration->engineType)); + efiPrintf("Emulating %s", getEngine_type_e(engineConfiguration->engineType)); startTriggerEmulatorPins(PASS_ENGINE_PARAMETER_SIGNATURE); diff --git a/unit_tests/tests/trigger/test_trigger_decoder.cpp b/unit_tests/tests/trigger/test_trigger_decoder.cpp index 939c7bada3..ad24354672 100644 --- a/unit_tests/tests/trigger/test_trigger_decoder.cpp +++ b/unit_tests/tests/trigger/test_trigger_decoder.cpp @@ -485,8 +485,6 @@ TEST(misc, testTriggerDecoder) { testTriggerDecoder2("Miata NB", MAZDA_MIATA_NB1, 12, 0.0833, 0.0444); printf("====================================================================================== testTriggerDecoder part 3\r\n"); - testTriggerDecoder2("Civic 4/0 both", TEST_CIVIC_4_0_BOTH, 0, 0.5000, 0.0); - testTriggerDecoder2("Civic 4/0 rise", TEST_CIVIC_4_0_RISE, 0, 0.5000, 0.0); testTriggerDecoder2("test 2/1 both", TEST_ISSUE_366_BOTH, 0, 0.2500, 0.0); testTriggerDecoder2("test 2/1 rise", TEST_ISSUE_366_RISE, 0, 0.0000, 0.0);