From ff641d81e2db9aad2f8f775dcde3b3e12e73cb5e Mon Sep 17 00:00:00 2001 From: rusefi Date: Sun, 28 Apr 2019 23:42:49 -0400 Subject: [PATCH] fixing build & refactoring --- firmware/bootloader/src/main.cpp | 4 ++-- firmware/config/engines/custom_engine.cpp | 8 ++++---- firmware/controllers/algo/engine_configuration.cpp | 10 +++++----- firmware/controllers/algo/engine_configuration.h | 6 +++--- 4 files changed, 14 insertions(+), 14 deletions(-) diff --git a/firmware/bootloader/src/main.cpp b/firmware/bootloader/src/main.cpp index 86ea31f720..ab2a56dd3e 100644 --- a/firmware/bootloader/src/main.cpp +++ b/firmware/bootloader/src/main.cpp @@ -38,9 +38,9 @@ int main(void) { halInit(); chSysInit(); // set base pin configuration based on the board - setDefaultBasePins(PASS_ENGINE_PARAMETER_SIGNATURE); + setDefaultBasePins(PASS_CONFIG_PARAMETER_SIGNATURE); // set UART pads configuration based on the board - setDefaultSerialParameters(PASS_ENGINE_PARAMETER_SIGNATURE); + setDefaultSerialParameters(PASS_CONFIG_PARAMETER_SIGNATURE); /* at the moment SD card is not needed by bootloader // set SD card configuration also setDefaultSdCardParameters(PASS_ENGINE_PARAMETER_SIGNATURE); diff --git a/firmware/config/engines/custom_engine.cpp b/firmware/config/engines/custom_engine.cpp index c4ecca8251..c046fb616b 100644 --- a/firmware/config/engines/custom_engine.cpp +++ b/firmware/config/engines/custom_engine.cpp @@ -244,9 +244,9 @@ void setFrankensoBoardTestConfiguration(DECLARE_ENGINE_PARAMETER_SIGNATURE) { // ETB_BENCH_ENGINE // set engine_type 58 void setEtbTestConfiguration(DECLARE_ENGINE_PARAMETER_SIGNATURE) { - setDefaultBasePins(); + setDefaultBasePins(PASS_CONFIG_PARAMETER_SIGNATURE); // TODO: HOW?! IS THIS HELPING USB SERIAL?! - setDefaultSerialParameters(PASS_ENGINE_PARAMETER_SIGNATURE); + setDefaultSerialParameters(PASS_CONFIG_PARAMETER_SIGNATURE); // VAG test ETB // set tps_min 54 engineConfiguration->tpsMin = 54; @@ -293,9 +293,9 @@ void setEtbTestConfiguration(DECLARE_ENGINE_PARAMETER_SIGNATURE) { // TLE8888_BENCH_ENGINE // set engine_type 59 void setTle8888TestConfiguration(DECLARE_ENGINE_PARAMETER_SIGNATURE) { - setDefaultBasePins(); + setDefaultBasePins(PASS_CONFIG_PARAMETER_SIGNATURE); // TODO: HOW?! IS THIS HELPING USB SERIAL?! - setDefaultSerialParameters(PASS_ENGINE_PARAMETER_SIGNATURE); + setDefaultSerialParameters(PASS_CONFIG_PARAMETER_SIGNATURE); engineConfiguration->specs.cylindersCount = 8; engineConfiguration->specs.firingOrder = FO_1_8_7_2_6_5_4_3; engineConfiguration->ignitionMode = IM_INDIVIDUAL_COILS; diff --git a/firmware/controllers/algo/engine_configuration.cpp b/firmware/controllers/algo/engine_configuration.cpp index 914f31ff25..684d9e5164 100644 --- a/firmware/controllers/algo/engine_configuration.cpp +++ b/firmware/controllers/algo/engine_configuration.cpp @@ -440,7 +440,7 @@ void prepareVoidConfiguration(engine_configuration_s *engineConfiguration) { boardConfiguration->is_enabled_spi_3 = boardConfiguration->is_enabled_spi_4 = false; } -void setDefaultBasePins(DECLARE_ENGINE_PARAMETER_SIGNATURE) { +void setDefaultBasePins(DECLARE_CONFIG_PARAMETER_SIGNATURE) { #ifdef EFI_FATAL_ERROR_PIN engineConfiguration->fatalErrorPin = EFI_FATAL_ERROR_PIN; #else @@ -463,7 +463,7 @@ void setDefaultBasePins(DECLARE_ENGINE_PARAMETER_SIGNATURE) { } // needed also by bootloader code -void setDefaultSerialParameters(DECLARE_ENGINE_PARAMETER_SIGNATURE) { +void setDefaultSerialParameters(DECLARE_CONFIG_PARAMETER_SIGNATURE) { boardConfiguration->useSerialPort = true; engineConfiguration->binarySerialTxPin = GPIOC_10; engineConfiguration->binarySerialRxPin = GPIOC_11; @@ -480,7 +480,7 @@ void setDefaultSerialParameters(DECLARE_ENGINE_PARAMETER_SIGNATURE) { // needed also by bootloader code // at the moment bootloader does NOT really need SD card, this is a step towards future bootloader SD card usage -void setDefaultSdCardParameters(DECLARE_ENGINE_PARAMETER_SIGNATURE) { +void setDefaultSdCardParameters(DECLARE_CONFIG_PARAMETER_SIGNATURE) { boardConfiguration->is_enabled_spi_3 = true; engineConfiguration->sdCardSpiDevice = SPI_DEVICE_3; boardConfiguration->sdCardCsPin = GPIOD_4; @@ -1074,9 +1074,9 @@ void setDefaultConfiguration(DECLARE_ENGINE_PARAMETER_SIGNATURE) { */ void setDefaultBoardConfiguration(DECLARE_ENGINE_PARAMETER_SIGNATURE) { // set initial pin groups - setDefaultBasePins(PASS_ENGINE_PARAMETER_SIGNATURE); + setDefaultBasePins(PASS_CONFIG_PARAMETER_SIGNATURE); - setDefaultSerialParameters(PASS_ENGINE_PARAMETER_SIGNATURE); + setDefaultSerialParameters(PASS_CONFIG_PARAMETER_SIGNATURE); setCanDefaults(PASS_ENGINE_PARAMETER_SIGNATURE); diff --git a/firmware/controllers/algo/engine_configuration.h b/firmware/controllers/algo/engine_configuration.h index e2b057e463..fb86e66ee6 100644 --- a/firmware/controllers/algo/engine_configuration.h +++ b/firmware/controllers/algo/engine_configuration.h @@ -67,9 +67,9 @@ void setConstantDwell(floatms_t dwellMs DECLARE_ENGINE_PARAMETER_SUFFIX); void printFloatArray(const char *prefix, float array[], int size); // needed by bootloader -void setDefaultBasePins(DECLARE_ENGINE_PARAMETER_SIGNATURE); -void setDefaultSerialParameters(DECLARE_ENGINE_PARAMETER_SIGNATURE); -void setDefaultSdCardParameters(DECLARE_ENGINE_PARAMETER_SIGNATURE); +void setDefaultBasePins(DECLARE_CONFIG_PARAMETER_SIGNATURE); +void setDefaultSerialParameters(DECLARE_CONFIG_PARAMETER_SIGNATURE); +void setDefaultSdCardParameters(DECLARE_CONFIG_PARAMETER_SIGNATURE); void rememberCurrentConfiguration(DECLARE_ENGINE_PARAMETER_SIGNATURE); void incrementGlobalConfigurationVersion(DECLARE_ENGINE_PARAMETER_SIGNATURE);