From f80566777923ae1e8f619ed2056c7637666be26e Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Fri, 28 Oct 2022 10:16:59 +0200 Subject: [PATCH] afmt --- CMakeLists.txt | 12 +++++++++--- src/fsfw/devicehandlers/DeviceHandlerBase.cpp | 2 +- src/fsfw/devicehandlers/DeviceHandlerBase.h | 16 +++++++--------- src/fsfw/devicehandlers/DeviceHandlerIF.h | 1 - .../serviceinterface/ServiceInterfaceBuffer.cpp | 1 - src/fsfw_hal/common/CMakeLists.txt | 2 +- src/fsfw_hal/common/printChar.c | 2 +- 7 files changed, 19 insertions(+), 17 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index e2572b20..cccd51a4 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -345,9 +345,15 @@ if(FSFW_BUILD_TESTS) DEPENDENCIES ${FSFW_TEST_TGT}) else() setup_target_for_coverage_lcov( - NAME ${FSFW_TEST_TGT}_coverage EXECUTABLE ${FSFW_TEST_TGT} - DEPENDENCIES ${FSFW_TEST_TGT} - GENHTML_ARGS --html-epilog ${CMAKE_SOURCE_DIR}/unittests/lcov_epilog.html) + NAME + ${FSFW_TEST_TGT}_coverage + EXECUTABLE + ${FSFW_TEST_TGT} + DEPENDENCIES + ${FSFW_TEST_TGT} + GENHTML_ARGS + --html-epilog + ${CMAKE_SOURCE_DIR}/unittests/lcov_epilog.html) endif() endif() endif() diff --git a/src/fsfw/devicehandlers/DeviceHandlerBase.cpp b/src/fsfw/devicehandlers/DeviceHandlerBase.cpp index ae986ca3..8bcba7c4 100644 --- a/src/fsfw/devicehandlers/DeviceHandlerBase.cpp +++ b/src/fsfw/devicehandlers/DeviceHandlerBase.cpp @@ -581,7 +581,7 @@ void DeviceHandlerBase::setMode(Mode_t newMode, uint8_t newSubmode) { modeChanged(); setNormalDatapoolEntriesInvalid(); if (!isTransitionalMode()) { - //clear this flag when a non-transitional Mode is reached to be safe + // clear this flag when a non-transitional Mode is reached to be safe continueToNormal = false; modeHelper.modeChanged(newMode, newSubmode); announceMode(false); diff --git a/src/fsfw/devicehandlers/DeviceHandlerBase.h b/src/fsfw/devicehandlers/DeviceHandlerBase.h index 1fc4b1de..4498284b 100644 --- a/src/fsfw/devicehandlers/DeviceHandlerBase.h +++ b/src/fsfw/devicehandlers/DeviceHandlerBase.h @@ -102,10 +102,9 @@ class DeviceHandlerBase : public DeviceHandlerIF, DeviceHandlerBase(object_id_t setObjectId, object_id_t deviceCommunication, CookieIF *comCookie, FailureIsolationBase *fdirInstance = nullptr, size_t cmdQueueSize = 20); - /** * extending the modes of DeviceHandler IF for internal state machine - */ + */ static constexpr uint8_t TRANSITION_MODE_CHILD_ACTION_MASK = 0x20; static constexpr uint8_t TRANSITION_MODE_BASE_ACTION_MASK = 0x10; //! This is a transitional state which can not be commanded. The device @@ -733,16 +732,16 @@ class DeviceHandlerBase : public DeviceHandlerIF, /** * Get the current mode - * + * * set via setMode() - */ + */ Mode_t getMode(); /** * Get the current Submode - * + * * set via setMode() - */ + */ Submode_t getSubmode; /** This is the counter value from performOperation(). */ @@ -1227,7 +1226,6 @@ class DeviceHandlerBase : public DeviceHandlerIF, */ Mode_t mode; - /** * The submode the device handler is currently in. * This should not be changed directly but only with setMode() @@ -1254,10 +1252,10 @@ class DeviceHandlerBase : public DeviceHandlerIF, /** * used to make the state machine continue from ON to NOMAL when * a Device is commanded to NORMAL in OFF mode - * + * * set in startTransition() * evaluated in setMode() to continue to NORMAL when ON is reached - */ + */ bool continueToNormal; /** diff --git a/src/fsfw/devicehandlers/DeviceHandlerIF.h b/src/fsfw/devicehandlers/DeviceHandlerIF.h index 672f2830..c683b2cc 100644 --- a/src/fsfw/devicehandlers/DeviceHandlerIF.h +++ b/src/fsfw/devicehandlers/DeviceHandlerIF.h @@ -24,7 +24,6 @@ class DeviceHandlerIF { static const DeviceCommandId_t RAW_COMMAND_ID = -1; static const DeviceCommandId_t NO_COMMAND_ID = -2; - using dh_heater_request_t = uint8_t; using dh_thermal_state_t = int8_t; diff --git a/src/fsfw/serviceinterface/ServiceInterfaceBuffer.cpp b/src/fsfw/serviceinterface/ServiceInterfaceBuffer.cpp index 23892dcc..0e73be83 100644 --- a/src/fsfw/serviceinterface/ServiceInterfaceBuffer.cpp +++ b/src/fsfw/serviceinterface/ServiceInterfaceBuffer.cpp @@ -3,7 +3,6 @@ #if FSFW_CPP_OSTREAM_ENABLED == 1 #include - #include #include "fsfw/serviceinterface/serviceInterfaceDefintions.h" diff --git a/src/fsfw_hal/common/CMakeLists.txt b/src/fsfw_hal/common/CMakeLists.txt index 1cd9c678..2f4608f8 100644 --- a/src/fsfw_hal/common/CMakeLists.txt +++ b/src/fsfw_hal/common/CMakeLists.txt @@ -1,3 +1,3 @@ add_subdirectory(gpio) -target_sources(${LIB_FSFW_NAME} PRIVATE printChar.c) \ No newline at end of file +target_sources(${LIB_FSFW_NAME} PRIVATE printChar.c) diff --git a/src/fsfw_hal/common/printChar.c b/src/fsfw_hal/common/printChar.c index 6e02c1df..24fba5c8 100644 --- a/src/fsfw_hal/common/printChar.c +++ b/src/fsfw_hal/common/printChar.c @@ -1,5 +1,5 @@ -#include #include +#include void __attribute__((weak)) printChar(const char* character, bool errStream) { if (errStream) {