diff --git a/common/stm32_nucleo/STM32TestTask.cpp b/common/stm32_nucleo/STM32TestTask.cpp index 91b49a6..094622c 100644 --- a/common/stm32_nucleo/STM32TestTask.cpp +++ b/common/stm32_nucleo/STM32TestTask.cpp @@ -18,6 +18,10 @@ ReturnValue_t STM32TestTask::performPeriodicAction() { #endif BSP_LED_Toggle(LED3); } + if(gyro != nullptr) { + gyro->performOperation(); + } + return TestTask::performPeriodicAction(); } @@ -31,8 +35,7 @@ ReturnValue_t STM32TestTask::performOneShotAction() { } void STM32TestTask::performSpiL3gd20hTest() { - SPI_HandleTypeDef spiHandle = {}; - GyroL3GD20H gyroDevice(&spiHandle, spi::TransferModes::POLLING); - gyroDevice.initialize(); - gyroDevice.performOperation(); + gyro = new GyroL3GD20H(&spiHandle, spi::TransferModes::POLLING); + gyro->initialize(); + gyro->performOperation(); } diff --git a/common/stm32_nucleo/STM32TestTask.h b/common/stm32_nucleo/STM32TestTask.h index f00ec15..fee8098 100644 --- a/common/stm32_nucleo/STM32TestTask.h +++ b/common/stm32_nucleo/STM32TestTask.h @@ -5,7 +5,7 @@ #include "stm32h7xx_hal.h" #include "stm32h7xx_hal_spi.h" - +class GyroL3GD20H; class STM32TestTask: public TestTask { public: @@ -18,7 +18,8 @@ public: private: bool blinkyLed = false; - + SPI_HandleTypeDef spiHandle = {}; + GyroL3GD20H* gyro = nullptr; }; diff --git a/fsfw_hal b/fsfw_hal index 92a3f13..05b64b0 160000 --- a/fsfw_hal +++ b/fsfw_hal @@ -1 +1 @@ -Subproject commit 92a3f131721da077ede6ef7c34f5837bccc58021 +Subproject commit 05b64b05a3b5777298b28b2fa2ba544554bb2e3b