diff --git a/bsp_hosted/fsfwconfig/OBSWConfig.h b/bsp_hosted/fsfwconfig/OBSWConfig.h index fa3769b1..b784cd03 100644 --- a/bsp_hosted/fsfwconfig/OBSWConfig.h +++ b/bsp_hosted/fsfwconfig/OBSWConfig.h @@ -8,9 +8,9 @@ #define OBSW_ADD_TEST_CODE 0 -// These defines should be disabled for mission code but are useful for -// debugging. -#define OBSW_ENHANCED_PRINTOUT 1 +/* These defines should be disabled for mission code but are useful for +debugging. */ +#define OBSW_VEBOSE_LEVEL 1 #ifdef __cplusplus diff --git a/bsp_q7s/CMakeLists.txt b/bsp_q7s/CMakeLists.txt index 1da8067f..3d3a1c91 100644 --- a/bsp_q7s/CMakeLists.txt +++ b/bsp_q7s/CMakeLists.txt @@ -6,7 +6,6 @@ target_sources(${TARGET_NAME} PUBLIC add_subdirectory(boardconfig) add_subdirectory(comIF) -add_subdirectory(gpio) add_subdirectory(boardtest) diff --git a/bsp_q7s/ObjectFactory.cpp b/bsp_q7s/ObjectFactory.cpp index 8b14fb24..a7a0c601 100644 --- a/bsp_q7s/ObjectFactory.cpp +++ b/bsp_q7s/ObjectFactory.cpp @@ -30,10 +30,10 @@ #include #include #include -#include -#include +#include +#include -# if TEST_LIBGPIOD == 1 +#if TEST_LIBGPIOD == 1 #include "LibgpiodTest.h" #endif diff --git a/fsfwconfig/OBSWConfig.h b/fsfwconfig/OBSWConfig.h index 6cdf0024..66eddf12 100644 --- a/fsfwconfig/OBSWConfig.h +++ b/fsfwconfig/OBSWConfig.h @@ -6,18 +6,17 @@ #ifndef FSFWCONFIG_OBSWCONFIG_H_ #define FSFWCONFIG_OBSWCONFIG_H_ -#define TEST_LIBGPIOD 0 -#define ADD_TEST_TAST 0 +#define TEST_LIBGPIOD 0 -// These defines should be disabled for mission code but are useful for -// debugging. -#define OBSW_ENHANCED_PRINTOUT 1 +/* These defines should be disabled for mission code but are useful for +debugging. */ +#define OBSW_VERBOSE_LEVEL 1 -#define TE0720 0 +#define TE0720 0 -#define P60DOCK_DEBUG 0 -#define PDU1_DEBUG 0 -#define PDU2_DEBUG 0 +#define P60DOCK_DEBUG 0 +#define PDU1_DEBUG 0 +#define PDU2_DEBUG 0 #include "OBSWVersion.h" diff --git a/fsfwconfig/devices/gpioIds.h b/fsfwconfig/devices/gpioIds.h index 332de906..cfef7e75 100644 --- a/fsfwconfig/devices/gpioIds.h +++ b/fsfwconfig/devices/gpioIds.h @@ -1,7 +1,7 @@ #ifndef FSFWCONFIG_DEVICES_GPIOIDS_H_ #define FSFWCONFIG_DEVICES_GPIOIDS_H_ -#include +#include namespace gpioIds { enum gpioId_t { diff --git a/mission/devices/HeaterHandler.h b/mission/devices/HeaterHandler.h index 22b33165..4c37c30f 100644 --- a/mission/devices/HeaterHandler.h +++ b/mission/devices/HeaterHandler.h @@ -11,8 +11,8 @@ #include #include #include +#include #include -#include /** * @brief This class intends the control of heaters. diff --git a/mission/devices/MGMHandlerLIS3MDL.cpp b/mission/devices/MGMHandlerLIS3MDL.cpp index 2445620d..fad96f66 100644 --- a/mission/devices/MGMHandlerLIS3MDL.cpp +++ b/mission/devices/MGMHandlerLIS3MDL.cpp @@ -5,7 +5,7 @@ MGMHandlerLIS3MDL::MGMHandlerLIS3MDL(object_id_t objectId, object_id_t deviceCommunication, CookieIF* comCookie): DeviceHandlerBase(objectId, deviceCommunication, comCookie), dataset(this) { -#if OBSW_ENHANCED_PRINTOUT == 1 +#if OBSW_VERBOSE_LEVEL >= 1 debugDivider = new PeriodicOperationDivider(10); #endif // Set to default values right away. @@ -247,7 +247,7 @@ ReturnValue_t MGMHandlerLIS3MDL::interpretDeviceReply(DeviceCommandId_t id, float mgmZ = static_cast(mgmMeasurementRawZ) * sensitivityFactor * MGMLIS3MDL::GAUSS_TO_MICROTESLA_FACTOR; -#if OBSW_ENHANCED_PRINTOUT == 1 +#if OBSW_VERBOSE_LEVEL >= 1 if(debugDivider->checkAndIncrement()) { sif::info << "MGMHandlerLIS3: Magnetic field strength in" " microtesla:" << std::endl; @@ -271,7 +271,7 @@ ReturnValue_t MGMHandlerLIS3MDL::interpretDeviceReply(DeviceCommandId_t id, case MGMLIS3MDL::READ_TEMPERATURE: { int16_t tempValueRaw = packet[2] << 8 | packet[1]; float tempValue = 25.0 + ((static_cast(tempValueRaw)) / 8.0); -#if OBSW_ENHANCED_PRINTOUT == 1 +#if OBSW_VERBOSE_LEVEL >= 1 if(debugDivider->check()) { // Set terminal to utf-8 if there is an issue with micro printout. sif::info << "MGMHandlerLIS3: Temperature: " << tempValue<< " °C" diff --git a/mission/devices/MGMHandlerLIS3MDL.h b/mission/devices/MGMHandlerLIS3MDL.h index 4a62ba31..77874e33 100644 --- a/mission/devices/MGMHandlerLIS3MDL.h +++ b/mission/devices/MGMHandlerLIS3MDL.h @@ -157,7 +157,7 @@ private: CommunicationStep communicationStep = CommunicationStep::DATA; bool commandExecuted = false; -#if OBSW_ENHANCED_PRINTOUT == 1 +#if OBSW_VERBOSE_LEVEL >= 1 PeriodicOperationDivider* debugDivider; #endif diff --git a/mission/devices/MGMHandlerRM3100.cpp b/mission/devices/MGMHandlerRM3100.cpp index 62db06a7..76d3dd70 100644 --- a/mission/devices/MGMHandlerRM3100.cpp +++ b/mission/devices/MGMHandlerRM3100.cpp @@ -9,7 +9,7 @@ MGMHandlerRM3100::MGMHandlerRM3100(object_id_t objectId, object_id_t deviceCommunication, CookieIF* comCookie): DeviceHandlerBase(objectId, deviceCommunication, comCookie), primaryDataset(this) { -#if OBSW_ENHANCED_PRINTOUT == 1 +#if OBSW_VERBOSE_LEVEL >= 1 debugDivider = new PeriodicOperationDivider(10); #endif } @@ -328,7 +328,7 @@ ReturnValue_t MGMHandlerRM3100::handleDataReadout(const uint8_t *packet) { int32_t fieldStrengthZ = (packet[7] << 16 | packet[8] << 8 | packet[9]) * scaleFactorZ; -#if OBSW_ENHANCED_PRINTOUT == 1 +#if OBSW_VERBOSE_LEVEL >= 1 if(debugDivider->checkAndIncrement()) { sif::info << "MGMHandlerLIS3: Magnetic field strength in" " microtesla:" << std::endl; diff --git a/mission/devices/MGMHandlerRM3100.h b/mission/devices/MGMHandlerRM3100.h index 4af6b627..968953bf 100644 --- a/mission/devices/MGMHandlerRM3100.h +++ b/mission/devices/MGMHandlerRM3100.h @@ -6,7 +6,7 @@ #include -#if OBSW_ENHANCED_PRINTOUT == 1 +#if OBSW_VERBOSE_LEVEL >= 1 #include #endif @@ -97,7 +97,7 @@ private: const uint8_t *commandData,size_t commandDataLen); ReturnValue_t handleDataReadout(const uint8_t* packet); -#if OBSW_ENHANCED_PRINTOUT == 1 +#if OBSW_VERBOSE_LEVEL >= 1 PeriodicOperationDivider* debugDivider; #endif }; diff --git a/mission/devices/P60DockHandler.cpp b/mission/devices/P60DockHandler.cpp index 4c504f9a..e34f96c2 100644 --- a/mission/devices/P60DockHandler.cpp +++ b/mission/devices/P60DockHandler.cpp @@ -25,7 +25,7 @@ void P60DockHandler::letChildHandleHkReply(DeviceCommandId_t id, const uint8_t * */ handleDeviceTM(&p60dockHkTableDataset, id, true); -#if OBSW_ENHANCED_PRINTOUT == 1 && P60DOCK_DEBUG == 1 +#if OBSW_VERBOSE_LEVEL >= 1 && P60DOCK_DEBUG == 1 p60dockHkTableDataset.read(); float temperatureC = p60dockHkTableDataset.temperature1.value * 0.1; diff --git a/mission/devices/PDU1Handler.cpp b/mission/devices/PDU1Handler.cpp index d9aa0d8c..540f0637 100644 --- a/mission/devices/PDU1Handler.cpp +++ b/mission/devices/PDU1Handler.cpp @@ -23,7 +23,7 @@ void PDU1Handler::letChildHandleHkReply(DeviceCommandId_t id, const uint8_t *pac parseHkTableReply(packet); // handleDeviceTM(&pdu1HkTableDataset, id, true); -#if OBSW_ENHANCED_PRINTOUT == 1 && PDU1_DEBUG == 1 +#if OBSW_VERBOSE_LEVEL >= 1 && PDU1_DEBUG == 1 pdu1HkTableDataset.read(); sif::info << "PDU1 VCC: " << pdu1HkTableDataset.vcc << " mV" << std::endl; float vbat = pdu1HkTableDataset.vbat.value * 0.1; diff --git a/mission/devices/PDU2Handler.cpp b/mission/devices/PDU2Handler.cpp index 117ae646..b442c12c 100644 --- a/mission/devices/PDU2Handler.cpp +++ b/mission/devices/PDU2Handler.cpp @@ -26,7 +26,7 @@ void PDU2Handler::letChildHandleHkReply(DeviceCommandId_t id, const uint8_t *pac */ handleDeviceTM(&pdu2HkTableDataset, id, true); -#if OBSW_ENHANCED_PRINTOUT == 1 && PDU2_DEBUG == 1 +#if OBSW_VERBOSE_LEVEL >= 1 && PDU2_DEBUG == 1 pdu2HkTableDataset.read(); sif::info << "PDU2 Q7S current voltage: " << pdu2HkTableDataset.voltageOutQ7S << " mV" << std::endl; sif::info << "PDU2 VCC: " << pdu2HkTableDataset.vcc << " mV" << std::endl; diff --git a/mission/devices/Tmp1075Handler.cpp b/mission/devices/Tmp1075Handler.cpp index e4eb1692..f0d95a18 100644 --- a/mission/devices/Tmp1075Handler.cpp +++ b/mission/devices/Tmp1075Handler.cpp @@ -98,7 +98,7 @@ ReturnValue_t Tmp1075Handler::interpretDeviceReply(DeviceCommandId_t id, int16_t tempValueRaw = 0; tempValueRaw = packet[0] << 4 | packet[1] >> 4; float tempValue = ((static_cast(tempValueRaw)) * 0.0625); -#if OBSW_ENHANCED_PRINTOUT == 1 +#if OBSW_VERBOSE_LEVEL >= 1 sif::info << "Tmp1075 with object id: 0x" << std::hex << getObjectId() << ": Temperature: " << tempValue<< " °C" << std::endl;