From 89757c447c2bd8bb865b2f9b2eac3a5e6fb7ff16 Mon Sep 17 00:00:00 2001 From: Jakob Meier Date: Fri, 17 Jun 2022 08:31:36 +0200 Subject: [PATCH] run auto-formatter --- CMakeLists.txt | 9 +- bsp_hosted/InitMission.cpp | 8 +- bsp_hosted/ObjectFactory.cpp | 28 +-- .../fsfwconfig/objects/systemObjectList.h | 2 +- .../fsfwconfig/objects/translateObjects.cpp | 1 + .../fsfwconfig/pollingsequence/CMakeLists.txt | 2 +- .../fsfwconfig/pollingsequence/DummyPst.cpp | 175 +++++++++--------- bsp_q7s/core/ObjectFactory.cpp | 2 +- dummies/AcuDummy.cpp | 21 +-- dummies/BpxDummy.cpp | 19 +- dummies/CMakeLists.txt | 38 ++-- dummies/ComIFDummy.h | 1 - dummies/CoreControllerDummy.cpp | 15 +- dummies/GyroAdisDummy.cpp | 17 +- dummies/GyroL3GD20Dummy.cpp | 23 ++- dummies/ImtqDummy.cpp | 22 +-- dummies/MgmLIS3MDLDummy.cpp | 17 +- dummies/P60DockDummy.cpp | 17 +- dummies/PlPcduDummy.cpp | 16 +- dummies/RwDummy.cpp | 19 +- dummies/StarTrackerDummy.cpp | 14 +- dummies/SusDummy.cpp | 16 +- dummies/SyrlinksDummy.cpp | 14 +- dummies/TemperatureSensorsDummy.cpp | 4 +- linux/ObjectFactory.cpp | 4 +- .../devicedefinitions/PlocMPSoCDefinitions.h | 50 ++--- linux/devices/ploc/PlocMPSoCHandler.cpp | 151 +++++++-------- linux/devices/ploc/PlocSupervisorHandler.cpp | 68 +++---- linux/fsfwconfig/objects/systemObjectList.h | 2 +- mission/controller/ThermalController.h | 9 +- .../ThermalControllerDefinitions.h | 53 +++--- mission/devices/ACUHandler.cpp | 3 +- mission/devices/GomspaceDeviceHandler.cpp | 3 +- mission/devices/HeaterHandler.h | 2 +- mission/devices/Max31865EiveHandler.cpp | 9 +- mission/devices/P60DockHandler.cpp | 6 +- mission/devices/Tmp1075Handler.cpp | 5 +- mission/devices/max1227.cpp | 4 +- mission/utility/compileTime.h | 47 +++-- scripts/auto-formatter.sh | 1 + unittest/controller/testThermalController.cpp | 2 +- 41 files changed, 469 insertions(+), 450 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 66adc209..18b14092 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -433,9 +433,8 @@ endif() # Add libraries target_link_libraries(${LIB_EIVE_MISSION} PUBLIC ${LIB_FSFW_NAME} ${LIB_LWGPS_NAME} ${LIB_OS_NAME}) - -target_link_libraries(${LIB_DUMMIES} - PUBLIC ${LIB_FSFW_NAME} ${LIB_JSON_NAME}) + +target_link_libraries(${LIB_DUMMIES} PUBLIC ${LIB_FSFW_NAME} ${LIB_JSON_NAME}) target_link_libraries(${OBSW_NAME} PRIVATE ${LIB_EIVE_MISSION} ${LIB_DUMMIES}) @@ -468,10 +467,10 @@ target_link_libraries(${LIB_EIVE_MISSION} PUBLIC ${LIB_CXX_FS}) target_include_directories( ${LIB_EIVE_MISSION} PUBLIC ${CMAKE_CURRENT_SOURCE_DIR} ${FSFW_CONFIG_PATH} ${CMAKE_CURRENT_BINARY_DIR} ${LIB_ARCSEC_PATH}) - + target_include_directories( ${LIB_DUMMIES} PUBLIC ${CMAKE_CURRENT_SOURCE_DIR} ${FSFW_CONFIG_PATH} - ${CMAKE_CURRENT_BINARY_DIR}) + ${CMAKE_CURRENT_BINARY_DIR}) if(TGT_BSP MATCHES "arm/q7s" OR TGT_BSP MATCHES "arm/egse") target_include_directories(${LIB_EIVE_MISSION} PUBLIC ${ARCSEC_LIB_PATH}) diff --git a/bsp_hosted/InitMission.cpp b/bsp_hosted/InitMission.cpp index c2fbf139..6ec0ed35 100644 --- a/bsp_hosted/InitMission.cpp +++ b/bsp_hosted/InitMission.cpp @@ -1,6 +1,7 @@ #include "InitMission.h" #include +#include #include #include #include @@ -9,7 +10,6 @@ #include #include #include -#include #include @@ -150,9 +150,9 @@ void initmission::initTasks() { } result = thermalTask->addComponent(objects::CORE_CONTROLLER); - if (result != HasReturnvaluesIF::RETURN_OK) { - initmission::printAddObjectError("Core controller dummy", objects::CORE_CONTROLLER); - } + if (result != HasReturnvaluesIF::RETURN_OK) { + initmission::printAddObjectError("Core controller dummy", objects::CORE_CONTROLLER); + } result = thermalTask->addComponent(objects::THERMAL_CONTROLLER); if (result != HasReturnvaluesIF::RETURN_OK) { diff --git a/bsp_hosted/ObjectFactory.cpp b/bsp_hosted/ObjectFactory.cpp index 0cc4ac31..3538700c 100644 --- a/bsp_hosted/ObjectFactory.cpp +++ b/bsp_hosted/ObjectFactory.cpp @@ -2,10 +2,10 @@ #include #include +#include #include #include #include -#include #include #include @@ -26,23 +26,23 @@ #include #endif -#include -#include -#include -#include -#include -#include -#include #include -#include -#include +#include +#include +#include +#include #include #include +#include #include +#include +#include #include -#include -#include -#include +#include +#include +#include +#include +#include void Factory::setStaticFrameworkObjectIds() { PusServiceBase::packetSource = objects::PUS_PACKET_DISTRIBUTOR; @@ -89,5 +89,5 @@ void ObjectFactory::produce(void* args) { new SusDummy(); new ThermalController(objects::THERMAL_CONTROLLER, objects::NO_OBJECT); - //new TestTask(objects::TEST_TASK); + // new TestTask(objects::TEST_TASK); } diff --git a/bsp_hosted/fsfwconfig/objects/systemObjectList.h b/bsp_hosted/fsfwconfig/objects/systemObjectList.h index 008c7b80..4326c108 100644 --- a/bsp_hosted/fsfwconfig/objects/systemObjectList.h +++ b/bsp_hosted/fsfwconfig/objects/systemObjectList.h @@ -26,7 +26,7 @@ enum sourceObjects : uint32_t { /* 0x49 ('I') for Communication Interfaces **/ ARDUINO_COM_IF = 0x49000001, - DUMMY_COM_IF = 0x49000002 + DUMMY_COM_IF = 0x49000002 }; } diff --git a/bsp_hosted/fsfwconfig/objects/translateObjects.cpp b/bsp_hosted/fsfwconfig/objects/translateObjects.cpp index 1952f970..ee9cb057 100644 --- a/bsp_hosted/fsfwconfig/objects/translateObjects.cpp +++ b/bsp_hosted/fsfwconfig/objects/translateObjects.cpp @@ -5,6 +5,7 @@ * Generated on: 2021-05-17 19:12:49 */ #include "translateObjects.h" + #include "systemObjectList.h" const char *TEST_TASK_STRING = "TEST_TASK"; diff --git a/bsp_hosted/fsfwconfig/pollingsequence/CMakeLists.txt b/bsp_hosted/fsfwconfig/pollingsequence/CMakeLists.txt index 8dd44c1c..f92d0c32 100644 --- a/bsp_hosted/fsfwconfig/pollingsequence/CMakeLists.txt +++ b/bsp_hosted/fsfwconfig/pollingsequence/CMakeLists.txt @@ -1 +1 @@ -target_sources(${OBSW_NAME} PRIVATE DummyPst.cpp) \ No newline at end of file +target_sources(${OBSW_NAME} PRIVATE DummyPst.cpp) diff --git a/bsp_hosted/fsfwconfig/pollingsequence/DummyPst.cpp b/bsp_hosted/fsfwconfig/pollingsequence/DummyPst.cpp index 354d4dc8..18fca7c6 100644 --- a/bsp_hosted/fsfwconfig/pollingsequence/DummyPst.cpp +++ b/bsp_hosted/fsfwconfig/pollingsequence/DummyPst.cpp @@ -21,106 +21,113 @@ ReturnValue_t dummy_pst::pst(FixedTimeslotTaskIF *thisSequence) { thisSequence->addSlot(objects::RW1, length * 0, DeviceHandlerIF::GET_READ); thisSequence->addSlot(objects::RW2, length * 0, DeviceHandlerIF::PERFORM_OPERATION); - thisSequence->addSlot(objects::RW2, length * 0, DeviceHandlerIF::SEND_WRITE); - thisSequence->addSlot(objects::RW2, length * 0, DeviceHandlerIF::GET_WRITE); - thisSequence->addSlot(objects::RW2, length * 0, DeviceHandlerIF::SEND_READ); - thisSequence->addSlot(objects::RW2, length * 0, DeviceHandlerIF::GET_READ); + thisSequence->addSlot(objects::RW2, length * 0, DeviceHandlerIF::SEND_WRITE); + thisSequence->addSlot(objects::RW2, length * 0, DeviceHandlerIF::GET_WRITE); + thisSequence->addSlot(objects::RW2, length * 0, DeviceHandlerIF::SEND_READ); + thisSequence->addSlot(objects::RW2, length * 0, DeviceHandlerIF::GET_READ); - thisSequence->addSlot(objects::RW3, length * 0, DeviceHandlerIF::PERFORM_OPERATION); - thisSequence->addSlot(objects::RW3, length * 0, DeviceHandlerIF::SEND_WRITE); - thisSequence->addSlot(objects::RW3, length * 0, DeviceHandlerIF::GET_WRITE); - thisSequence->addSlot(objects::RW3, length * 0, DeviceHandlerIF::SEND_READ); - thisSequence->addSlot(objects::RW3, length * 0, DeviceHandlerIF::GET_READ); + thisSequence->addSlot(objects::RW3, length * 0, DeviceHandlerIF::PERFORM_OPERATION); + thisSequence->addSlot(objects::RW3, length * 0, DeviceHandlerIF::SEND_WRITE); + thisSequence->addSlot(objects::RW3, length * 0, DeviceHandlerIF::GET_WRITE); + thisSequence->addSlot(objects::RW3, length * 0, DeviceHandlerIF::SEND_READ); + thisSequence->addSlot(objects::RW3, length * 0, DeviceHandlerIF::GET_READ); - thisSequence->addSlot(objects::RW4, length * 0, DeviceHandlerIF::PERFORM_OPERATION); - thisSequence->addSlot(objects::RW4, length * 0, DeviceHandlerIF::SEND_WRITE); - thisSequence->addSlot(objects::RW4, length * 0, DeviceHandlerIF::GET_WRITE); - thisSequence->addSlot(objects::RW4, length * 0, DeviceHandlerIF::SEND_READ); - thisSequence->addSlot(objects::RW4, length * 0, DeviceHandlerIF::GET_READ); + thisSequence->addSlot(objects::RW4, length * 0, DeviceHandlerIF::PERFORM_OPERATION); + thisSequence->addSlot(objects::RW4, length * 0, DeviceHandlerIF::SEND_WRITE); + thisSequence->addSlot(objects::RW4, length * 0, DeviceHandlerIF::GET_WRITE); + thisSequence->addSlot(objects::RW4, length * 0, DeviceHandlerIF::SEND_READ); + thisSequence->addSlot(objects::RW4, length * 0, DeviceHandlerIF::GET_READ); - thisSequence->addSlot(objects::STAR_TRACKER, length * 0, DeviceHandlerIF::PERFORM_OPERATION); - thisSequence->addSlot(objects::STAR_TRACKER, length * 0, DeviceHandlerIF::SEND_WRITE); - thisSequence->addSlot(objects::STAR_TRACKER, length * 0, DeviceHandlerIF::GET_WRITE); - thisSequence->addSlot(objects::STAR_TRACKER, length * 0, DeviceHandlerIF::SEND_READ); - thisSequence->addSlot(objects::STAR_TRACKER, length * 0, DeviceHandlerIF::GET_READ); + thisSequence->addSlot(objects::STAR_TRACKER, length * 0, DeviceHandlerIF::PERFORM_OPERATION); + thisSequence->addSlot(objects::STAR_TRACKER, length * 0, DeviceHandlerIF::SEND_WRITE); + thisSequence->addSlot(objects::STAR_TRACKER, length * 0, DeviceHandlerIF::GET_WRITE); + thisSequence->addSlot(objects::STAR_TRACKER, length * 0, DeviceHandlerIF::SEND_READ); + thisSequence->addSlot(objects::STAR_TRACKER, length * 0, DeviceHandlerIF::GET_READ); - thisSequence->addSlot(objects::SYRLINKS_HK_HANDLER, length * 0, DeviceHandlerIF::PERFORM_OPERATION); - thisSequence->addSlot(objects::SYRLINKS_HK_HANDLER, length * 0, DeviceHandlerIF::SEND_WRITE); - thisSequence->addSlot(objects::SYRLINKS_HK_HANDLER, length * 0, DeviceHandlerIF::GET_WRITE); - thisSequence->addSlot(objects::SYRLINKS_HK_HANDLER, length * 0, DeviceHandlerIF::SEND_READ); - thisSequence->addSlot(objects::SYRLINKS_HK_HANDLER, length * 0, DeviceHandlerIF::GET_READ); + thisSequence->addSlot(objects::SYRLINKS_HK_HANDLER, length * 0, + DeviceHandlerIF::PERFORM_OPERATION); + thisSequence->addSlot(objects::SYRLINKS_HK_HANDLER, length * 0, DeviceHandlerIF::SEND_WRITE); + thisSequence->addSlot(objects::SYRLINKS_HK_HANDLER, length * 0, DeviceHandlerIF::GET_WRITE); + thisSequence->addSlot(objects::SYRLINKS_HK_HANDLER, length * 0, DeviceHandlerIF::SEND_READ); + thisSequence->addSlot(objects::SYRLINKS_HK_HANDLER, length * 0, DeviceHandlerIF::GET_READ); - thisSequence->addSlot(objects::IMTQ_HANDLER, length * 0, DeviceHandlerIF::PERFORM_OPERATION); - thisSequence->addSlot(objects::IMTQ_HANDLER, length * 0, DeviceHandlerIF::SEND_WRITE); - thisSequence->addSlot(objects::IMTQ_HANDLER, length * 0, DeviceHandlerIF::GET_WRITE); - thisSequence->addSlot(objects::IMTQ_HANDLER, length * 0, DeviceHandlerIF::SEND_READ); - thisSequence->addSlot(objects::IMTQ_HANDLER, length * 0, DeviceHandlerIF::GET_READ); + thisSequence->addSlot(objects::IMTQ_HANDLER, length * 0, DeviceHandlerIF::PERFORM_OPERATION); + thisSequence->addSlot(objects::IMTQ_HANDLER, length * 0, DeviceHandlerIF::SEND_WRITE); + thisSequence->addSlot(objects::IMTQ_HANDLER, length * 0, DeviceHandlerIF::GET_WRITE); + thisSequence->addSlot(objects::IMTQ_HANDLER, length * 0, DeviceHandlerIF::SEND_READ); + thisSequence->addSlot(objects::IMTQ_HANDLER, length * 0, DeviceHandlerIF::GET_READ); - thisSequence->addSlot(objects::ACU_HANDLER, length * 0, DeviceHandlerIF::PERFORM_OPERATION); - thisSequence->addSlot(objects::ACU_HANDLER, length * 0, DeviceHandlerIF::SEND_WRITE); - thisSequence->addSlot(objects::ACU_HANDLER, length * 0, DeviceHandlerIF::GET_WRITE); - thisSequence->addSlot(objects::ACU_HANDLER, length * 0, DeviceHandlerIF::SEND_READ); - thisSequence->addSlot(objects::ACU_HANDLER, length * 0, DeviceHandlerIF::GET_READ); + thisSequence->addSlot(objects::ACU_HANDLER, length * 0, DeviceHandlerIF::PERFORM_OPERATION); + thisSequence->addSlot(objects::ACU_HANDLER, length * 0, DeviceHandlerIF::SEND_WRITE); + thisSequence->addSlot(objects::ACU_HANDLER, length * 0, DeviceHandlerIF::GET_WRITE); + thisSequence->addSlot(objects::ACU_HANDLER, length * 0, DeviceHandlerIF::SEND_READ); + thisSequence->addSlot(objects::ACU_HANDLER, length * 0, DeviceHandlerIF::GET_READ); - thisSequence->addSlot(objects::PDU1_HANDLER, length * 0, DeviceHandlerIF::PERFORM_OPERATION); - thisSequence->addSlot(objects::PDU1_HANDLER, length * 0, DeviceHandlerIF::SEND_WRITE); - thisSequence->addSlot(objects::PDU1_HANDLER, length * 0, DeviceHandlerIF::GET_WRITE); - thisSequence->addSlot(objects::PDU1_HANDLER, length * 0, DeviceHandlerIF::SEND_READ); - thisSequence->addSlot(objects::PDU1_HANDLER, length * 0, DeviceHandlerIF::GET_READ); + thisSequence->addSlot(objects::PDU1_HANDLER, length * 0, DeviceHandlerIF::PERFORM_OPERATION); + thisSequence->addSlot(objects::PDU1_HANDLER, length * 0, DeviceHandlerIF::SEND_WRITE); + thisSequence->addSlot(objects::PDU1_HANDLER, length * 0, DeviceHandlerIF::GET_WRITE); + thisSequence->addSlot(objects::PDU1_HANDLER, length * 0, DeviceHandlerIF::SEND_READ); + thisSequence->addSlot(objects::PDU1_HANDLER, length * 0, DeviceHandlerIF::GET_READ); - thisSequence->addSlot(objects::PDU2_HANDLER, length * 0, DeviceHandlerIF::PERFORM_OPERATION); - thisSequence->addSlot(objects::PDU2_HANDLER, length * 0, DeviceHandlerIF::SEND_WRITE); - thisSequence->addSlot(objects::PDU2_HANDLER, length * 0, DeviceHandlerIF::GET_WRITE); - thisSequence->addSlot(objects::PDU2_HANDLER, length * 0, DeviceHandlerIF::SEND_READ); - thisSequence->addSlot(objects::PDU2_HANDLER, length * 0, DeviceHandlerIF::GET_READ); + thisSequence->addSlot(objects::PDU2_HANDLER, length * 0, DeviceHandlerIF::PERFORM_OPERATION); + thisSequence->addSlot(objects::PDU2_HANDLER, length * 0, DeviceHandlerIF::SEND_WRITE); + thisSequence->addSlot(objects::PDU2_HANDLER, length * 0, DeviceHandlerIF::GET_WRITE); + thisSequence->addSlot(objects::PDU2_HANDLER, length * 0, DeviceHandlerIF::SEND_READ); + thisSequence->addSlot(objects::PDU2_HANDLER, length * 0, DeviceHandlerIF::GET_READ); - thisSequence->addSlot(objects::P60DOCK_HANDLER, length * 0, DeviceHandlerIF::PERFORM_OPERATION); - thisSequence->addSlot(objects::P60DOCK_HANDLER, length * 0, DeviceHandlerIF::SEND_WRITE); - thisSequence->addSlot(objects::P60DOCK_HANDLER, length * 0, DeviceHandlerIF::GET_WRITE); - thisSequence->addSlot(objects::P60DOCK_HANDLER, length * 0, DeviceHandlerIF::SEND_READ); - thisSequence->addSlot(objects::P60DOCK_HANDLER, length * 0, DeviceHandlerIF::GET_READ); + thisSequence->addSlot(objects::P60DOCK_HANDLER, length * 0, DeviceHandlerIF::PERFORM_OPERATION); + thisSequence->addSlot(objects::P60DOCK_HANDLER, length * 0, DeviceHandlerIF::SEND_WRITE); + thisSequence->addSlot(objects::P60DOCK_HANDLER, length * 0, DeviceHandlerIF::GET_WRITE); + thisSequence->addSlot(objects::P60DOCK_HANDLER, length * 0, DeviceHandlerIF::SEND_READ); + thisSequence->addSlot(objects::P60DOCK_HANDLER, length * 0, DeviceHandlerIF::GET_READ); - thisSequence->addSlot(objects::GYRO_0_ADIS_HANDLER, length * 0, DeviceHandlerIF::PERFORM_OPERATION); - thisSequence->addSlot(objects::GYRO_0_ADIS_HANDLER, length * 0, DeviceHandlerIF::SEND_WRITE); - thisSequence->addSlot(objects::GYRO_0_ADIS_HANDLER, length * 0, DeviceHandlerIF::GET_WRITE); - thisSequence->addSlot(objects::GYRO_0_ADIS_HANDLER, length * 0, DeviceHandlerIF::SEND_READ); - thisSequence->addSlot(objects::GYRO_0_ADIS_HANDLER, length * 0, DeviceHandlerIF::GET_READ); + thisSequence->addSlot(objects::GYRO_0_ADIS_HANDLER, length * 0, + DeviceHandlerIF::PERFORM_OPERATION); + thisSequence->addSlot(objects::GYRO_0_ADIS_HANDLER, length * 0, DeviceHandlerIF::SEND_WRITE); + thisSequence->addSlot(objects::GYRO_0_ADIS_HANDLER, length * 0, DeviceHandlerIF::GET_WRITE); + thisSequence->addSlot(objects::GYRO_0_ADIS_HANDLER, length * 0, DeviceHandlerIF::SEND_READ); + thisSequence->addSlot(objects::GYRO_0_ADIS_HANDLER, length * 0, DeviceHandlerIF::GET_READ); - thisSequence->addSlot(objects::GYRO_1_L3G_HANDLER, length * 0, DeviceHandlerIF::PERFORM_OPERATION); - thisSequence->addSlot(objects::GYRO_1_L3G_HANDLER, length * 0, DeviceHandlerIF::SEND_WRITE); - thisSequence->addSlot(objects::GYRO_1_L3G_HANDLER, length * 0, DeviceHandlerIF::GET_WRITE); - thisSequence->addSlot(objects::GYRO_1_L3G_HANDLER, length * 0, DeviceHandlerIF::SEND_READ); - thisSequence->addSlot(objects::GYRO_1_L3G_HANDLER, length * 0, DeviceHandlerIF::GET_READ); + thisSequence->addSlot(objects::GYRO_1_L3G_HANDLER, length * 0, + DeviceHandlerIF::PERFORM_OPERATION); + thisSequence->addSlot(objects::GYRO_1_L3G_HANDLER, length * 0, DeviceHandlerIF::SEND_WRITE); + thisSequence->addSlot(objects::GYRO_1_L3G_HANDLER, length * 0, DeviceHandlerIF::GET_WRITE); + thisSequence->addSlot(objects::GYRO_1_L3G_HANDLER, length * 0, DeviceHandlerIF::SEND_READ); + thisSequence->addSlot(objects::GYRO_1_L3G_HANDLER, length * 0, DeviceHandlerIF::GET_READ); - thisSequence->addSlot(objects::GYRO_2_ADIS_HANDLER, length * 0, DeviceHandlerIF::PERFORM_OPERATION); - thisSequence->addSlot(objects::GYRO_2_ADIS_HANDLER, length * 0, DeviceHandlerIF::SEND_WRITE); - thisSequence->addSlot(objects::GYRO_2_ADIS_HANDLER, length * 0, DeviceHandlerIF::GET_WRITE); - thisSequence->addSlot(objects::GYRO_2_ADIS_HANDLER, length * 0, DeviceHandlerIF::SEND_READ); - thisSequence->addSlot(objects::GYRO_2_ADIS_HANDLER, length * 0, DeviceHandlerIF::GET_READ); + thisSequence->addSlot(objects::GYRO_2_ADIS_HANDLER, length * 0, + DeviceHandlerIF::PERFORM_OPERATION); + thisSequence->addSlot(objects::GYRO_2_ADIS_HANDLER, length * 0, DeviceHandlerIF::SEND_WRITE); + thisSequence->addSlot(objects::GYRO_2_ADIS_HANDLER, length * 0, DeviceHandlerIF::GET_WRITE); + thisSequence->addSlot(objects::GYRO_2_ADIS_HANDLER, length * 0, DeviceHandlerIF::SEND_READ); + thisSequence->addSlot(objects::GYRO_2_ADIS_HANDLER, length * 0, DeviceHandlerIF::GET_READ); - thisSequence->addSlot(objects::GYRO_3_L3G_HANDLER, length * 0, DeviceHandlerIF::PERFORM_OPERATION); - thisSequence->addSlot(objects::GYRO_3_L3G_HANDLER, length * 0, DeviceHandlerIF::SEND_WRITE); - thisSequence->addSlot(objects::GYRO_3_L3G_HANDLER, length * 0, DeviceHandlerIF::GET_WRITE); - thisSequence->addSlot(objects::GYRO_3_L3G_HANDLER, length * 0, DeviceHandlerIF::SEND_READ); - thisSequence->addSlot(objects::GYRO_3_L3G_HANDLER, length * 0, DeviceHandlerIF::GET_READ); + thisSequence->addSlot(objects::GYRO_3_L3G_HANDLER, length * 0, + DeviceHandlerIF::PERFORM_OPERATION); + thisSequence->addSlot(objects::GYRO_3_L3G_HANDLER, length * 0, DeviceHandlerIF::SEND_WRITE); + thisSequence->addSlot(objects::GYRO_3_L3G_HANDLER, length * 0, DeviceHandlerIF::GET_WRITE); + thisSequence->addSlot(objects::GYRO_3_L3G_HANDLER, length * 0, DeviceHandlerIF::SEND_READ); + thisSequence->addSlot(objects::GYRO_3_L3G_HANDLER, length * 0, DeviceHandlerIF::GET_READ); - thisSequence->addSlot(objects::MGM_0_LIS3_HANDLER, length * 0, DeviceHandlerIF::PERFORM_OPERATION); - thisSequence->addSlot(objects::MGM_0_LIS3_HANDLER, length * 0, DeviceHandlerIF::SEND_WRITE); - thisSequence->addSlot(objects::MGM_0_LIS3_HANDLER, length * 0, DeviceHandlerIF::GET_WRITE); - thisSequence->addSlot(objects::MGM_0_LIS3_HANDLER, length * 0, DeviceHandlerIF::SEND_READ); - thisSequence->addSlot(objects::MGM_0_LIS3_HANDLER, length * 0, DeviceHandlerIF::GET_READ); + thisSequence->addSlot(objects::MGM_0_LIS3_HANDLER, length * 0, + DeviceHandlerIF::PERFORM_OPERATION); + thisSequence->addSlot(objects::MGM_0_LIS3_HANDLER, length * 0, DeviceHandlerIF::SEND_WRITE); + thisSequence->addSlot(objects::MGM_0_LIS3_HANDLER, length * 0, DeviceHandlerIF::GET_WRITE); + thisSequence->addSlot(objects::MGM_0_LIS3_HANDLER, length * 0, DeviceHandlerIF::SEND_READ); + thisSequence->addSlot(objects::MGM_0_LIS3_HANDLER, length * 0, DeviceHandlerIF::GET_READ); - thisSequence->addSlot(objects::MGM_2_LIS3_HANDLER, length * 0, DeviceHandlerIF::PERFORM_OPERATION); - thisSequence->addSlot(objects::MGM_2_LIS3_HANDLER, length * 0, DeviceHandlerIF::SEND_WRITE); - thisSequence->addSlot(objects::MGM_2_LIS3_HANDLER, length * 0, DeviceHandlerIF::GET_WRITE); - thisSequence->addSlot(objects::MGM_2_LIS3_HANDLER, length * 0, DeviceHandlerIF::SEND_READ); - thisSequence->addSlot(objects::MGM_2_LIS3_HANDLER, length * 0, DeviceHandlerIF::GET_READ); + thisSequence->addSlot(objects::MGM_2_LIS3_HANDLER, length * 0, + DeviceHandlerIF::PERFORM_OPERATION); + thisSequence->addSlot(objects::MGM_2_LIS3_HANDLER, length * 0, DeviceHandlerIF::SEND_WRITE); + thisSequence->addSlot(objects::MGM_2_LIS3_HANDLER, length * 0, DeviceHandlerIF::GET_WRITE); + thisSequence->addSlot(objects::MGM_2_LIS3_HANDLER, length * 0, DeviceHandlerIF::SEND_READ); + thisSequence->addSlot(objects::MGM_2_LIS3_HANDLER, length * 0, DeviceHandlerIF::GET_READ); - thisSequence->addSlot(objects::PLPCDU_HANDLER, length * 0, DeviceHandlerIF::PERFORM_OPERATION); - thisSequence->addSlot(objects::PLPCDU_HANDLER, length * 0, DeviceHandlerIF::SEND_WRITE); - thisSequence->addSlot(objects::PLPCDU_HANDLER, length * 0, DeviceHandlerIF::GET_WRITE); - thisSequence->addSlot(objects::PLPCDU_HANDLER, length * 0, DeviceHandlerIF::SEND_READ); - thisSequence->addSlot(objects::PLPCDU_HANDLER, length * 0, DeviceHandlerIF::GET_READ); + thisSequence->addSlot(objects::PLPCDU_HANDLER, length * 0, DeviceHandlerIF::PERFORM_OPERATION); + thisSequence->addSlot(objects::PLPCDU_HANDLER, length * 0, DeviceHandlerIF::SEND_WRITE); + thisSequence->addSlot(objects::PLPCDU_HANDLER, length * 0, DeviceHandlerIF::GET_WRITE); + thisSequence->addSlot(objects::PLPCDU_HANDLER, length * 0, DeviceHandlerIF::SEND_READ); + thisSequence->addSlot(objects::PLPCDU_HANDLER, length * 0, DeviceHandlerIF::GET_READ); if (thisSequence->checkSequence() == HasReturnvaluesIF::RETURN_OK) { return HasReturnvaluesIF::RETURN_OK; diff --git a/bsp_q7s/core/ObjectFactory.cpp b/bsp_q7s/core/ObjectFactory.cpp index fffc19dc..35be632c 100644 --- a/bsp_q7s/core/ObjectFactory.cpp +++ b/bsp_q7s/core/ObjectFactory.cpp @@ -107,7 +107,7 @@ void Factory::setStaticFrameworkObjectIds() { DeviceHandlerBase::powerSwitcherId = objects::PCDU_HANDLER; #endif /* OBSW_Q7S_EM == 1 */ - #if OBSW_TM_TO_PTME == 1 +#if OBSW_TM_TO_PTME == 1 TmFunnel::downlinkDestination = objects::CCSDS_HANDLER; #else TmFunnel::downlinkDestination = objects::TMTC_BRIDGE; diff --git a/dummies/AcuDummy.cpp b/dummies/AcuDummy.cpp index e882139e..dc0c974d 100644 --- a/dummies/AcuDummy.cpp +++ b/dummies/AcuDummy.cpp @@ -1,4 +1,5 @@ #include "AcuDummy.h" + #include AcuDummy::AcuDummy(object_id_t objectId, object_id_t comif, CookieIF *comCookie) @@ -10,22 +11,19 @@ void AcuDummy::doStartUp() {} void AcuDummy::doShutDown() {} -ReturnValue_t AcuDummy::buildNormalDeviceCommand(DeviceCommandId_t *id) { - return NOTHING_TO_SEND; -} +ReturnValue_t AcuDummy::buildNormalDeviceCommand(DeviceCommandId_t *id) { return NOTHING_TO_SEND; } ReturnValue_t AcuDummy::buildTransitionDeviceCommand(DeviceCommandId_t *id) { return NOTHING_TO_SEND; } ReturnValue_t AcuDummy::buildCommandFromCommand(DeviceCommandId_t deviceCommand, - const uint8_t *commandData, - size_t commandDataLen) { + const uint8_t *commandData, size_t commandDataLen) { return RETURN_OK; } -ReturnValue_t AcuDummy::scanForReply(const uint8_t *start, size_t len, - DeviceCommandId_t *foundId, size_t *foundLen) { +ReturnValue_t AcuDummy::scanForReply(const uint8_t *start, size_t len, DeviceCommandId_t *foundId, + size_t *foundLen) { return RETURN_OK; } @@ -33,13 +31,12 @@ ReturnValue_t AcuDummy::interpretDeviceReply(DeviceCommandId_t id, const uint8_t return RETURN_OK; } -void AcuDummy::fillCommandAndReplyMap() { -} +void AcuDummy::fillCommandAndReplyMap() {} uint32_t AcuDummy::getTransitionDelayMs(Mode_t modeFrom, Mode_t modeTo) { return 500; } -ReturnValue_t AcuDummy::initializeLocalDataPool(localpool::DataPool& localDataPoolMap, - LocalDataPoolManager& poolManager) { - localDataPoolMap.emplace(P60System::pool::ACU_TEMPERATURES, new PoolEntry(3)); +ReturnValue_t AcuDummy::initializeLocalDataPool(localpool::DataPool &localDataPoolMap, + LocalDataPoolManager &poolManager) { + localDataPoolMap.emplace(P60System::pool::ACU_TEMPERATURES, new PoolEntry(3)); return HasReturnvaluesIF::RETURN_OK; } diff --git a/dummies/BpxDummy.cpp b/dummies/BpxDummy.cpp index 6647f5cd..974a6a30 100644 --- a/dummies/BpxDummy.cpp +++ b/dummies/BpxDummy.cpp @@ -1,4 +1,5 @@ #include "BpxDummy.h" + #include BpxDummy::BpxDummy(object_id_t objectId, object_id_t comif, CookieIF *comCookie) @@ -10,22 +11,19 @@ void BpxDummy::doStartUp() {} void BpxDummy::doShutDown() {} -ReturnValue_t BpxDummy::buildNormalDeviceCommand(DeviceCommandId_t *id) { - return NOTHING_TO_SEND; -} +ReturnValue_t BpxDummy::buildNormalDeviceCommand(DeviceCommandId_t *id) { return NOTHING_TO_SEND; } ReturnValue_t BpxDummy::buildTransitionDeviceCommand(DeviceCommandId_t *id) { return NOTHING_TO_SEND; } ReturnValue_t BpxDummy::buildCommandFromCommand(DeviceCommandId_t deviceCommand, - const uint8_t *commandData, - size_t commandDataLen) { + const uint8_t *commandData, size_t commandDataLen) { return RETURN_OK; } -ReturnValue_t BpxDummy::scanForReply(const uint8_t *start, size_t len, - DeviceCommandId_t *foundId, size_t *foundLen) { +ReturnValue_t BpxDummy::scanForReply(const uint8_t *start, size_t len, DeviceCommandId_t *foundId, + size_t *foundLen) { return RETURN_OK; } @@ -33,13 +31,12 @@ ReturnValue_t BpxDummy::interpretDeviceReply(DeviceCommandId_t id, const uint8_t return RETURN_OK; } -void BpxDummy::fillCommandAndReplyMap() { -} +void BpxDummy::fillCommandAndReplyMap() {} uint32_t BpxDummy::getTransitionDelayMs(Mode_t modeFrom, Mode_t modeTo) { return 500; } -ReturnValue_t BpxDummy::initializeLocalDataPool(localpool::DataPool& localDataPoolMap, - LocalDataPoolManager& poolManager) { +ReturnValue_t BpxDummy::initializeLocalDataPool(localpool::DataPool &localDataPoolMap, + LocalDataPoolManager &poolManager) { localDataPoolMap.emplace(BpxBattery::BATT_TEMP_1, &battTemp1); localDataPoolMap.emplace(BpxBattery::BATT_TEMP_2, &battTemp2); localDataPoolMap.emplace(BpxBattery::BATT_TEMP_3, &battTemp3); diff --git a/dummies/CMakeLists.txt b/dummies/CMakeLists.txt index 930d6e89..d855b155 100644 --- a/dummies/CMakeLists.txt +++ b/dummies/CMakeLists.txt @@ -1,19 +1,19 @@ -target_sources(${LIB_DUMMIES} PUBLIC -TemperatureSensorsDummy.cpp -SusDummy.cpp -BpxDummy.cpp -ComIFDummy.cpp -ComCookieDummy.cpp -RwDummy.cpp -StarTrackerDummy.cpp -SyrlinksDummy.cpp -ImtqDummy.cpp -AcuDummy.cpp -PduDummy.cpp -P60DockDummy.cpp -GyroAdisDummy.cpp -GyroL3GD20Dummy.cpp -MgmLIS3MDLDummy.cpp -PlPcduDummy.cpp -CoreControllerDummy.cpp -) +target_sources( + ${LIB_DUMMIES} + PUBLIC TemperatureSensorsDummy.cpp + SusDummy.cpp + BpxDummy.cpp + ComIFDummy.cpp + ComCookieDummy.cpp + RwDummy.cpp + StarTrackerDummy.cpp + SyrlinksDummy.cpp + ImtqDummy.cpp + AcuDummy.cpp + PduDummy.cpp + P60DockDummy.cpp + GyroAdisDummy.cpp + GyroL3GD20Dummy.cpp + MgmLIS3MDLDummy.cpp + PlPcduDummy.cpp + CoreControllerDummy.cpp) diff --git a/dummies/ComIFDummy.h b/dummies/ComIFDummy.h index 72089f3a..499c2c48 100644 --- a/dummies/ComIFDummy.h +++ b/dummies/ComIFDummy.h @@ -11,7 +11,6 @@ */ class ComIFDummy : public DeviceCommunicationIF, public SystemObject { public: - ComIFDummy(object_id_t objectId); virtual ~ComIFDummy(); diff --git a/dummies/CoreControllerDummy.cpp b/dummies/CoreControllerDummy.cpp index f9462e93..b8aa270c 100644 --- a/dummies/CoreControllerDummy.cpp +++ b/dummies/CoreControllerDummy.cpp @@ -1,14 +1,13 @@ #include "CoreControllerDummy.h" -#include #include +#include #include #include CoreControllerDummy::CoreControllerDummy(object_id_t objectId) - : ExtendedControllerBase(objectId, objects::NO_OBJECT) { -} + : ExtendedControllerBase(objectId, objects::NO_OBJECT) {} ReturnValue_t CoreControllerDummy::initialize() { static bool done = false; @@ -27,12 +26,10 @@ ReturnValue_t CoreControllerDummy::handleCommandMessage(CommandMessage* message) return RETURN_FAILED; } -void CoreControllerDummy::performControlOperation() { - return; -} +void CoreControllerDummy::performControlOperation() { return; } -ReturnValue_t CoreControllerDummy::initializeLocalDataPool(localpool::DataPool &localDataPoolMap, - LocalDataPoolManager &poolManager) { +ReturnValue_t CoreControllerDummy::initializeLocalDataPool(localpool::DataPool& localDataPoolMap, + LocalDataPoolManager& poolManager) { localDataPoolMap.emplace(core::TEMPERATURE, new PoolEntry({0})); localDataPoolMap.emplace(core::PS_VOLTAGE, new PoolEntry({0})); localDataPoolMap.emplace(core::PL_VOLTAGE, new PoolEntry({0})); @@ -47,7 +44,7 @@ LocalPoolDataSetBase* CoreControllerDummy::getDataSetHandle(sid_t sid) { } ReturnValue_t CoreControllerDummy::checkModeCommand(Mode_t mode, Submode_t submode, - uint32_t* msToReachTheMode) { + uint32_t* msToReachTheMode) { if (submode != SUBMODE_NONE) { return INVALID_SUBMODE; } diff --git a/dummies/GyroAdisDummy.cpp b/dummies/GyroAdisDummy.cpp index 43136bf2..6b760e79 100644 --- a/dummies/GyroAdisDummy.cpp +++ b/dummies/GyroAdisDummy.cpp @@ -11,19 +11,22 @@ void GyroAdisDummy::doStartUp() {} void GyroAdisDummy::doShutDown() {} -ReturnValue_t GyroAdisDummy::buildNormalDeviceCommand(DeviceCommandId_t *id) { return NOTHING_TO_SEND; } +ReturnValue_t GyroAdisDummy::buildNormalDeviceCommand(DeviceCommandId_t *id) { + return NOTHING_TO_SEND; +} ReturnValue_t GyroAdisDummy::buildTransitionDeviceCommand(DeviceCommandId_t *id) { return NOTHING_TO_SEND; } ReturnValue_t GyroAdisDummy::buildCommandFromCommand(DeviceCommandId_t deviceCommand, - const uint8_t *commandData, size_t commandDataLen) { + const uint8_t *commandData, + size_t commandDataLen) { return RETURN_OK; } -ReturnValue_t GyroAdisDummy::scanForReply(const uint8_t *start, size_t len, DeviceCommandId_t *foundId, - size_t *foundLen) { +ReturnValue_t GyroAdisDummy::scanForReply(const uint8_t *start, size_t len, + DeviceCommandId_t *foundId, size_t *foundLen) { return RETURN_OK; } @@ -36,7 +39,7 @@ void GyroAdisDummy::fillCommandAndReplyMap() {} uint32_t GyroAdisDummy::getTransitionDelayMs(Mode_t modeFrom, Mode_t modeTo) { return 500; } ReturnValue_t GyroAdisDummy::initializeLocalDataPool(localpool::DataPool &localDataPoolMap, - LocalDataPoolManager &poolManager) { - localDataPoolMap.emplace(ADIS1650X::TEMPERATURE, new PoolEntry({0.0})); - return HasReturnvaluesIF::RETURN_OK; + LocalDataPoolManager &poolManager) { + localDataPoolMap.emplace(ADIS1650X::TEMPERATURE, new PoolEntry({0.0})); + return HasReturnvaluesIF::RETURN_OK; } diff --git a/dummies/GyroL3GD20Dummy.cpp b/dummies/GyroL3GD20Dummy.cpp index af36ac74..7023870f 100644 --- a/dummies/GyroL3GD20Dummy.cpp +++ b/dummies/GyroL3GD20Dummy.cpp @@ -11,19 +11,22 @@ void GyroL3GD20Dummy::doStartUp() {} void GyroL3GD20Dummy::doShutDown() {} -ReturnValue_t GyroL3GD20Dummy::buildNormalDeviceCommand(DeviceCommandId_t *id) { return NOTHING_TO_SEND; } +ReturnValue_t GyroL3GD20Dummy::buildNormalDeviceCommand(DeviceCommandId_t *id) { + return NOTHING_TO_SEND; +} ReturnValue_t GyroL3GD20Dummy::buildTransitionDeviceCommand(DeviceCommandId_t *id) { return NOTHING_TO_SEND; } ReturnValue_t GyroL3GD20Dummy::buildCommandFromCommand(DeviceCommandId_t deviceCommand, - const uint8_t *commandData, size_t commandDataLen) { + const uint8_t *commandData, + size_t commandDataLen) { return RETURN_OK; } -ReturnValue_t GyroL3GD20Dummy::scanForReply(const uint8_t *start, size_t len, DeviceCommandId_t *foundId, - size_t *foundLen) { +ReturnValue_t GyroL3GD20Dummy::scanForReply(const uint8_t *start, size_t len, + DeviceCommandId_t *foundId, size_t *foundLen) { return RETURN_OK; } @@ -36,10 +39,10 @@ void GyroL3GD20Dummy::fillCommandAndReplyMap() {} uint32_t GyroL3GD20Dummy::getTransitionDelayMs(Mode_t modeFrom, Mode_t modeTo) { return 500; } ReturnValue_t GyroL3GD20Dummy::initializeLocalDataPool(localpool::DataPool &localDataPoolMap, - LocalDataPoolManager &poolManager) { - localDataPoolMap.emplace(L3GD20H::ANG_VELOC_X, new PoolEntry({0.0})); - localDataPoolMap.emplace(L3GD20H::ANG_VELOC_Y, new PoolEntry({0.0})); - localDataPoolMap.emplace(L3GD20H::ANG_VELOC_Z, new PoolEntry({0.0})); - localDataPoolMap.emplace(L3GD20H::TEMPERATURE, new PoolEntry({0.0})); - return HasReturnvaluesIF::RETURN_OK; + LocalDataPoolManager &poolManager) { + localDataPoolMap.emplace(L3GD20H::ANG_VELOC_X, new PoolEntry({0.0})); + localDataPoolMap.emplace(L3GD20H::ANG_VELOC_Y, new PoolEntry({0.0})); + localDataPoolMap.emplace(L3GD20H::ANG_VELOC_Z, new PoolEntry({0.0})); + localDataPoolMap.emplace(L3GD20H::TEMPERATURE, new PoolEntry({0.0})); + return HasReturnvaluesIF::RETURN_OK; } diff --git a/dummies/ImtqDummy.cpp b/dummies/ImtqDummy.cpp index ae9a072a..0af9ef83 100644 --- a/dummies/ImtqDummy.cpp +++ b/dummies/ImtqDummy.cpp @@ -1,4 +1,5 @@ #include "ImtqDummy.h" + #include ImtqDummy::ImtqDummy(object_id_t objectId, object_id_t comif, CookieIF *comCookie) @@ -10,22 +11,20 @@ void ImtqDummy::doStartUp() {} void ImtqDummy::doShutDown() {} -ReturnValue_t ImtqDummy::buildNormalDeviceCommand(DeviceCommandId_t *id) { - return NOTHING_TO_SEND; -} +ReturnValue_t ImtqDummy::buildNormalDeviceCommand(DeviceCommandId_t *id) { return NOTHING_TO_SEND; } ReturnValue_t ImtqDummy::buildTransitionDeviceCommand(DeviceCommandId_t *id) { return NOTHING_TO_SEND; } ReturnValue_t ImtqDummy::buildCommandFromCommand(DeviceCommandId_t deviceCommand, - const uint8_t *commandData, - size_t commandDataLen) { + const uint8_t *commandData, + size_t commandDataLen) { return RETURN_OK; } -ReturnValue_t ImtqDummy::scanForReply(const uint8_t *start, size_t len, - DeviceCommandId_t *foundId, size_t *foundLen) { +ReturnValue_t ImtqDummy::scanForReply(const uint8_t *start, size_t len, DeviceCommandId_t *foundId, + size_t *foundLen) { return RETURN_OK; } @@ -33,13 +32,12 @@ ReturnValue_t ImtqDummy::interpretDeviceReply(DeviceCommandId_t id, const uint8_ return RETURN_OK; } -void ImtqDummy::fillCommandAndReplyMap() { -} +void ImtqDummy::fillCommandAndReplyMap() {} uint32_t ImtqDummy::getTransitionDelayMs(Mode_t modeFrom, Mode_t modeTo) { return 500; } -ReturnValue_t ImtqDummy::initializeLocalDataPool(localpool::DataPool& localDataPoolMap, - LocalDataPoolManager& poolManager) { - localDataPoolMap.emplace(IMTQ::MCU_TEMPERATURE, new PoolEntry({0})); +ReturnValue_t ImtqDummy::initializeLocalDataPool(localpool::DataPool &localDataPoolMap, + LocalDataPoolManager &poolManager) { + localDataPoolMap.emplace(IMTQ::MCU_TEMPERATURE, new PoolEntry({0})); return HasReturnvaluesIF::RETURN_OK; } diff --git a/dummies/MgmLIS3MDLDummy.cpp b/dummies/MgmLIS3MDLDummy.cpp index b3794471..0fb0edba 100644 --- a/dummies/MgmLIS3MDLDummy.cpp +++ b/dummies/MgmLIS3MDLDummy.cpp @@ -11,19 +11,22 @@ void MgmLIS3MDLDummy::doStartUp() {} void MgmLIS3MDLDummy::doShutDown() {} -ReturnValue_t MgmLIS3MDLDummy::buildNormalDeviceCommand(DeviceCommandId_t *id) { return NOTHING_TO_SEND; } +ReturnValue_t MgmLIS3MDLDummy::buildNormalDeviceCommand(DeviceCommandId_t *id) { + return NOTHING_TO_SEND; +} ReturnValue_t MgmLIS3MDLDummy::buildTransitionDeviceCommand(DeviceCommandId_t *id) { return NOTHING_TO_SEND; } ReturnValue_t MgmLIS3MDLDummy::buildCommandFromCommand(DeviceCommandId_t deviceCommand, - const uint8_t *commandData, size_t commandDataLen) { + const uint8_t *commandData, + size_t commandDataLen) { return RETURN_OK; } -ReturnValue_t MgmLIS3MDLDummy::scanForReply(const uint8_t *start, size_t len, DeviceCommandId_t *foundId, - size_t *foundLen) { +ReturnValue_t MgmLIS3MDLDummy::scanForReply(const uint8_t *start, size_t len, + DeviceCommandId_t *foundId, size_t *foundLen) { return RETURN_OK; } @@ -36,7 +39,7 @@ void MgmLIS3MDLDummy::fillCommandAndReplyMap() {} uint32_t MgmLIS3MDLDummy::getTransitionDelayMs(Mode_t modeFrom, Mode_t modeTo) { return 500; } ReturnValue_t MgmLIS3MDLDummy::initializeLocalDataPool(localpool::DataPool &localDataPoolMap, - LocalDataPoolManager &poolManager) { - localDataPoolMap.emplace(MGMLIS3MDL::TEMPERATURE_CELCIUS, new PoolEntry({0.0})); - return HasReturnvaluesIF::RETURN_OK; + LocalDataPoolManager &poolManager) { + localDataPoolMap.emplace(MGMLIS3MDL::TEMPERATURE_CELCIUS, new PoolEntry({0.0})); + return HasReturnvaluesIF::RETURN_OK; } diff --git a/dummies/P60DockDummy.cpp b/dummies/P60DockDummy.cpp index def20d7e..04f5e5af 100644 --- a/dummies/P60DockDummy.cpp +++ b/dummies/P60DockDummy.cpp @@ -11,19 +11,22 @@ void P60DockDummy::doStartUp() {} void P60DockDummy::doShutDown() {} -ReturnValue_t P60DockDummy::buildNormalDeviceCommand(DeviceCommandId_t *id) { return NOTHING_TO_SEND; } +ReturnValue_t P60DockDummy::buildNormalDeviceCommand(DeviceCommandId_t *id) { + return NOTHING_TO_SEND; +} ReturnValue_t P60DockDummy::buildTransitionDeviceCommand(DeviceCommandId_t *id) { return NOTHING_TO_SEND; } ReturnValue_t P60DockDummy::buildCommandFromCommand(DeviceCommandId_t deviceCommand, - const uint8_t *commandData, size_t commandDataLen) { + const uint8_t *commandData, + size_t commandDataLen) { return RETURN_OK; } -ReturnValue_t P60DockDummy::scanForReply(const uint8_t *start, size_t len, DeviceCommandId_t *foundId, - size_t *foundLen) { +ReturnValue_t P60DockDummy::scanForReply(const uint8_t *start, size_t len, + DeviceCommandId_t *foundId, size_t *foundLen) { return RETURN_OK; } @@ -36,8 +39,8 @@ void P60DockDummy::fillCommandAndReplyMap() {} uint32_t P60DockDummy::getTransitionDelayMs(Mode_t modeFrom, Mode_t modeTo) { return 500; } ReturnValue_t P60DockDummy::initializeLocalDataPool(localpool::DataPool &localDataPoolMap, - LocalDataPoolManager &poolManager) { - localDataPoolMap.emplace(P60System::pool::P60DOCK_TEMPERATURE_1, new PoolEntry({0})); - localDataPoolMap.emplace(P60System::pool::P60DOCK_TEMPERATURE_2, new PoolEntry({0})); + LocalDataPoolManager &poolManager) { + localDataPoolMap.emplace(P60System::pool::P60DOCK_TEMPERATURE_1, new PoolEntry({0})); + localDataPoolMap.emplace(P60System::pool::P60DOCK_TEMPERATURE_2, new PoolEntry({0})); return HasReturnvaluesIF::RETURN_OK; } diff --git a/dummies/PlPcduDummy.cpp b/dummies/PlPcduDummy.cpp index 403b8e06..75f98825 100644 --- a/dummies/PlPcduDummy.cpp +++ b/dummies/PlPcduDummy.cpp @@ -1,4 +1,5 @@ #include "PlPcduDummy.h" + #include PlPcduDummy::PlPcduDummy(object_id_t objectId, object_id_t comif, CookieIF *comCookie) @@ -19,13 +20,13 @@ ReturnValue_t PlPcduDummy::buildTransitionDeviceCommand(DeviceCommandId_t *id) { } ReturnValue_t PlPcduDummy::buildCommandFromCommand(DeviceCommandId_t deviceCommand, - const uint8_t *commandData, - size_t commandDataLen) { + const uint8_t *commandData, + size_t commandDataLen) { return RETURN_OK; } ReturnValue_t PlPcduDummy::scanForReply(const uint8_t *start, size_t len, - DeviceCommandId_t *foundId, size_t *foundLen) { + DeviceCommandId_t *foundId, size_t *foundLen) { return RETURN_OK; } @@ -33,13 +34,12 @@ ReturnValue_t PlPcduDummy::interpretDeviceReply(DeviceCommandId_t id, const uint return RETURN_OK; } -void PlPcduDummy::fillCommandAndReplyMap() { -} +void PlPcduDummy::fillCommandAndReplyMap() {} uint32_t PlPcduDummy::getTransitionDelayMs(Mode_t modeFrom, Mode_t modeTo) { return 500; } -ReturnValue_t PlPcduDummy::initializeLocalDataPool(localpool::DataPool& localDataPoolMap, - LocalDataPoolManager& poolManager) { - localDataPoolMap.emplace(plpcdu::PlPcduPoolIds::TEMP, new PoolEntry({0.0})); +ReturnValue_t PlPcduDummy::initializeLocalDataPool(localpool::DataPool &localDataPoolMap, + LocalDataPoolManager &poolManager) { + localDataPoolMap.emplace(plpcdu::PlPcduPoolIds::TEMP, new PoolEntry({0.0})); return HasReturnvaluesIF::RETURN_OK; } diff --git a/dummies/RwDummy.cpp b/dummies/RwDummy.cpp index b9f8fd51..d41728eb 100644 --- a/dummies/RwDummy.cpp +++ b/dummies/RwDummy.cpp @@ -1,4 +1,5 @@ #include "RwDummy.h" + #include RwDummy::RwDummy(object_id_t objectId, object_id_t comif, CookieIF *comCookie) @@ -10,22 +11,19 @@ void RwDummy::doStartUp() {} void RwDummy::doShutDown() {} -ReturnValue_t RwDummy::buildNormalDeviceCommand(DeviceCommandId_t *id) { - return NOTHING_TO_SEND; -} +ReturnValue_t RwDummy::buildNormalDeviceCommand(DeviceCommandId_t *id) { return NOTHING_TO_SEND; } ReturnValue_t RwDummy::buildTransitionDeviceCommand(DeviceCommandId_t *id) { return NOTHING_TO_SEND; } ReturnValue_t RwDummy::buildCommandFromCommand(DeviceCommandId_t deviceCommand, - const uint8_t *commandData, - size_t commandDataLen) { + const uint8_t *commandData, size_t commandDataLen) { return RETURN_OK; } -ReturnValue_t RwDummy::scanForReply(const uint8_t *start, size_t len, - DeviceCommandId_t *foundId, size_t *foundLen) { +ReturnValue_t RwDummy::scanForReply(const uint8_t *start, size_t len, DeviceCommandId_t *foundId, + size_t *foundLen) { return RETURN_OK; } @@ -33,13 +31,12 @@ ReturnValue_t RwDummy::interpretDeviceReply(DeviceCommandId_t id, const uint8_t return RETURN_OK; } -void RwDummy::fillCommandAndReplyMap() { -} +void RwDummy::fillCommandAndReplyMap() {} uint32_t RwDummy::getTransitionDelayMs(Mode_t modeFrom, Mode_t modeTo) { return 500; } -ReturnValue_t RwDummy::initializeLocalDataPool(localpool::DataPool& localDataPoolMap, - LocalDataPoolManager& poolManager) { +ReturnValue_t RwDummy::initializeLocalDataPool(localpool::DataPool &localDataPoolMap, + LocalDataPoolManager &poolManager) { localDataPoolMap.emplace(RwDefinitions::TEMPERATURE_C, new PoolEntry({0})); localDataPoolMap.emplace(RwDefinitions::CURR_SPEED, new PoolEntry({0})); diff --git a/dummies/StarTrackerDummy.cpp b/dummies/StarTrackerDummy.cpp index 7af0a0f7..4432bb5e 100644 --- a/dummies/StarTrackerDummy.cpp +++ b/dummies/StarTrackerDummy.cpp @@ -1,4 +1,5 @@ #include "StarTrackerDummy.h" + #include StarTrackerDummy::StarTrackerDummy(object_id_t objectId, object_id_t comif, CookieIF *comCookie) @@ -19,13 +20,13 @@ ReturnValue_t StarTrackerDummy::buildTransitionDeviceCommand(DeviceCommandId_t * } ReturnValue_t StarTrackerDummy::buildCommandFromCommand(DeviceCommandId_t deviceCommand, - const uint8_t *commandData, - size_t commandDataLen) { + const uint8_t *commandData, + size_t commandDataLen) { return RETURN_OK; } ReturnValue_t StarTrackerDummy::scanForReply(const uint8_t *start, size_t len, - DeviceCommandId_t *foundId, size_t *foundLen) { + DeviceCommandId_t *foundId, size_t *foundLen) { return RETURN_OK; } @@ -33,13 +34,12 @@ ReturnValue_t StarTrackerDummy::interpretDeviceReply(DeviceCommandId_t id, const return RETURN_OK; } -void StarTrackerDummy::fillCommandAndReplyMap() { -} +void StarTrackerDummy::fillCommandAndReplyMap() {} uint32_t StarTrackerDummy::getTransitionDelayMs(Mode_t modeFrom, Mode_t modeTo) { return 500; } -ReturnValue_t StarTrackerDummy::initializeLocalDataPool(localpool::DataPool& localDataPoolMap, - LocalDataPoolManager& poolManager) { +ReturnValue_t StarTrackerDummy::initializeLocalDataPool(localpool::DataPool &localDataPoolMap, + LocalDataPoolManager &poolManager) { localDataPoolMap.emplace(startracker::MCU_TEMPERATURE, new PoolEntry({0})); return HasReturnvaluesIF::RETURN_OK; } diff --git a/dummies/SusDummy.cpp b/dummies/SusDummy.cpp index 439046a5..58b2ac8d 100644 --- a/dummies/SusDummy.cpp +++ b/dummies/SusDummy.cpp @@ -6,8 +6,7 @@ #include SusDummy::SusDummy() - : ExtendedControllerBase(objects::SUS_0_N_LOC_XFYFZM_PT_XF, objects::NO_OBJECT), - susSet(this) { + : ExtendedControllerBase(objects::SUS_0_N_LOC_XFYFZM_PT_XF, objects::NO_OBJECT), susSet(this) { ObjectManager::instance()->insert(objects::SUS_6_R_LOC_XFYBZM_PT_XF, this); ObjectManager::instance()->insert(objects::SUS_1_N_LOC_XBYFZM_PT_XB, this); ObjectManager::instance()->insert(objects::SUS_7_R_LOC_XBYBZM_PT_XB, this); @@ -34,9 +33,7 @@ ReturnValue_t SusDummy::initialize() { return HasReturnvaluesIF::RETURN_OK; } -ReturnValue_t SusDummy::handleCommandMessage(CommandMessage* message) { - return RETURN_FAILED; -} +ReturnValue_t SusDummy::handleCommandMessage(CommandMessage* message) { return RETURN_FAILED; } void SusDummy::performControlOperation() { iteration++; @@ -52,10 +49,9 @@ void SusDummy::performControlOperation() { susSet.commit(); } -ReturnValue_t SusDummy::initializeLocalDataPool( - localpool::DataPool& localDataPoolMap, LocalDataPoolManager& poolManager) { - localDataPoolMap.emplace(SUS::SusPoolIds::TEMPERATURE_C, - new PoolEntry({0}, 1, true)); +ReturnValue_t SusDummy::initializeLocalDataPool(localpool::DataPool& localDataPoolMap, + LocalDataPoolManager& poolManager) { + localDataPoolMap.emplace(SUS::SusPoolIds::TEMPERATURE_C, new PoolEntry({0}, 1, true)); localDataPoolMap.emplace(SUS::SusPoolIds::CHANNEL_VEC, new PoolEntry({0})); return RETURN_OK; @@ -71,7 +67,7 @@ LocalPoolDataSetBase* SusDummy::getDataSetHandle(sid_t sid) { } ReturnValue_t SusDummy::checkModeCommand(Mode_t mode, Submode_t submode, - uint32_t* msToReachTheMode) { + uint32_t* msToReachTheMode) { if (submode != SUBMODE_NONE) { return INVALID_SUBMODE; } diff --git a/dummies/SyrlinksDummy.cpp b/dummies/SyrlinksDummy.cpp index 8e940fb2..275f194c 100644 --- a/dummies/SyrlinksDummy.cpp +++ b/dummies/SyrlinksDummy.cpp @@ -1,4 +1,5 @@ #include "SyrlinksDummy.h" + #include SyrlinksDummy::SyrlinksDummy(object_id_t objectId, object_id_t comif, CookieIF *comCookie) @@ -19,13 +20,13 @@ ReturnValue_t SyrlinksDummy::buildTransitionDeviceCommand(DeviceCommandId_t *id) } ReturnValue_t SyrlinksDummy::buildCommandFromCommand(DeviceCommandId_t deviceCommand, - const uint8_t *commandData, - size_t commandDataLen) { + const uint8_t *commandData, + size_t commandDataLen) { return RETURN_OK; } ReturnValue_t SyrlinksDummy::scanForReply(const uint8_t *start, size_t len, - DeviceCommandId_t *foundId, size_t *foundLen) { + DeviceCommandId_t *foundId, size_t *foundLen) { return RETURN_OK; } @@ -33,13 +34,12 @@ ReturnValue_t SyrlinksDummy::interpretDeviceReply(DeviceCommandId_t id, const ui return RETURN_OK; } -void SyrlinksDummy::fillCommandAndReplyMap() { -} +void SyrlinksDummy::fillCommandAndReplyMap() {} uint32_t SyrlinksDummy::getTransitionDelayMs(Mode_t modeFrom, Mode_t modeTo) { return 500; } -ReturnValue_t SyrlinksDummy::initializeLocalDataPool(localpool::DataPool& localDataPoolMap, - LocalDataPoolManager& poolManager) { +ReturnValue_t SyrlinksDummy::initializeLocalDataPool(localpool::DataPool &localDataPoolMap, + LocalDataPoolManager &poolManager) { localDataPoolMap.emplace(syrlinks::TEMP_BASEBAND_BOARD, new PoolEntry({0})); localDataPoolMap.emplace(syrlinks::TEMP_POWER_AMPLIFIER, new PoolEntry({0})); return HasReturnvaluesIF::RETURN_OK; diff --git a/dummies/TemperatureSensorsDummy.cpp b/dummies/TemperatureSensorsDummy.cpp index b32b3fec..129b20bd 100644 --- a/dummies/TemperatureSensorsDummy.cpp +++ b/dummies/TemperatureSensorsDummy.cpp @@ -50,7 +50,7 @@ void TemperatureSensorsDummy::performControlOperation() { ReturnValue_t result = max31865Set.read(); if (result != RETURN_OK) { - sif::warning << "Failed to read temperature from MAX31865 dataset" << std::endl; + sif::warning << "Failed to read temperature from MAX31865 dataset" << std::endl; } max31865Set.rtdValue = value - 5; max31865Set.temperatureCelcius = value; @@ -69,7 +69,7 @@ ReturnValue_t TemperatureSensorsDummy::initializeLocalDataPool( localDataPoolMap.emplace(static_cast(MAX31865::PoolIds::TEMPERATURE_C), new PoolEntry({0})); localDataPoolMap.emplace(static_cast(MAX31865::PoolIds::LAST_FAULT_BYTE), - new PoolEntry({0})); + new PoolEntry({0})); localDataPoolMap.emplace(static_cast(MAX31865::PoolIds::FAULT_BYTE), new PoolEntry({0})); diff --git a/linux/ObjectFactory.cpp b/linux/ObjectFactory.cpp index 4c56c837..e8ba7947 100644 --- a/linux/ObjectFactory.cpp +++ b/linux/ObjectFactory.cpp @@ -8,10 +8,10 @@ #include #include #include +#include #include #include #include -#include #include #include #include @@ -321,7 +321,7 @@ void ObjectFactory::createRtdComponents(std::string spiDev, GpioIF* gpioComIF, } void ObjectFactory::createThermalController() { - new ThermalController(objects::THERMAL_CONTROLLER, objects::NO_OBJECT); + new ThermalController(objects::THERMAL_CONTROLLER, objects::NO_OBJECT); } void ObjectFactory::gpioChecker(ReturnValue_t result, std::string output) { diff --git a/linux/devices/devicedefinitions/PlocMPSoCDefinitions.h b/linux/devices/devicedefinitions/PlocMPSoCDefinitions.h index b8d76120..d64bb863 100644 --- a/linux/devices/devicedefinitions/PlocMPSoCDefinitions.h +++ b/linux/devices/devicedefinitions/PlocMPSoCDefinitions.h @@ -101,31 +101,31 @@ static const uint16_t TC_WRITE_SEQ_EXECUTION_DELAY = 80; static const uint16_t TC_DOWNLINK_PWR_ON_EXECUTION_DELAY = 8; namespace status_code { - static const uint16_t UNKNOWN_APID = 0x5DD; - static const uint16_t INCORRECT_LENGTH = 0x5DE; - static const uint16_t INCORRECT_CRC = 0x5DF; - static const uint16_t INCORRECT_PKT_SEQ_CNT = 0x5E0; - static const uint16_t TC_NOT_ALLOWED_IN_MODE = 0x5E1; - static const uint16_t TC_EXEUTION_DISABLED = 0x5E2; - static const uint16_t FLASH_MOUNT_FAILED = 0x5E3; - static const uint16_t FLASH_FILE_ALREADY_CLOSED = 0x5E4; - static const uint16_t FLASH_FILE_OPEN_FAILED = 0x5E5; - static const uint16_t FLASH_FILE_ALREDY_OPEN = 0x5E6; - static const uint16_t FLASH_FILE_NOT_OPEN = 0x5E7; - static const uint16_t FLASH_UNMOUNT_FAILED = 0x5E8; - static const uint16_t HEAP_ALLOCATION_FAILED = 0x5E9; - static const uint16_t INVALID_PARAMETER = 0x5EA; - static const uint16_t NOT_INITIALIZED = 0x5EB; - static const uint16_t REBOOT_IMMINENT = 0x5EC; - static const uint16_t CORRUPT_DATA = 0x5ED; - static const uint16_t FLASH_CORRECTABLE_MISMATCH = 0x5EE; - static const uint16_t FLASH_UNCORRECTABLE_MISMATCH = 0x5EF; - static const uint16_t RESERVED_0 = 0x5F0; - static const uint16_t RESERVED_1 = 0x5F1; - static const uint16_t RESERVED_2 = 0x5F2; - static const uint16_t RESERVED_3 = 0x5F3; - static const uint16_t RESERVED_4 = 0x5F4; -} +static const uint16_t UNKNOWN_APID = 0x5DD; +static const uint16_t INCORRECT_LENGTH = 0x5DE; +static const uint16_t INCORRECT_CRC = 0x5DF; +static const uint16_t INCORRECT_PKT_SEQ_CNT = 0x5E0; +static const uint16_t TC_NOT_ALLOWED_IN_MODE = 0x5E1; +static const uint16_t TC_EXEUTION_DISABLED = 0x5E2; +static const uint16_t FLASH_MOUNT_FAILED = 0x5E3; +static const uint16_t FLASH_FILE_ALREADY_CLOSED = 0x5E4; +static const uint16_t FLASH_FILE_OPEN_FAILED = 0x5E5; +static const uint16_t FLASH_FILE_ALREDY_OPEN = 0x5E6; +static const uint16_t FLASH_FILE_NOT_OPEN = 0x5E7; +static const uint16_t FLASH_UNMOUNT_FAILED = 0x5E8; +static const uint16_t HEAP_ALLOCATION_FAILED = 0x5E9; +static const uint16_t INVALID_PARAMETER = 0x5EA; +static const uint16_t NOT_INITIALIZED = 0x5EB; +static const uint16_t REBOOT_IMMINENT = 0x5EC; +static const uint16_t CORRUPT_DATA = 0x5ED; +static const uint16_t FLASH_CORRECTABLE_MISMATCH = 0x5EE; +static const uint16_t FLASH_UNCORRECTABLE_MISMATCH = 0x5EF; +static const uint16_t RESERVED_0 = 0x5F0; +static const uint16_t RESERVED_1 = 0x5F1; +static const uint16_t RESERVED_2 = 0x5F2; +static const uint16_t RESERVED_3 = 0x5F3; +static const uint16_t RESERVED_4 = 0x5F4; +} // namespace status_code /** * @brief Abstract base class for TC space packet of MPSoC. diff --git a/linux/devices/ploc/PlocMPSoCHandler.cpp b/linux/devices/ploc/PlocMPSoCHandler.cpp index 7905e82b..37372b3b 100644 --- a/linux/devices/ploc/PlocMPSoCHandler.cpp +++ b/linux/devices/ploc/PlocMPSoCHandler.cpp @@ -693,7 +693,8 @@ ReturnValue_t PlocMPSoCHandler::handleCamCmdRpt(const uint8_t* data) { sif::info << "PlocMPSoCHandler: CamCmdRpt Ack value: 0x" << std::hex << static_cast(ackValue) << std::endl; #endif /* OBSW_DEBUG_PLOC_MPSOC == 1 */ - handleDeviceTM(packet.getPacketData() + sizeof(uint16_t), packet.getPacketDataLength() - 1, mpsoc::TM_CAM_CMD_RPT); + handleDeviceTM(packet.getPacketData() + sizeof(uint16_t), packet.getPacketDataLength() - 1, + mpsoc::TM_CAM_CMD_RPT); return result; } @@ -994,7 +995,7 @@ void PlocMPSoCHandler::disableExeReportReply() { void PlocMPSoCHandler::printStatus(const uint8_t* data) { uint16_t status = *(data + STATUS_OFFSET) << 8 | *(data + STATUS_OFFSET + 1); - sif::info << "Verification report status: " << getStatusString(status) << std::endl; + sif::info << "Verification report status: " << getStatusString(status) << std::endl; } uint16_t PlocMPSoCHandler::getStatus(const uint8_t* data) { @@ -1035,77 +1036,77 @@ void PlocMPSoCHandler::handleActionCommandFailure(ActionId_t actionId) { } std::string PlocMPSoCHandler::getStatusString(uint16_t status) { - switch(status) { - case(mpsoc::status_code::UNKNOWN_APID): { - return "Unknown APID"; - break; - } - case(mpsoc::status_code::INCORRECT_LENGTH): { - return "Incorrect length"; - break; - } - case(mpsoc::status_code::INCORRECT_CRC): { - return "Incorrect crc"; - break; - } - case(mpsoc::status_code::INCORRECT_PKT_SEQ_CNT): { - return "Incorrect packet sequence count"; - break; - } - case(mpsoc::status_code::TC_NOT_ALLOWED_IN_MODE): { - return "TC not allowed in this mode"; - break; - } - case(mpsoc::status_code::TC_EXEUTION_DISABLED): { - return "TC execution disabled"; - break; - } - case(mpsoc::status_code::FLASH_MOUNT_FAILED): { - return "Flash mount failed"; - break; - } - case(mpsoc::status_code::FLASH_FILE_ALREADY_CLOSED): { - return "Flash file already closed"; - break; - } - case(mpsoc::status_code::FLASH_FILE_NOT_OPEN): { - return "Flash file not open"; - break; - } - case(mpsoc::status_code::FLASH_UNMOUNT_FAILED): { - return "Flash unmount failed"; - break; - } - case(mpsoc::status_code::HEAP_ALLOCATION_FAILED): { - return "Heap allocation failed"; - break; - } - case(mpsoc::status_code::INVALID_PARAMETER): { - return "Invalid parameter"; - break; - } - case(mpsoc::status_code::NOT_INITIALIZED): { - return "Not initialized"; - break; - } - case(mpsoc::status_code::REBOOT_IMMINENT): { - return "Reboot imminent"; - break; - } - case(mpsoc::status_code::CORRUPT_DATA): { - return "Corrupt data"; - break; - } - case(mpsoc::status_code::FLASH_CORRECTABLE_MISMATCH): { - return "Flash correctable mismatch"; - break; - } - case(mpsoc::status_code::FLASH_UNCORRECTABLE_MISMATCH): { - return "Flash uncorrectable mismatch"; - break; - } - default: - break; - } - return ""; + switch (status) { + case (mpsoc::status_code::UNKNOWN_APID): { + return "Unknown APID"; + break; + } + case (mpsoc::status_code::INCORRECT_LENGTH): { + return "Incorrect length"; + break; + } + case (mpsoc::status_code::INCORRECT_CRC): { + return "Incorrect crc"; + break; + } + case (mpsoc::status_code::INCORRECT_PKT_SEQ_CNT): { + return "Incorrect packet sequence count"; + break; + } + case (mpsoc::status_code::TC_NOT_ALLOWED_IN_MODE): { + return "TC not allowed in this mode"; + break; + } + case (mpsoc::status_code::TC_EXEUTION_DISABLED): { + return "TC execution disabled"; + break; + } + case (mpsoc::status_code::FLASH_MOUNT_FAILED): { + return "Flash mount failed"; + break; + } + case (mpsoc::status_code::FLASH_FILE_ALREADY_CLOSED): { + return "Flash file already closed"; + break; + } + case (mpsoc::status_code::FLASH_FILE_NOT_OPEN): { + return "Flash file not open"; + break; + } + case (mpsoc::status_code::FLASH_UNMOUNT_FAILED): { + return "Flash unmount failed"; + break; + } + case (mpsoc::status_code::HEAP_ALLOCATION_FAILED): { + return "Heap allocation failed"; + break; + } + case (mpsoc::status_code::INVALID_PARAMETER): { + return "Invalid parameter"; + break; + } + case (mpsoc::status_code::NOT_INITIALIZED): { + return "Not initialized"; + break; + } + case (mpsoc::status_code::REBOOT_IMMINENT): { + return "Reboot imminent"; + break; + } + case (mpsoc::status_code::CORRUPT_DATA): { + return "Corrupt data"; + break; + } + case (mpsoc::status_code::FLASH_CORRECTABLE_MISMATCH): { + return "Flash correctable mismatch"; + break; + } + case (mpsoc::status_code::FLASH_UNCORRECTABLE_MISMATCH): { + return "Flash uncorrectable mismatch"; + break; + } + default: + break; + } + return ""; } diff --git a/linux/devices/ploc/PlocSupervisorHandler.cpp b/linux/devices/ploc/PlocSupervisorHandler.cpp index 389469c3..7d38d0c2 100644 --- a/linux/devices/ploc/PlocSupervisorHandler.cpp +++ b/linux/devices/ploc/PlocSupervisorHandler.cpp @@ -142,32 +142,32 @@ ReturnValue_t PlocSupervisorHandler::executeAction(ActionId_t actionId, } void PlocSupervisorHandler::doStartUp() { -if (setTimeDuringStartup) { - switch (startupState) { - case StartupState::OFF: { - bootTimeout.resetTimer(); - startupState = StartupState::BOOTING; - break; - } - case StartupState::BOOTING: { - if (bootTimeout.hasTimedOut()) { - uartIsolatorSwitch.pullHigh(); - startupState = StartupState::SET_TIME; + if (setTimeDuringStartup) { + switch (startupState) { + case StartupState::OFF: { + bootTimeout.resetTimer(); + startupState = StartupState::BOOTING; + break; } + case StartupState::BOOTING: { + if (bootTimeout.hasTimedOut()) { + uartIsolatorSwitch.pullHigh(); + startupState = StartupState::SET_TIME; + } + } + case StartupState::SET_TIME_EXECUTING: + break; + case StartupState::ON: { + setMode(_MODE_TO_ON); + break; + } + default: + break; } - case StartupState::SET_TIME_EXECUTING: - break; - case StartupState::ON: { - setMode(_MODE_TO_ON); - break; - } - default: - break; + } else { + uartIsolatorSwitch.pullHigh(); + setMode(_MODE_TO_ON); } -} else { - uartIsolatorSwitch.pullHigh(); - setMode(_MODE_TO_ON); -} } void PlocSupervisorHandler::doShutDown() { @@ -1948,15 +1948,15 @@ void PlocSupervisorHandler::handleExecutionFailureReport(uint16_t statusCode) { } void PlocSupervisorHandler::printAckFailureInfo(uint16_t statusCode, DeviceCommandId_t commandId) { - sif::warning << "PlocSupervisorHandler: Received Ack failure report with status code: 0x" - << std::hex << statusCode << std::endl; - switch(commandId) { - case(supv::SET_TIME_REF): { - sif::info << "PlocSupervisoHandler: Setting time failed. Make sure the OBC has a valid time" - << std::endl; - break; - } - default: - break; - } + sif::warning << "PlocSupervisorHandler: Received Ack failure report with status code: 0x" + << std::hex << statusCode << std::endl; + switch (commandId) { + case (supv::SET_TIME_REF): { + sif::info << "PlocSupervisoHandler: Setting time failed. Make sure the OBC has a valid time" + << std::endl; + break; + } + default: + break; + } } diff --git a/linux/fsfwconfig/objects/systemObjectList.h b/linux/fsfwconfig/objects/systemObjectList.h index 13f199cb..669fcc9f 100644 --- a/linux/fsfwconfig/objects/systemObjectList.h +++ b/linux/fsfwconfig/objects/systemObjectList.h @@ -61,7 +61,7 @@ enum sourceObjects : uint32_t { DUMMY_INTERFACE = 0x5400CAFE, DUMMY_HANDLER = 0x5400AFFE, P60DOCK_TEST_TASK = 0x00005060, - DUMMY_COM_IF= 0x54000040 + DUMMY_COM_IF = 0x54000040 }; } diff --git a/mission/controller/ThermalController.h b/mission/controller/ThermalController.h index 691c3986..29661d5e 100644 --- a/mission/controller/ThermalController.h +++ b/mission/controller/ThermalController.h @@ -2,11 +2,11 @@ #define MISSION_CONTROLLER_THERMALCONTROLLER_H_ #include +#include #include #include #include #include -#include class ThermalController : public ExtendedControllerBase { public: @@ -28,14 +28,9 @@ class ThermalController : public ExtendedControllerBase { uint32_t* msToReachTheMode) override; private: - static const uint32_t DELAY = 500; - enum class InternalState { - STARTUP, - INITIAL_DELAY, - READY - }; + enum class InternalState { STARTUP, INITIAL_DELAY, READY }; InternalState internalState = InternalState::STARTUP; diff --git a/mission/controller/controllerdefinitions/ThermalControllerDefinitions.h b/mission/controller/controllerdefinitions/ThermalControllerDefinitions.h index 3c8a3618..c2824c58 100644 --- a/mission/controller/controllerdefinitions/ThermalControllerDefinitions.h +++ b/mission/controller/controllerdefinitions/ThermalControllerDefinitions.h @@ -48,31 +48,31 @@ enum PoolIds : lp_id_t { COMPONENT_RW, - TEMP_Q7S, - BATTERY_TEMP_1, - BATTERY_TEMP_2, - BATTERY_TEMP_3, - BATTERY_TEMP_4, - TEMP_RW1, - TEMP_RW2, - TEMP_RW3, - TEMP_RW4, - TEMP_STAR_TRACKER, - TEMP_SYRLINKS_POWER_AMPLIFIER, - TEMP_SYRLINKS_BASEBAND_BOARD, - TEMP_MGT, - TEMP_ACU, - TEMP_PDU1, - TEMP_PDU2, - TEMP_1_P60DOCK, - TEMP_2_P60DOCK, - TEMP_GYRO_0_SIDE_A, - TEMP_GYRO_1_SIDE_A, - TEMP_GYRO_2_SIDE_B, - TEMP_GYRO_3_SIDE_B, - TEMP_MGM_0_SIDE_A, - TEMP_MGM_2_SIDE_B, - TEMP_ADC_PAYLOAD_PCDU + TEMP_Q7S, + BATTERY_TEMP_1, + BATTERY_TEMP_2, + BATTERY_TEMP_3, + BATTERY_TEMP_4, + TEMP_RW1, + TEMP_RW2, + TEMP_RW3, + TEMP_RW4, + TEMP_STAR_TRACKER, + TEMP_SYRLINKS_POWER_AMPLIFIER, + TEMP_SYRLINKS_BASEBAND_BOARD, + TEMP_MGT, + TEMP_ACU, + TEMP_PDU1, + TEMP_PDU2, + TEMP_1_P60DOCK, + TEMP_2_P60DOCK, + TEMP_GYRO_0_SIDE_A, + TEMP_GYRO_1_SIDE_A, + TEMP_GYRO_2_SIDE_B, + TEMP_GYRO_3_SIDE_B, + TEMP_MGM_0_SIDE_A, + TEMP_MGM_2_SIDE_B, + TEMP_ADC_PAYLOAD_PCDU }; static const uint8_t ENTRIES_SENSOR_TEMPERATURE_SET = 18; @@ -164,8 +164,7 @@ class SusTemperatures : public StaticLocalDataSet { public: SusTemperatures(HasLocalDataPoolIF* owner) : StaticLocalDataSet(owner, SUS_TEMPERATURES) {} - SusTemperatures(object_id_t objectId) - : StaticLocalDataSet(sid_t(objectId, SUS_TEMPERATURES)) {} + SusTemperatures(object_id_t objectId) : StaticLocalDataSet(sid_t(objectId, SUS_TEMPERATURES)) {} lp_var_t sus_0_n_loc_xfyfzm_pt_xf = lp_var_t(sid.objectId, PoolIds::SUS_0_N_LOC_XFYFZM_PT_XF, this); diff --git a/mission/devices/ACUHandler.cpp b/mission/devices/ACUHandler.cpp index b37d4997..c62b7b0d 100644 --- a/mission/devices/ACUHandler.cpp +++ b/mission/devices/ACUHandler.cpp @@ -75,7 +75,8 @@ ReturnValue_t ACUHandler::parseHkTableReply(const uint8_t *packet) { dataOffset += 4; for (size_t idx = 0; idx < 3; idx++) { - coreHk.temperatures[idx] = static_cast((packet[dataOffset] << 8) | packet[dataOffset + 1]) * 0.1; + coreHk.temperatures[idx] = + static_cast((packet[dataOffset] << 8) | packet[dataOffset + 1]) * 0.1; dataOffset += 4; } diff --git a/mission/devices/GomspaceDeviceHandler.cpp b/mission/devices/GomspaceDeviceHandler.cpp index 233aab4c..da54168a 100644 --- a/mission/devices/GomspaceDeviceHandler.cpp +++ b/mission/devices/GomspaceDeviceHandler.cpp @@ -472,7 +472,8 @@ ReturnValue_t GomspaceDeviceHandler::parsePduHkTable(PDU::PduCoreHk& coreHk, PDU dataOffset += 4; auxHk.vbat = *(packet + dataOffset) << 8 | *(packet + dataOffset + 1); dataOffset += 4; - coreHk.temperature = static_cast(*(packet + dataOffset) << 8 | *(packet + dataOffset + 1)) * 0.1; + coreHk.temperature = + static_cast(*(packet + dataOffset) << 8 | *(packet + dataOffset + 1)) * 0.1; dataOffset += 4; for (uint8_t idx = 0; idx < 3; idx++) { diff --git a/mission/devices/HeaterHandler.h b/mission/devices/HeaterHandler.h index d0d73c5d..0f4420b4 100644 --- a/mission/devices/HeaterHandler.h +++ b/mission/devices/HeaterHandler.h @@ -14,8 +14,8 @@ #include #include -#include #include +#include #include "devices/heaterSwitcherList.h" diff --git a/mission/devices/Max31865EiveHandler.cpp b/mission/devices/Max31865EiveHandler.cpp index d7378fd4..6f6760ad 100644 --- a/mission/devices/Max31865EiveHandler.cpp +++ b/mission/devices/Max31865EiveHandler.cpp @@ -158,9 +158,9 @@ ReturnValue_t Max31865EiveHandler::interpretDeviceReply(DeviceCommandId_t id, PoolReadGuard pg(&sensorDataset); if (pg.getReadResult() != HasReturnvaluesIF::RETURN_OK) { - sif::warning << "Max31865EiveHandler: Failed to read sensor dataset" << std::endl; - sensorDataset.temperatureCelcius.setValid(false); - return RETURN_OK; + sif::warning << "Max31865EiveHandler: Failed to read sensor dataset" << std::endl; + sensorDataset.temperatureCelcius.setValid(false); + return RETURN_OK; } sensorDataset.temperatureCelcius = approxTemp; sensorDataset.temperatureCelcius.setValid(true); @@ -181,7 +181,8 @@ ReturnValue_t Max31865EiveHandler::initializeLocalDataPool(localpool::DataPool& using namespace MAX31865; localDataPoolMap.emplace(static_cast(PoolIds::RTD_VALUE), new PoolEntry({0})); localDataPoolMap.emplace(static_cast(PoolIds::TEMPERATURE_C), new PoolEntry({0})); - localDataPoolMap.emplace(static_cast(PoolIds::LAST_FAULT_BYTE), new PoolEntry({0})); + localDataPoolMap.emplace(static_cast(PoolIds::LAST_FAULT_BYTE), + new PoolEntry({0})); localDataPoolMap.emplace(static_cast(PoolIds::FAULT_BYTE), new PoolEntry({0})); poolManager.subscribeForPeriodicPacket(sensorDataset.getSid(), false, 30.0, false); return RETURN_OK; diff --git a/mission/devices/P60DockHandler.cpp b/mission/devices/P60DockHandler.cpp index 53c7e9e8..975e069d 100644 --- a/mission/devices/P60DockHandler.cpp +++ b/mission/devices/P60DockHandler.cpp @@ -57,9 +57,11 @@ void P60DockHandler::parseHkTableReply(const uint8_t *packet) { dataOffset += 3; } - coreHk.temperature1 = static_cast(*(packet + dataOffset) << 8 | *(packet + dataOffset + 1)) * 0.1; + coreHk.temperature1 = + static_cast(*(packet + dataOffset) << 8 | *(packet + dataOffset + 1)) * 0.1; dataOffset += 4; - coreHk.temperature2 = static_cast(*(packet + dataOffset) << 8 | *(packet + dataOffset + 1)) * 0.1; + coreHk.temperature2 = + static_cast(*(packet + dataOffset) << 8 | *(packet + dataOffset + 1)) * 0.1; dataOffset += 4; auxHk.bootcause = *(packet + dataOffset) << 24 | diff --git a/mission/devices/Tmp1075Handler.cpp b/mission/devices/Tmp1075Handler.cpp index 41e9160e..8cc99ee6 100644 --- a/mission/devices/Tmp1075Handler.cpp +++ b/mission/devices/Tmp1075Handler.cpp @@ -95,9 +95,8 @@ ReturnValue_t Tmp1075Handler::interpretDeviceReply(DeviceCommandId_t id, const u dataset.temperatureCelcius = tempValue; dataset.setValidity(true, true); dataset.commit(); - } - else { - dataset.setValidity(false, true); + } else { + dataset.setValidity(false, true); } break; } diff --git a/mission/devices/max1227.cpp b/mission/devices/max1227.cpp index 027b60f6..dc04e785 100644 --- a/mission/devices/max1227.cpp +++ b/mission/devices/max1227.cpp @@ -26,6 +26,6 @@ void max1227::prepareExternallyClockedTemperatureRead(uint8_t *spiBuf, size_t &s } float max1227::getTemperature(uint16_t raw) { - float temp = static_cast((-2048 * (raw >> 11)) + (raw & 0x7FF)) * 0.125; - return temp; + float temp = static_cast((-2048 * (raw >> 11)) + (raw & 0x7FF)) * 0.125; + return temp; } diff --git a/mission/utility/compileTime.h b/mission/utility/compileTime.h index 0e367248..0d4f45a3 100644 --- a/mission/utility/compileTime.h +++ b/mission/utility/compileTime.h @@ -37,20 +37,39 @@ #define CONV_STR2DEC_4(str, i) (CONV_STR2DEC_3(str, i) * 10 + str[i + 3] - '0') // Custom "glue logic" to convert the month name to a usable number -#define GET_MONTH(str, i) \ - (str[i] == 'J' && str[i + 1] == 'a' && str[i + 2] == 'n' ? 1 \ - : str[i] == 'F' && str[i + 1] == 'e' && str[i + 2] == 'b' ? 2 \ - : str[i] == 'M' && str[i + 1] == 'a' && str[i + 2] == 'r' ? 3 \ - : str[i] == 'A' && str[i + 1] == 'p' && str[i + 2] == 'r' ? 4 \ - : str[i] == 'M' && str[i + 1] == 'a' && str[i + 2] == 'y' ? 5 \ - : str[i] == 'J' && str[i + 1] == 'u' && str[i + 2] == 'n' ? 6 \ - : str[i] == 'J' && str[i + 1] == 'u' && str[i + 2] == 'l' ? 7 \ - : str[i] == 'A' && str[i + 1] == 'u' && str[i + 2] == 'g' ? 8 \ - : str[i] == 'S' && str[i + 1] == 'e' && str[i + 2] == 'p' ? 9 \ - : str[i] == 'O' && str[i + 1] == 'c' && str[i + 2] == 't' ? 10 \ - : str[i] == 'N' && str[i + 1] == 'o' && str[i + 2] == 'v' ? 11 \ - : str[i] == 'D' && str[i + 1] == 'e' && str[i + 2] == 'c' ? 12 \ - : 0) +#define GET_MONTH(str, i) \ + (str[i] == 'J' && str[i + 1] == 'a' && str[i + 2] == 'n' \ + ? 1 \ + : str[i] == 'F' && str[i + 1] == 'e' && str[i + 2] == 'b' \ + ? 2 \ + : str[i] == 'M' && str[i + 1] == 'a' && str[i + 2] == 'r' \ + ? 3 \ + : str[i] == 'A' && str[i + 1] == 'p' && str[i + 2] == 'r' \ + ? 4 \ + : str[i] == 'M' && str[i + 1] == 'a' && str[i + 2] == 'y' \ + ? 5 \ + : str[i] == 'J' && str[i + 1] == 'u' && str[i + 2] == 'n' \ + ? 6 \ + : str[i] == 'J' && str[i + 1] == 'u' && str[i + 2] == 'l' \ + ? 7 \ + : str[i] == 'A' && str[i + 1] == 'u' && \ + str[i + 2] == 'g' \ + ? 8 \ + : str[i] == 'S' && str[i + 1] == 'e' && \ + str[i + 2] == 'p' \ + ? 9 \ + : str[i] == 'O' && str[i + 1] == 'c' && \ + str[i + 2] == 't' \ + ? 10 \ + : str[i] == 'N' && \ + str[i + 1] == 'o' && \ + str[i + 2] == 'v' \ + ? 11 \ + : str[i] == 'D' && \ + str[i + 1] == 'e' && \ + str[i + 2] == 'c' \ + ? 12 \ + : 0) // extract the information from the time string given by __TIME__ and __DATE__ #define __TIME_SECONDS__ CONV_STR2DEC_2(__TIME__, 6) diff --git a/scripts/auto-formatter.sh b/scripts/auto-formatter.sh index 9d2efbad..e00a68ae 100755 --- a/scripts/auto-formatter.sh +++ b/scripts/auto-formatter.sh @@ -12,6 +12,7 @@ folder_list=( "./bsp_egse" "./test" "./common" + "./dummies" ) cmake_fmt="cmake-format" diff --git a/unittest/controller/testThermalController.cpp b/unittest/controller/testThermalController.cpp index 8f849e0b..c54892e1 100644 --- a/unittest/controller/testThermalController.cpp +++ b/unittest/controller/testThermalController.cpp @@ -1,9 +1,9 @@ #include #include #include -#include #include #include +#include #include