From f7bc052070e73f25ace3b69cacf70ac38f6b88a1 Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Thu, 13 Apr 2023 17:55:56 +0200 Subject: [PATCH 1/5] stupid submodules --- .gitmodules | 3 --- CMakeLists.txt | 2 +- linux/acs/StrComHandler.h | 6 ++++-- mission/acs/str/ArcsecDatalinkLayer.cpp | 13 +++++++------ mission/acs/str/ArcsecDatalinkLayer.h | 5 ++++- mission/acs/str/ArcsecJsonParamBase.cpp | 6 +++++- mission/acs/str/ArcsecJsonParamBase.h | 2 -- mission/acs/str/StarTrackerHandler.cpp | 9 +++++---- mission/acs/str/StarTrackerHandler.h | 2 +- thirdparty/CMakeLists.txt | 3 ++- thirdparty/arcsec_star_tracker | 1 - 11 files changed, 29 insertions(+), 23 deletions(-) delete mode 160000 thirdparty/arcsec_star_tracker diff --git a/.gitmodules b/.gitmodules index 76fb8527..2bcea610 100644 --- a/.gitmodules +++ b/.gitmodules @@ -10,9 +10,6 @@ [submodule "thirdparty/lwgps"] path = thirdparty/lwgps url = https://github.com/rmspacefish/lwgps.git -[submodule "thirdparty/arcsec_star_tracker"] - path = thirdparty/arcsec_star_tracker - url = https://egit.irs.uni-stuttgart.de/eive/arcsec_star_tracker.git [submodule "thirdparty/json"] path = thirdparty/json url = https://github.com/nlohmann/json.git diff --git a/CMakeLists.txt b/CMakeLists.txt index 6d73475d..76db1b78 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -220,7 +220,7 @@ set(LIB_EIVE_MISSION_PATH mission) set(LIB_ETL_PATH ${THIRD_PARTY_FOLDER}/etl) set(LIB_CATCH2_PATH ${THIRD_PARTY_FOLDER}/Catch2) set(LIB_LWGPS_PATH ${THIRD_PARTY_FOLDER}/lwgps) -set(LIB_ARCSEC_PATH ${THIRD_PARTY_FOLDER}/arcsec_star_tracker) +set(LIB_ARCSEC_PATH ${THIRD_PARTY_FOLDER}/sagittactl) set(LIB_JSON_PATH ${THIRD_PARTY_FOLDER}/json) set(FSFW_WARNING_SHADOW_LOCAL_GCC OFF) diff --git a/linux/acs/StrComHandler.h b/linux/acs/StrComHandler.h index 385e8b2e..d8542f26 100644 --- a/linux/acs/StrComHandler.h +++ b/linux/acs/StrComHandler.h @@ -11,8 +11,6 @@ #include "bsp_q7s/fs/SdCardManager.h" #endif -#include "arcsec/client/generated/actionreq.h" -#include "arcsec/common/generated/tmtcstructs.h" #include "fsfw/devicehandlers/CookieIF.h" #include "fsfw/objectmanager/SystemObject.h" #include "fsfw/osal/linux/BinarySemaphore.h" @@ -20,6 +18,10 @@ #include "fsfw/tasks/ExecutableObjectIF.h" #include "fsfw_hal/linux/serial/SerialComIF.h" +extern "C" { +#include +} + /** * @brief Helper class for the star tracker handler to accelerate large data transfers. * diff --git a/mission/acs/str/ArcsecDatalinkLayer.cpp b/mission/acs/str/ArcsecDatalinkLayer.cpp index 532c12b8..e192be2e 100644 --- a/mission/acs/str/ArcsecDatalinkLayer.cpp +++ b/mission/acs/str/ArcsecDatalinkLayer.cpp @@ -1,4 +1,8 @@ -#include +#include "ArcsecDatalinkLayer.h" + +extern "C" { +#include +} ArcsecDatalinkLayer::ArcsecDatalinkLayer() : decodeRingBuf(BUFFER_LENGTHS, true) { slipInit(); } @@ -18,13 +22,10 @@ ReturnValue_t ArcsecDatalinkLayer::checkRingBufForFrame(const uint8_t** decodedF case ARC_DEC_INPROGRESS: { break; } - case ARC_DEC_ERROR_FRAME_SHORT: { + case ARC_DEC_ERROR: { decodeRingBuf.deleteData(idx); - return REPLY_TOO_SHORT; + return returnvalue::FAILED; } - case ARC_DEC_ERROR_CHECKSUM: - decodeRingBuf.deleteData(idx); - return CRC_FAILURE; case ARC_DEC_ASYNC: case ARC_DEC_SYNC: { // Reset length of SLIP struct for next frame diff --git a/mission/acs/str/ArcsecDatalinkLayer.h b/mission/acs/str/ArcsecDatalinkLayer.h index 404d9e52..b1a7fd94 100644 --- a/mission/acs/str/ArcsecDatalinkLayer.h +++ b/mission/acs/str/ArcsecDatalinkLayer.h @@ -5,10 +5,13 @@ #include #include -#include "arcsec/common/misc.h" #include "eive/resultClassIds.h" #include "fsfw/returnvalues/returnvalue.h" +extern "C" { +#include +} + /** * @brief Helper class to handle the datalinklayer of replies from the star tracker of arcsec. */ diff --git a/mission/acs/str/ArcsecJsonParamBase.cpp b/mission/acs/str/ArcsecJsonParamBase.cpp index b5dd2150..6bdaa505 100644 --- a/mission/acs/str/ArcsecJsonParamBase.cpp +++ b/mission/acs/str/ArcsecJsonParamBase.cpp @@ -1,7 +1,11 @@ +#include "arcsecJsonKeys.h" + #include #include -#include "arcsecJsonKeys.h" +extern "C" { +#include +} ArcsecJsonParamBase::ArcsecJsonParamBase(std::string setName) : setName(setName) {} diff --git a/mission/acs/str/ArcsecJsonParamBase.h b/mission/acs/str/ArcsecJsonParamBase.h index 90c54f45..4c4a7a90 100644 --- a/mission/acs/str/ArcsecJsonParamBase.h +++ b/mission/acs/str/ArcsecJsonParamBase.h @@ -7,8 +7,6 @@ #include #include -#include "arcsec/common/generated/tmtcstructs.h" -#include "arcsec/common/genericstructs.h" #include "eive/resultClassIds.h" #include "fsfw/returnvalues/returnvalue.h" diff --git a/mission/acs/str/StarTrackerHandler.cpp b/mission/acs/str/StarTrackerHandler.cpp index 3837d9e5..b449c036 100644 --- a/mission/acs/str/StarTrackerHandler.cpp +++ b/mission/acs/str/StarTrackerHandler.cpp @@ -1,18 +1,19 @@ -#include -#include -#include #include #include #include #include #include +#include +#include +#include + #include #include #include #include "OBSWConfig.h" -#include "arcsec/common/misc.h" +//#include "/common/misc.h" std::atomic_bool JCFG_DONE(false); diff --git a/mission/acs/str/StarTrackerHandler.h b/mission/acs/str/StarTrackerHandler.h index f143a660..4b8ba449 100644 --- a/mission/acs/str/StarTrackerHandler.h +++ b/mission/acs/str/StarTrackerHandler.h @@ -10,7 +10,7 @@ #include #include "OBSWConfig.h" -#include "arcsec/common/SLIP.h" +#include "common/SLIP.h" #include "devices/powerSwitcherList.h" #include "fsfw/devicehandlers/DeviceHandlerBase.h" #include "fsfw/src/fsfw/serialize/SerializeAdapter.h" diff --git a/thirdparty/CMakeLists.txt b/thirdparty/CMakeLists.txt index e300cd11..3a5110c9 100644 --- a/thirdparty/CMakeLists.txt +++ b/thirdparty/CMakeLists.txt @@ -4,7 +4,8 @@ endif() # Dependency on proprietary library if(TGT_BSP MATCHES "arm/q7s") - add_subdirectory(arcsec_star_tracker) + # Only add required folder for wire library. + add_subdirectory(sagittactl/wire) endif() add_subdirectory(rapidcsv) diff --git a/thirdparty/arcsec_star_tracker b/thirdparty/arcsec_star_tracker deleted file mode 160000 index 2823952e..00000000 --- a/thirdparty/arcsec_star_tracker +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 2823952e0902726e6e35dd7c159761f76bf7e505 From 3ff8c6a481bc82116300f3a9dc334bd1139e0f2d Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Thu, 13 Apr 2023 17:58:36 +0200 Subject: [PATCH 2/5] re-add str submodule --- .gitmodules | 3 +++ thirdparty/sagittactl | 1 + 2 files changed, 4 insertions(+) create mode 160000 thirdparty/sagittactl diff --git a/.gitmodules b/.gitmodules index 2bcea610..e1ea03a4 100644 --- a/.gitmodules +++ b/.gitmodules @@ -19,3 +19,6 @@ [submodule "thirdparty/gomspace-sw"] path = thirdparty/gomspace-sw url = https://egit.irs.uni-stuttgart.de/eive/gomspace-sw.git +[submodule "thirdparty/sagittactl"] + path = thirdparty/sagittactl + url = https://egit.irs.uni-stuttgart.de/eive/sagittactl.git diff --git a/thirdparty/sagittactl b/thirdparty/sagittactl new file mode 160000 index 00000000..3ab9b2cf --- /dev/null +++ b/thirdparty/sagittactl @@ -0,0 +1 @@ +Subproject commit 3ab9b2cf56dea1cf19c7d46eb88a967939968acd From 29dc684455fc107feb9acce763931849b6c0dbcc Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Thu, 13 Apr 2023 18:09:02 +0200 Subject: [PATCH 3/5] update done, compiles again --- mission/acs/str/ArcsecDatalinkLayer.cpp | 2 +- mission/acs/str/ArcsecDatalinkLayer.h | 2 +- mission/acs/str/ArcsecJsonParamBase.cpp | 2 +- mission/acs/str/StarTrackerHandler.cpp | 7 +++---- mission/acs/str/StarTrackerHandler.h | 5 ++++- thirdparty/sagittactl | 2 +- 6 files changed, 11 insertions(+), 9 deletions(-) diff --git a/mission/acs/str/ArcsecDatalinkLayer.cpp b/mission/acs/str/ArcsecDatalinkLayer.cpp index e192be2e..d67f6e75 100644 --- a/mission/acs/str/ArcsecDatalinkLayer.cpp +++ b/mission/acs/str/ArcsecDatalinkLayer.cpp @@ -1,7 +1,7 @@ #include "ArcsecDatalinkLayer.h" extern "C" { -#include +#include } ArcsecDatalinkLayer::ArcsecDatalinkLayer() : decodeRingBuf(BUFFER_LENGTHS, true) { slipInit(); } diff --git a/mission/acs/str/ArcsecDatalinkLayer.h b/mission/acs/str/ArcsecDatalinkLayer.h index b1a7fd94..1453e517 100644 --- a/mission/acs/str/ArcsecDatalinkLayer.h +++ b/mission/acs/str/ArcsecDatalinkLayer.h @@ -9,7 +9,7 @@ #include "fsfw/returnvalues/returnvalue.h" extern "C" { -#include +#include } /** diff --git a/mission/acs/str/ArcsecJsonParamBase.cpp b/mission/acs/str/ArcsecJsonParamBase.cpp index 6bdaa505..ff1f59d2 100644 --- a/mission/acs/str/ArcsecJsonParamBase.cpp +++ b/mission/acs/str/ArcsecJsonParamBase.cpp @@ -4,7 +4,7 @@ #include extern "C" { -#include +#include } ArcsecJsonParamBase::ArcsecJsonParamBase(std::string setName) : setName(setName) {} diff --git a/mission/acs/str/StarTrackerHandler.cpp b/mission/acs/str/StarTrackerHandler.cpp index b449c036..54af25da 100644 --- a/mission/acs/str/StarTrackerHandler.cpp +++ b/mission/acs/str/StarTrackerHandler.cpp @@ -4,16 +4,15 @@ #include #include -#include -#include -#include +extern "C" { +#include +} #include #include #include #include "OBSWConfig.h" -//#include "/common/misc.h" std::atomic_bool JCFG_DONE(false); diff --git a/mission/acs/str/StarTrackerHandler.h b/mission/acs/str/StarTrackerHandler.h index 4b8ba449..ea46cb43 100644 --- a/mission/acs/str/StarTrackerHandler.h +++ b/mission/acs/str/StarTrackerHandler.h @@ -10,12 +10,15 @@ #include #include "OBSWConfig.h" -#include "common/SLIP.h" #include "devices/powerSwitcherList.h" #include "fsfw/devicehandlers/DeviceHandlerBase.h" #include "fsfw/src/fsfw/serialize/SerializeAdapter.h" #include "fsfw/timemanager/Countdown.h" +extern "C" { +#include +} + /** * @brief This is the device handler for the star tracker from arcsec. * diff --git a/thirdparty/sagittactl b/thirdparty/sagittactl index 3ab9b2cf..64332216 160000 --- a/thirdparty/sagittactl +++ b/thirdparty/sagittactl @@ -1 +1 @@ -Subproject commit 3ab9b2cf56dea1cf19c7d46eb88a967939968acd +Subproject commit 64332216c193fa6483258060b53fc2842c08dcf4 From 2722e471ef08a35196f6d8267e65b1e1b0950c39 Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Thu, 13 Apr 2023 18:14:30 +0200 Subject: [PATCH 4/5] changelog --- CHANGELOG.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 12abd808..83224fae 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -17,6 +17,7 @@ will consitute of a breaking change warranting a new major release: # [unreleased] - q7s-package: v2.5.0 +- STR firmware was updated to v10.3 ## Fixed @@ -24,6 +25,10 @@ will consitute of a breaking change warranting a new major release: - Bugfix for STR firmware update procedure where the last remaining bytes were not written properly. +## Changed + +- STR `wire` library updated to v10.3. Submodule renamed to `sagittactl`. + ## Added - Add a way for the MAX31865 RTD handlers to recognize faulty/broken/off sensor devices. @@ -31,6 +36,7 @@ will consitute of a breaking change warranting a new major release: - Allow setting the preferred SD card via the new parameter interface of the core controller with domain ID 0 and unque ID 0. + # [v1.44.1] 2023-04-12 - eive-tmtc: v2.22.1 From 3e3ac9f5befeafa3b24dcd2f849b364aa40fd2e2 Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Thu, 13 Apr 2023 21:14:38 +0200 Subject: [PATCH 5/5] conditional build of STR components --- linux/acs/CMakeLists.txt | 10 +++++++--- linux/acs/StrComHandler.cpp | 2 +- mission/acs/str/ArcsecJsonParamBase.cpp | 4 ++-- unittest/controller/testThermalController.cpp | 4 ++-- 4 files changed, 12 insertions(+), 8 deletions(-) diff --git a/linux/acs/CMakeLists.txt b/linux/acs/CMakeLists.txt index 99cacbc2..5b5b5ac8 100644 --- a/linux/acs/CMakeLists.txt +++ b/linux/acs/CMakeLists.txt @@ -1,6 +1,10 @@ -target_sources( - ${OBSW_NAME} PUBLIC AcsBoardPolling.cpp ImtqPollingTask.cpp RwPollingTask.cpp - SusPolling.cpp StrComHandler.cpp) +target_sources(${OBSW_NAME} PUBLIC AcsBoardPolling.cpp ImtqPollingTask.cpp + RwPollingTask.cpp SusPolling.cpp) + +# Dependency on proprietary library +if(TGT_BSP MATCHES "arm/q7s") + target_sources(${OBSW_NAME} PUBLIC StrComHandler.cpp) +endif() if(EIVE_BUILD_GPSD_GPS_HANDLER) target_sources(${OBSW_NAME} PRIVATE GpsHyperionLinuxController.cpp) diff --git a/linux/acs/StrComHandler.cpp b/linux/acs/StrComHandler.cpp index 3c88a71b..51c66f18 100644 --- a/linux/acs/StrComHandler.cpp +++ b/linux/acs/StrComHandler.cpp @@ -451,7 +451,7 @@ ReturnValue_t StrComHandler::performFlashWrite() { return returnvalue::OK; } result = writeNextSegment(idx); - if(result != returnvalue::OK) { + if (result != returnvalue::OK) { return result; } if (idx % 50 == 0) { diff --git a/mission/acs/str/ArcsecJsonParamBase.cpp b/mission/acs/str/ArcsecJsonParamBase.cpp index ff1f59d2..58c54d30 100644 --- a/mission/acs/str/ArcsecJsonParamBase.cpp +++ b/mission/acs/str/ArcsecJsonParamBase.cpp @@ -1,8 +1,8 @@ -#include "arcsecJsonKeys.h" - #include #include +#include "arcsecJsonKeys.h" + extern "C" { #include } diff --git a/unittest/controller/testThermalController.cpp b/unittest/controller/testThermalController.cpp index 0e12d94d..c2166ca0 100644 --- a/unittest/controller/testThermalController.cpp +++ b/unittest/controller/testThermalController.cpp @@ -47,8 +47,8 @@ TEST_CASE("Thermal Controller", "[ThermalController]") { CommandMessage modeMessage; - ModeMessage::setModeMessage(&modeMessage, ModeMessage::CMD_MODE_COMMAND, - HasModesIF::MODE_ON, HasModesIF::SUBMODE_NONE); + ModeMessage::setModeMessage(&modeMessage, ModeMessage::CMD_MODE_COMMAND, HasModesIF::MODE_ON, + HasModesIF::SUBMODE_NONE); MessageQueueIF* commandQueue = QueueFactory::instance()->createMessageQueue(5, MessageQueueMessage::MAX_MESSAGE_SIZE);