From fcda3bd2ea03e1b8739ec914ffa451f1c09ef00b Mon Sep 17 00:00:00 2001 From: "Robin.Mueller" Date: Fri, 5 Mar 2021 18:55:58 +0100 Subject: [PATCH 1/5] fsfw update --- fsfw | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fsfw b/fsfw index 92f249dc..91f69aa3 160000 --- a/fsfw +++ b/fsfw @@ -1 +1 @@ -Subproject commit 92f249dc62cf02a5052fee4e9877bc89b2be1ab5 +Subproject commit 91f69aa34fcdde9d3f6ae1a71e72a084bf3bc49d -- 2.43.0 From 6cc071f8ee9771e6c3d0c581baae1166a28d9d26 Mon Sep 17 00:00:00 2001 From: "Robin.Mueller" Date: Fri, 5 Mar 2021 19:17:03 +0100 Subject: [PATCH 2/5] removed make launch configs and updated shell scripts --- bsp_hosted/fsfwconfig/OBSWVersion.h | 4 +-- cmake/scripts/Linux/create_cmake_debug_cfg.sh | 7 +++- .../scripts/Linux/create_cmake_release_cfg.sh | 7 +++- .../Linux/create_cmake_relwithdeb_cfg.sh | 7 +++- .../Host/eive-linux-host-debug-cmake.launch | 2 +- .../make/Host/eive-linux-host-debug.launch | 33 ------------------- .../Host/eive-linux-host-release-cmake.launch | 33 ------------------- .../make/Host/eive-linux-host-release.launch | 33 ------------------- .../eclipse/make/Host/eive-mingw-debug.launch | 33 ------------------- .../make/Host/eive-mingw-release.launch | 33 ------------------- test/testtasks/TestTask.cpp | 2 +- 11 files changed, 22 insertions(+), 172 deletions(-) delete mode 100644 misc/eclipse/make/Host/eive-linux-host-debug.launch delete mode 100644 misc/eclipse/make/Host/eive-linux-host-release-cmake.launch delete mode 100644 misc/eclipse/make/Host/eive-linux-host-release.launch delete mode 100644 misc/eclipse/make/Host/eive-mingw-debug.launch delete mode 100644 misc/eclipse/make/Host/eive-mingw-release.launch diff --git a/bsp_hosted/fsfwconfig/OBSWVersion.h b/bsp_hosted/fsfwconfig/OBSWVersion.h index e1afa204..980b6965 100644 --- a/bsp_hosted/fsfwconfig/OBSWVersion.h +++ b/bsp_hosted/fsfwconfig/OBSWVersion.h @@ -3,8 +3,8 @@ const char* const SW_NAME = "eive"; -#define SW_VERSION 0 -#define SW_SUBVERSION 2 +#define SW_VERSION 1 +#define SW_SUBVERSION 0 #define SW_SUBSUBVERSION 0 diff --git a/cmake/scripts/Linux/create_cmake_debug_cfg.sh b/cmake/scripts/Linux/create_cmake_debug_cfg.sh index 5dff0fc7..1f75c12a 100755 --- a/cmake/scripts/Linux/create_cmake_debug_cfg.sh +++ b/cmake/scripts/Linux/create_cmake_debug_cfg.sh @@ -16,5 +16,10 @@ fi build_generator="Unix Makefiles" os_fsfw="linux" +builddir="Debug-Linux" -python3 cmake_build_config.py -o "${os_fsfw}" -g "${build_generator}" -b "debug" +echo "Running command (without the leading +):" +set -x # Print command +python3 cmake_build_config.py -o "${os_fsfw}" -g "${build_generator}" -b "debug" -l "${builddir}" +# Use this if commands are added which should not be printed +# set +x diff --git a/cmake/scripts/Linux/create_cmake_release_cfg.sh b/cmake/scripts/Linux/create_cmake_release_cfg.sh index 914c4581..ffd85ae7 100755 --- a/cmake/scripts/Linux/create_cmake_release_cfg.sh +++ b/cmake/scripts/Linux/create_cmake_release_cfg.sh @@ -16,5 +16,10 @@ fi build_generator="Unix Makefiles" os_fsfw="linux" +builddir="Release-Linux" -python3 cmake_build_config.py -o "${os_fsfw}" -g "${build_generator}" -b "release" +echo "Running command (without the leading +):" +set -x # Print command +python3 cmake_build_config.py -o "${os_fsfw}" -g "${build_generator}" -b "debug" -l "${builddir}" +# Use this if commands are added which should not be printed +# set +x diff --git a/cmake/scripts/Linux/create_cmake_relwithdeb_cfg.sh b/cmake/scripts/Linux/create_cmake_relwithdeb_cfg.sh index 3414d111..31376322 100755 --- a/cmake/scripts/Linux/create_cmake_relwithdeb_cfg.sh +++ b/cmake/scripts/Linux/create_cmake_relwithdeb_cfg.sh @@ -16,5 +16,10 @@ fi build_generator="Unix Makefiles" os_fsfw="linux" +builddir="RelWithDeb-Linux" -python3 cmake_build_config.py -o "${os_fsfw}" -g "${build_generator}" -b "reldeb" +echo "Running command (without the leading +):" +set -x # Print command +python3 cmake_build_config.py -o "${os_fsfw}" -g "${build_generator}" -b "debug" -l "${builddir}" +# Use this if commands are added which should not be printed +# set +x diff --git a/misc/eclipse/Host/eive-linux-host-debug-cmake.launch b/misc/eclipse/Host/eive-linux-host-debug-cmake.launch index e79e2e8d..268bdf33 100644 --- a/misc/eclipse/Host/eive-linux-host-debug-cmake.launch +++ b/misc/eclipse/Host/eive-linux-host-debug-cmake.launch @@ -18,7 +18,7 @@ - + diff --git a/misc/eclipse/make/Host/eive-linux-host-debug.launch b/misc/eclipse/make/Host/eive-linux-host-debug.launch deleted file mode 100644 index f5ab1ac7..00000000 --- a/misc/eclipse/make/Host/eive-linux-host-debug.launch +++ /dev/null @@ -1,33 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/misc/eclipse/make/Host/eive-linux-host-release-cmake.launch b/misc/eclipse/make/Host/eive-linux-host-release-cmake.launch deleted file mode 100644 index f2647a4f..00000000 --- a/misc/eclipse/make/Host/eive-linux-host-release-cmake.launch +++ /dev/null @@ -1,33 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/misc/eclipse/make/Host/eive-linux-host-release.launch b/misc/eclipse/make/Host/eive-linux-host-release.launch deleted file mode 100644 index 7548f831..00000000 --- a/misc/eclipse/make/Host/eive-linux-host-release.launch +++ /dev/null @@ -1,33 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/misc/eclipse/make/Host/eive-mingw-debug.launch b/misc/eclipse/make/Host/eive-mingw-debug.launch deleted file mode 100644 index 4ab7b736..00000000 --- a/misc/eclipse/make/Host/eive-mingw-debug.launch +++ /dev/null @@ -1,33 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/misc/eclipse/make/Host/eive-mingw-release.launch b/misc/eclipse/make/Host/eive-mingw-release.launch deleted file mode 100644 index da2f47a9..00000000 --- a/misc/eclipse/make/Host/eive-mingw-release.launch +++ /dev/null @@ -1,33 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/test/testtasks/TestTask.cpp b/test/testtasks/TestTask.cpp index 57abc758..86f4af38 100644 --- a/test/testtasks/TestTask.cpp +++ b/test/testtasks/TestTask.cpp @@ -68,7 +68,7 @@ gps_rx_data[] = "" ReturnValue_t TestTask::performOneShotAction() { #if OBSW_ADD_TEST_CODE == 1 - performLwgpsTest(); + //performLwgpsTest(); #endif return HasReturnvaluesIF::RETURN_OK; } -- 2.43.0 From a6504e941dad13d325dda310f890bab45d28f616 Mon Sep 17 00:00:00 2001 From: "Robin.Mueller" Date: Fri, 5 Mar 2021 19:31:45 +0100 Subject: [PATCH 3/5] adaptions for fsfw api changes --- bsp_q7s/devices/HeaterHandler.cpp | 28 ++++++++++++++----- .../devices/SolarArrayDeploymentHandler.cpp | 8 +++--- fsfw | 2 +- mission/devices/GyroL3GD20Handler.cpp | 4 +-- mission/devices/MGMHandlerLIS3MDL.cpp | 4 +-- mission/devices/PCDUHandler.cpp | 4 +-- 6 files changed, 32 insertions(+), 18 deletions(-) diff --git a/bsp_q7s/devices/HeaterHandler.cpp b/bsp_q7s/devices/HeaterHandler.cpp index ccf5b65c..9a44c57b 100644 --- a/bsp_q7s/devices/HeaterHandler.cpp +++ b/bsp_q7s/devices/HeaterHandler.cpp @@ -201,8 +201,8 @@ void HeaterHandler::handleSwitchOnCommand(HeaterMapIter heaterMapIter) { heaterMapIter->second.active = false; heaterMapIter->second.waitMainSwitchOn = false; if (heaterMapIter->second.replyQueue != commandQueue->getId()) { - actionHelper.finish(heaterMapIter->second.replyQueue, heaterMapIter->second.action, - MAIN_SWITCH_SET_TIMEOUT ); + actionHelper.finish(false, heaterMapIter->second.replyQueue, + heaterMapIter->second.action, MAIN_SWITCH_SET_TIMEOUT ); } return; } @@ -229,8 +229,15 @@ void HeaterHandler::handleSwitchOnCommand(HeaterMapIter heaterMapIter) { /* There is no need to send action finish replies if the sender was the * HeaterHandler itself. */ if (heaterMapIter->second.replyQueue != commandQueue->getId()) { - actionHelper.finish(heaterMapIter->second.replyQueue, - heaterMapIter->second.action, result); + if(result == RETURN_OK) { + actionHelper.finish(true, heaterMapIter->second.replyQueue, + heaterMapIter->second.action, result); + } + else { + actionHelper.finish(false, heaterMapIter->second.replyQueue, + heaterMapIter->second.action, result); + } + } heaterMapIter->second.active = false; heaterMapIter->second.waitMainSwitchOn = false; @@ -250,7 +257,7 @@ void HeaterHandler::handleSwitchOnCommand(HeaterMapIter heaterMapIter) { sif::debug << "HeaterHandler::handleActiveCommands: Failed to get state of" << " main line switch" << std::endl; if (heaterMapIter->second.replyQueue != commandQueue->getId()) { - actionHelper.finish(heaterMapIter->second.replyQueue, + actionHelper.finish(false, heaterMapIter->second.replyQueue, heaterMapIter->second.action, mainSwitchState); } heaterMapIter->second.active = false; @@ -282,8 +289,15 @@ void HeaterHandler::handleSwitchOffCommand(HeaterMapIter heaterMapIter) { triggerEvent(SWITCH_ALREADY_OFF, switchNr); } if (heaterMapIter->second.replyQueue != NO_COMMANDER) { - actionHelper.finish(heaterMapIter->second.replyQueue, - heaterMapIter->second.action, result); + /* Report back switch command reply if necessary */ + if(result == HasReturnvaluesIF::RETURN_OK) { + actionHelper.finish(true, heaterMapIter->second.replyQueue, + heaterMapIter->second.action, result); + } + else { + actionHelper.finish(false, heaterMapIter->second.replyQueue, + heaterMapIter->second.action, result); + } } heaterMapIter->second.active = false; } diff --git a/bsp_q7s/devices/SolarArrayDeploymentHandler.cpp b/bsp_q7s/devices/SolarArrayDeploymentHandler.cpp index 80d941bf..d307ef15 100644 --- a/bsp_q7s/devices/SolarArrayDeploymentHandler.cpp +++ b/bsp_q7s/devices/SolarArrayDeploymentHandler.cpp @@ -108,7 +108,7 @@ void SolarArrayDeploymentHandler::performWaitOn8VActions() { } else { if (mainSwitchCountdown.hasTimedOut()) { triggerEvent(MAIN_SWITCH_ON_TIMEOUT); - actionHelper.finish(rememberCommanderId, DEPLOY_SOLAR_ARRAYS, + actionHelper.finish(false, rememberCommanderId, DEPLOY_SOLAR_ARRAYS, MAIN_SWITCH_TIMEOUT_FAILURE); stateMachine = WAIT_ON_DELOYMENT_COMMAND; } @@ -125,7 +125,7 @@ void SolarArrayDeploymentHandler::switchDeploymentTransistors() { * the deployment sequence. */ stateMachine = WAIT_ON_DELOYMENT_COMMAND; triggerEvent(DEPL_SA1_GPIO_SWTICH_ON_FAILED); - actionHelper.finish(rememberCommanderId, DEPLOY_SOLAR_ARRAYS, + actionHelper.finish(false, rememberCommanderId, DEPLOY_SOLAR_ARRAYS, SWITCHING_DEPL_SA2_FAILED); mainLineSwitcher->sendSwitchCommand(mainLineSwitch, PowerSwitchIF::SWITCH_OFF); } @@ -135,7 +135,7 @@ void SolarArrayDeploymentHandler::switchDeploymentTransistors() { " array deployment switch 2 high " << std::endl; stateMachine = WAIT_ON_DELOYMENT_COMMAND; triggerEvent(DEPL_SA2_GPIO_SWTICH_ON_FAILED); - actionHelper.finish(rememberCommanderId, DEPLOY_SOLAR_ARRAYS, + actionHelper.finish(false, rememberCommanderId, DEPLOY_SOLAR_ARRAYS, SWITCHING_DEPL_SA2_FAILED); mainLineSwitcher->sendSwitchCommand(mainLineSwitch, PowerSwitchIF::SWITCH_OFF); } @@ -146,7 +146,7 @@ void SolarArrayDeploymentHandler::switchDeploymentTransistors() { void SolarArrayDeploymentHandler::handleDeploymentFinish() { ReturnValue_t result = RETURN_OK; if (deploymentCountdown.hasTimedOut()) { - actionHelper.finish(rememberCommanderId, DEPLOY_SOLAR_ARRAYS, RETURN_OK); + actionHelper.finish(true, rememberCommanderId, DEPLOY_SOLAR_ARRAYS, RETURN_OK); result = gpioInterface->pullLow(deplSA1); if (result != RETURN_OK) { sif::debug << "SolarArrayDeploymentHandler::handleStateMachine: Failed to pull solar" diff --git a/fsfw b/fsfw index 91f69aa3..18e40d62 160000 --- a/fsfw +++ b/fsfw @@ -1 +1 @@ -Subproject commit 91f69aa34fcdde9d3f6ae1a71e72a084bf3bc49d +Subproject commit 18e40d62481e6c2547eb108114f1f124a25ccb9b diff --git a/mission/devices/GyroL3GD20Handler.cpp b/mission/devices/GyroL3GD20Handler.cpp index 28cbdbed..997ec129 100644 --- a/mission/devices/GyroL3GD20Handler.cpp +++ b/mission/devices/GyroL3GD20Handler.cpp @@ -1,5 +1,5 @@ #include -#include +#include GyroHandler::GyroHandler(object_id_t objectId, object_id_t deviceCommunication, CookieIF *comCookie): @@ -172,7 +172,7 @@ ReturnValue_t GyroHandler::interpretDeviceReply(DeviceCommandId_t id, int8_t temperaturOffset = (-1) * packet[L3GD20H::TEMPERATURE_IDX]; float temperature = 25.0 + temperaturOffset; - PoolReadHelper readSet(&dataset); + PoolReadGuard readSet(&dataset); if(readSet.getReadResult() == HasReturnvaluesIF::RETURN_OK) { dataset.angVelocX = angVelocX; dataset.angVelocY = angVelocY; diff --git a/mission/devices/MGMHandlerLIS3MDL.cpp b/mission/devices/MGMHandlerLIS3MDL.cpp index 6eb7f5d4..d2573f73 100644 --- a/mission/devices/MGMHandlerLIS3MDL.cpp +++ b/mission/devices/MGMHandlerLIS3MDL.cpp @@ -1,6 +1,6 @@ -#include #include "MGMHandlerLIS3MDL.h" +#include MGMHandlerLIS3MDL::MGMHandlerLIS3MDL(object_id_t objectId, object_id_t deviceCommunication, CookieIF* comCookie): @@ -299,7 +299,7 @@ ReturnValue_t MGMHandlerLIS3MDL::interpretDeviceReply(DeviceCommandId_t id, #endif } #endif - PoolReadHelper readHelper(&dataset); + PoolReadGuard readHelper(&dataset); if(readHelper.getReadResult() == HasReturnvaluesIF::RETURN_OK) { dataset.fieldStrengthX = mgmX; dataset.fieldStrengthY = mgmY; diff --git a/mission/devices/PCDUHandler.cpp b/mission/devices/PCDUHandler.cpp index 8e2c1a39..5812c8bf 100644 --- a/mission/devices/PCDUHandler.cpp +++ b/mission/devices/PCDUHandler.cpp @@ -49,7 +49,7 @@ ReturnValue_t PCDUHandler::initialize() { sif::error << "PCDUHandler::initialize: Invalid pdu2Handler" << std::endl; return RETURN_FAILED; } - result = pdu2Handler->getSubscriptionInterface()->subscribeForSetUpdateMessages( + result = pdu2Handler->getSubscriptionInterface()->subscribeForSetUpdateMessage( PDU2::HK_TABLE_DATA_SET_ID, this->getObjectId(), commandQueue->getId(), true); if (result != RETURN_OK) { sif::error << "PCDUHandler::initialize: Failed to subscribe for set update messages from " @@ -63,7 +63,7 @@ ReturnValue_t PCDUHandler::initialize() { sif::error << "PCDUHandler::initialize: Invalid pdu1Handler" << std::endl; return RETURN_FAILED; } - result = pdu1Handler->getSubscriptionInterface()->subscribeForSetUpdateMessages( + result = pdu1Handler->getSubscriptionInterface()->subscribeForSetUpdateMessage( PDU1::HK_TABLE_DATA_SET_ID, this->getObjectId(), commandQueue->getId(), true); if (result != RETURN_OK) { sif::error << "PCDUHandler::initialize: Failed to subscribe for set update messages from " -- 2.43.0 From 57d46ca6127d5fe28680d2660b2924551ea2ccff Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Fri, 5 Mar 2021 21:12:57 +0100 Subject: [PATCH 4/5] fsfw update --- fsfw | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fsfw b/fsfw index 18e40d62..d57955ad 160000 --- a/fsfw +++ b/fsfw @@ -1 +1 @@ -Subproject commit 18e40d62481e6c2547eb108114f1f124a25ccb9b +Subproject commit d57955ade7944ccd895606f244ebd88f3e710eb0 -- 2.43.0 From 602097f1ed8b176a410e0ba08559f50775aeadda Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Fri, 5 Mar 2021 21:47:44 +0100 Subject: [PATCH 5/5] lwgps --- thirdparty/lwgps | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/thirdparty/lwgps b/thirdparty/lwgps index d276f972..3dbfe390 160000 --- a/thirdparty/lwgps +++ b/thirdparty/lwgps @@ -1 +1 @@ -Subproject commit d276f9722d1311b552e7c99ee5b03a68487a0fc5 +Subproject commit 3dbfe390a6784ebc723d3907062cf883c8cf85cd -- 2.43.0