From a14af7f7287d29054122cced67131cfc6187129c Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Sun, 17 Apr 2022 01:04:53 +0200 Subject: [PATCH] update path setter --- bsp_q7s/core/CoreController.cpp | 12 +++++++----- mission/devices/IMTQHandler.cpp | 4 ++-- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/bsp_q7s/core/CoreController.cpp b/bsp_q7s/core/CoreController.cpp index 6fe1d469..208999c2 100644 --- a/bsp_q7s/core/CoreController.cpp +++ b/bsp_q7s/core/CoreController.cpp @@ -29,7 +29,9 @@ xsc::Chip CoreController::CURRENT_CHIP = xsc::Chip::NO_CHIP; xsc::Copy CoreController::CURRENT_COPY = xsc::Copy::NO_COPY; CoreController::CoreController(object_id_t objectId) - : ExtendedControllerBase(objectId, objects::NO_OBJECT, 5), opDivider5(5), opDivider10(10), + : ExtendedControllerBase(objectId, objects::NO_OBJECT, 5), + opDivider5(5), + opDivider10(10), hkSet(this) { ReturnValue_t result = HasReturnvaluesIF::RETURN_OK; try { @@ -144,7 +146,7 @@ ReturnValue_t CoreController::initializeAfterTaskCreation() { } // Add script folder to path char *currentEnvPath = getenv("PATH"); - std::string updatedEnvPath = std::string(currentEnvPath) + ":/home/root/scripts"; + std::string updatedEnvPath = std::string(currentEnvPath) + ":/home/root/scripts:/usr/local/bin"; setenv("PATH", updatedEnvPath.c_str(), true); updateProtInfo(); initPrint(); @@ -1697,7 +1699,7 @@ void CoreController::setRebootMechanismLock(bool lock, xsc::Chip tgtChip, xsc::C ReturnValue_t CoreController::timeFileHandler() { // Always set time. We could only set it if it is updated by GPS, but then the backup time would // become obsolete on GPS problems. - if(opDivider10.check()) { + if (opDivider10.check()) { // It is assumed that the system time is set from the GPS time timeval currentTime = {}; ReturnValue_t result = Clock::getClock_timeval(¤tTime); @@ -1707,8 +1709,8 @@ ReturnValue_t CoreController::timeFileHandler() { std::string fileName = currMntPrefix + TIME_FILE; std::ofstream timeFile(fileName); if (not timeFile.good()) { - sif::error << "CoreController::timeFileHandler: Error opening time file: " << - strerror(errno) << std::endl; + sif::error << "CoreController::timeFileHandler: Error opening time file: " << strerror(errno) + << std::endl; return RETURN_FAILED; } timeFile << "UNIX SECONDS: " << currentTime.tv_sec << std::endl; diff --git a/mission/devices/IMTQHandler.cpp b/mission/devices/IMTQHandler.cpp index 2b3ba240..ad6beb0a 100644 --- a/mission/devices/IMTQHandler.cpp +++ b/mission/devices/IMTQHandler.cpp @@ -10,7 +10,6 @@ IMTQHandler::IMTQHandler(object_id_t objectId, object_id_t comIF, CookieIF* comCookie, power::Switch_t pwrSwitcher) : DeviceHandlerBase(objectId, comIF, comCookie), - switcher(pwrSwitcher), engHkDataset(this), calMtmMeasurementSet(this), rawMtmMeasurementSet(this), @@ -19,7 +18,8 @@ IMTQHandler::IMTQHandler(object_id_t objectId, object_id_t comIF, CookieIF* comC posYselfTestDataset(this), negYselfTestDataset(this), posZselfTestDataset(this), - negZselfTestDataset(this) { + negZselfTestDataset(this), + switcher(pwrSwitcher) { if (comCookie == NULL) { sif::error << "IMTQHandler: Invalid com cookie" << std::endl; }