From b7d479f7e4a173e8174bf0415726316a42a3fcb2 Mon Sep 17 00:00:00 2001 From: rusefillc Date: Thu, 19 Sep 2024 16:55:14 -0400 Subject: [PATCH] give flexibility to disable SD card logging only:uaefi --- .../boards/hellen/alphax-8chan/board_configuration.cpp | 3 ++- firmware/config/boards/hellen/hellen_common.cpp | 2 +- firmware/config/boards/hellen/uaefi/board_configuration.cpp | 1 + firmware/config/boards/hellen_meta.h | 5 ----- 4 files changed, 4 insertions(+), 7 deletions(-) diff --git a/firmware/config/boards/hellen/alphax-8chan/board_configuration.cpp b/firmware/config/boards/hellen/alphax-8chan/board_configuration.cpp index b53e9c7d07..3041ff6316 100644 --- a/firmware/config/boards/hellen/alphax-8chan/board_configuration.cpp +++ b/firmware/config/boards/hellen/alphax-8chan/board_configuration.cpp @@ -103,7 +103,8 @@ void boardOnConfigurationChange(engine_configuration_s * /*previousConfiguration void setBoardConfigOverrides() { setHellenVbatt(); - setHellenSdCardSpi1(); + setHellenSdCardSpi1Hardware(); + engineConfiguration->isSdCardEnabled = true; setDefaultHellenAtPullUps(); diff --git a/firmware/config/boards/hellen/hellen_common.cpp b/firmware/config/boards/hellen/hellen_common.cpp index 46aa9aee37..f333528105 100644 --- a/firmware/config/boards/hellen/hellen_common.cpp +++ b/firmware/config/boards/hellen/hellen_common.cpp @@ -113,7 +113,7 @@ void hellenBoardStandBy() { extern OutputPin accelerometerChipSelect; void hellenMegaSdWithAccelerometer() { - setHellenSdCardSpi1(); + setHellenSdCardSpi1Hardware(); // weird order of operations? i guess it does not really matter hellenMegaAccelerometerPreInitCS2Pin(); } diff --git a/firmware/config/boards/hellen/uaefi/board_configuration.cpp b/firmware/config/boards/hellen/uaefi/board_configuration.cpp index a203f865bc..303acd8846 100644 --- a/firmware/config/boards/hellen/uaefi/board_configuration.cpp +++ b/firmware/config/boards/hellen/uaefi/board_configuration.cpp @@ -80,6 +80,7 @@ void setBoardDefaultConfiguration() { setHellenMMbaro(); engineConfiguration->displayLogicLevelsInEngineSniffer = true; + engineConfiguration->isSdCardEnabled = true; engineConfiguration->globalTriggerAngleOffset = 0; diff --git a/firmware/config/boards/hellen_meta.h b/firmware/config/boards/hellen_meta.h index 266ddfa9b0..fded93b932 100644 --- a/firmware/config/boards/hellen_meta.h +++ b/firmware/config/boards/hellen_meta.h @@ -279,11 +279,6 @@ static void setAccelerometerSpi() { engineConfiguration->accelerometerCsPin = Gpio::H_SPI1_CS2; } -static void setHellenSdCardSpi1() { - setHellenSdCardSpi1Hardware(); - engineConfiguration->isSdCardEnabled = true; -} - static void setHellen64SdCardSpi() { engineConfiguration->isSdCardEnabled = true; engineConfiguration->sdCardSpiDevice = SPI_DEVICE_3;