diff --git a/.idea/cmake.xml b/.idea/cmake.xml new file mode 100644 index 00000000..e8d9d9dd --- /dev/null +++ b/.idea/cmake.xml @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index 7c77a8b6..37503174 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -17,6 +17,15 @@ change warranting a new major release: # [unreleased] +## Fixed + +- CFDP Funnel bugfix: CCSDS wrapping was buggy and works properly now. +- CMakeLists.txt fix which broke CI/CD builds when server could not retrieve full git SHA. + +## Changed + +- Add `-Wshadow=local` shadowing warnings and fixed all of them + ## Added - Added new heater info set for the TCS controller. This set contains the heater switch states @@ -27,10 +36,8 @@ change warranting a new major release: which show whether the specific heaters are on or off. The heater handler will be part of the TCS tree. PR: https://egit.irs.uni-stuttgart.de/eive/eive-obsw/pulls/351 - -## Changed - -- Add `-Wshadow=local` shadowing warnings and fixed all of them +- git post checkout hook which initializes and updates the submodules + automatically. # [v1.28.0] 2023-02-17 @@ -38,8 +45,6 @@ eive-tmtc: v2.12.7 ## Added -- git post checkout hook which initializes and updates the submodules - automatically. - In case the ACS Controller does recognize more than one RW to be invalid and therefore not available, it does not perform pointing control but aborts shortly after `sensorProcessing`. If the problem persits for 5 ACS cycles, the `MULTIPLE_RW_INVALID` event is triggered, which invokes the diff --git a/CMakeLists.txt b/CMakeLists.txt index 895034c8..49a072f0 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -175,25 +175,11 @@ if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/.git) if(LIST_LEN GREATER 4) list(GET GIT_INFO 4 OBSW_VERSION_CST_GIT_SHA1) endif() - if(NOT OBSW_VERSION_MAJOR) - set(OBSW_VERSION_MAJOR ${OBSW_VERSION_MAJOR_IF_GIT_FAILS}) - endif() - if(NOT OBSW_VERSION_MINOR) - set(FSFW_SUBVERSION ${OBSW_VERSION_MINOR_IF_GIT_FAILS}) - endif() - if(NOT OBSW_VERSION_REVISION) - set(FSFW_REVISION ${OBSW_VERSION_REVISION_IF_GIT_FAILS}) - endif() set(GIT_VER_HANDLING_OK TRUE) else() set(GIT_VER_HANDLING_OK FALSE) endif() endif() -if(NOT GIT_VER_HANDLING_OK) - set(OBSW_VERSION_MAJOR ${OBSW_VERSION_MAJOR_IF_GIT_FAILS}) - set(OBSW_VERSION_MINOR ${OBSW_VERSION_MINOR_IF_GIT_FAILS}) - set(OBSW_VERSION_REVISION ${OBSW_VERSION_REVISION_IF_GIT_FAILS}) -endif() # Set names and variables set(OBSW_NAME ${CMAKE_PROJECT_NAME}) diff --git a/bsp_hosted/fsfwconfig/FSFWConfig.h.in b/bsp_hosted/fsfwconfig/FSFWConfig.h.in index db5a9ad8..cf4b941a 100644 --- a/bsp_hosted/fsfwconfig/FSFWConfig.h.in +++ b/bsp_hosted/fsfwconfig/FSFWConfig.h.in @@ -50,6 +50,8 @@ //! If set to 1 the binary needs "cap_sys_nice=eip" privileges to run #define FSFW_USE_REALTIME_FOR_LINUX 0 +#define FSFW_UDP_SEND_WIRETAPPING_ENABLED 0 + namespace fsfwconfig { //! Default timestamp size. The default timestamp will be an seven byte CDC short timestamp. diff --git a/fsfw b/fsfw index be015b4c..c3279852 160000 --- a/fsfw +++ b/fsfw @@ -1 +1 @@ -Subproject commit be015b4c669995dc55bc316b006699be8542d941 +Subproject commit c32798522283d89028b7c1ecd3bd33b8391e1a39 diff --git a/linux/boardtest/I2cTestClass.cpp b/linux/boardtest/I2cTestClass.cpp index 40a66125..4d4e6267 100644 --- a/linux/boardtest/I2cTestClass.cpp +++ b/linux/boardtest/I2cTestClass.cpp @@ -29,7 +29,7 @@ ReturnValue_t I2cTestClass::performPeriodicAction() { void I2cTestClass::battInit() { sif::info << "I2cTestClass: BPX Initialization" << std::endl; - UnixFileGuard fileHelper(i2cdev, &bpxInfo.fd, O_RDWR, "I2cTestClass::sendMessage"); + UnixFileGuard fileHelper(i2cdev, bpxInfo.fd, O_RDWR, "I2cTestClass::sendMessage"); if (fileHelper.getOpenResult() != returnvalue::OK) { sif::error << "Opening I2C device" << i2cdev << " failed" << std::endl; return; @@ -58,7 +58,7 @@ void I2cTestClass::battInit() { } void I2cTestClass::battPeriodic() { - UnixFileGuard fileHelper(i2cdev, &bpxInfo.fd, O_RDWR, "I2cTestClass::sendMessage"); + UnixFileGuard fileHelper(i2cdev, bpxInfo.fd, O_RDWR, "I2cTestClass::sendMessage"); if (fileHelper.getOpenResult() != returnvalue::OK) { sif::error << "Opening I2C device" << i2cdev << " failed" << std::endl; return; diff --git a/linux/boardtest/SpiTestClass.cpp b/linux/boardtest/SpiTestClass.cpp index e995a846..2521c9a8 100644 --- a/linux/boardtest/SpiTestClass.cpp +++ b/linux/boardtest/SpiTestClass.cpp @@ -94,7 +94,7 @@ void SpiTestClass::performRm3100Test(uint8_t mgmId) { #endif int fileDescriptor = 0; - UnixFileGuard fileHelper(deviceName, &fileDescriptor, O_RDWR, "SpiComIF::initializeInterface"); + UnixFileGuard fileHelper(deviceName, fileDescriptor, O_RDWR, "SpiComIF::initializeInterface"); if (fileHelper.getOpenResult()) { sif::error << "SpiTestClass::performRm3100Test: File descriptor could not be opened!" << std::endl; @@ -191,7 +191,7 @@ void SpiTestClass::performLis3MdlTest(uint8_t lis3Id) { #endif int fileDescriptor = 0; - UnixFileGuard fileHelper(deviceName, &fileDescriptor, O_RDWR, "SpiComIF::initializeInterface"); + UnixFileGuard fileHelper(deviceName, fileDescriptor, O_RDWR, "SpiComIF::initializeInterface"); if (fileHelper.getOpenResult()) { sif::error << "SpiTestClass::performLis3Mdl3100Test: File descriptor could not be opened!" << std::endl; @@ -231,7 +231,7 @@ void SpiTestClass::performL3gTest(uint8_t l3gId) { #endif int fileDescriptor = 0; - UnixFileGuard fileHelper(deviceName, &fileDescriptor, O_RDWR, "SpiComIF::initializeInterface"); + UnixFileGuard fileHelper(deviceName, fileDescriptor, O_RDWR, "SpiComIF::initializeInterface"); if (fileHelper.getOpenResult()) { sif::error << "SpiTestClass::performLis3Mdl3100Test: File descriptor could not be opened!" << std::endl; @@ -341,7 +341,7 @@ void SpiTestClass::performMax1227Test() { #elif defined(TE0720_1CFA) #endif int fd = 0; - UnixFileGuard fileHelper(deviceName, &fd, O_RDWR, "SpiComIF::initializeInterface"); + UnixFileGuard fileHelper(deviceName, fd, O_RDWR, "SpiComIF::initializeInterface"); if (fileHelper.getOpenResult()) { sif::error << "SpiTestClass::performLis3Mdl3100Test: File descriptor could not be opened!" << std::endl; diff --git a/mission/devices/GyroADIS1650XHandler.cpp b/mission/devices/GyroADIS1650XHandler.cpp index 765bc589..0993e233 100644 --- a/mission/devices/GyroADIS1650XHandler.cpp +++ b/mission/devices/GyroADIS1650XHandler.cpp @@ -434,7 +434,7 @@ ReturnValue_t GyroADIS1650XHandler::spiSendCallback(SpiComIF *comIf, SpiCookie * // Prepare transfer int fileDescriptor = 0; std::string device = comIf->getSpiDev(); - UnixFileGuard fileHelper(device, &fileDescriptor, O_RDWR, "SpiComIF::sendMessage"); + UnixFileGuard fileHelper(device, fileDescriptor, O_RDWR, "SpiComIF::sendMessage"); if (fileHelper.getOpenResult() != returnvalue::OK) { return SpiComIF::OPENING_FILE_FAILED; } diff --git a/mission/devices/PayloadPcduHandler.cpp b/mission/devices/PayloadPcduHandler.cpp index 0f691c75..44dd667c 100644 --- a/mission/devices/PayloadPcduHandler.cpp +++ b/mission/devices/PayloadPcduHandler.cpp @@ -722,7 +722,7 @@ ReturnValue_t PayloadPcduHandler::transferAsTwo(SpiComIF* comIf, SpiCookie* cook int retval = 0; // Prepare transfer int fileDescriptor = 0; - UnixFileGuard fileHelper(comIf->getSpiDev(), &fileDescriptor, O_RDWR, "SpiComIF::sendMessage"); + UnixFileGuard fileHelper(comIf->getSpiDev(), fileDescriptor, O_RDWR, "SpiComIF::sendMessage"); if (fileHelper.getOpenResult() != returnvalue::OK) { return SpiComIF::OPENING_FILE_FAILED; } diff --git a/mission/devices/RwHandler.cpp b/mission/devices/RwHandler.cpp index 13da2784..6d6032b3 100644 --- a/mission/devices/RwHandler.cpp +++ b/mission/devices/RwHandler.cpp @@ -168,7 +168,7 @@ ReturnValue_t RwHandler::interpretDeviceReply(DeviceCommandId_t id, const uint8_ // data is one more flag byte to show whether the value was read at least once. auto packetLen = rws::idToPacketLen(currentId); // arrayprinter::print(packetPtr, packetLen); - uint16_t replyCrc; + uint16_t replyCrc = 0; size_t dummy = 0; SerializeAdapter::deSerialize(&replyCrc, packetPtr + packetLen - 2, &dummy, SerializeIF::Endianness::LITTLE); diff --git a/mission/devices/SyrlinksHandler.cpp b/mission/devices/SyrlinksHandler.cpp index c1ebfa48..edb2ae1f 100644 --- a/mission/devices/SyrlinksHandler.cpp +++ b/mission/devices/SyrlinksHandler.cpp @@ -279,7 +279,7 @@ ReturnValue_t SyrlinksHandler::scanForReply(const uint8_t* start, size_t remaini break; default: sif::warning << "SyrlinksHkHandler::scanForReply: Unknown reply identifier" << std::endl; - result = IGNORE_REPLY_DATA; + result = IGNORE_FULL_PACKET; break; } diff --git a/mission/tmtc/CfdpTmFunnel.cpp b/mission/tmtc/CfdpTmFunnel.cpp index f19d5360..e687911f 100644 --- a/mission/tmtc/CfdpTmFunnel.cpp +++ b/mission/tmtc/CfdpTmFunnel.cpp @@ -53,16 +53,18 @@ ReturnValue_t CfdpTmFunnel::handlePacket(TmTcMessage& msg) { #endif return result; } - size_t serSize = 0; - result = - spacePacketHeader.serializeBe(&newPacketData, &serSize, spacePacketHeader.getFullPacketLen()); + size_t packetLen = 0; + uint8_t* serPtr = newPacketData; + result = spacePacketHeader.serializeBe(&serPtr, &packetLen, spacePacketHeader.getFullPacketLen()); if (result != returnvalue::OK) { #if FSFW_CPP_OSTREAM_ENABLED == 1 sif::error << "CfdpTmFunnel::handlePacket: Error serializing packet" << std::endl; #endif return result; } - std::memcpy(newPacketData, cfdpPacket, cfdpPacketLen); + std::memcpy(serPtr, cfdpPacket, cfdpPacketLen); + packetLen += cfdpPacketLen; + // Delete old packet tmStore.deleteData(msg.getStorageId()); msg.setStorageId(newStoreId); @@ -74,13 +76,15 @@ ReturnValue_t CfdpTmFunnel::handlePacket(TmTcMessage& msg) { // Create copy of data to ensure each TM recipient has its own copy. That way, we don't need // to bother with send order and where the data is deleted. store_address_t storeId; - result = tmStore.addData(&storeId, newPacketData, serSize); + result = tmStore.addData(&storeId, newPacketData, packetLen); if (result == returnvalue::OK) { msg.setStorageId(storeId); } else { #if FSFW_CPP_OSTREAM_ENABLED == 1 - sif::error << "PusTmFunnel::handlePacket: Store too full to create data copy" + sif::error << "PusTmFunnel::handlePacket: Store too full to create data copy or store " + "error" << std::endl; + break; #endif } } else {