Merge branch 'acs-flp-safe' of https://egit.irs.uni-stuttgart.de/eive/eive-obsw into acs-flp-safe
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
This commit is contained in:
commit
2d19d94d09
11
CHANGELOG.md
11
CHANGELOG.md
@ -17,7 +17,7 @@ will consitute of a breaking change warranting a new major release:
|
|||||||
# [unreleased]
|
# [unreleased]
|
||||||
|
|
||||||
- q7s-package: v2.5.0
|
- q7s-package: v2.5.0
|
||||||
- STR firmware was updated to v10.3
|
- STR firmware was updated to v10.7. `wire` library still needs to be updated.
|
||||||
|
|
||||||
## Fixed
|
## Fixed
|
||||||
|
|
||||||
@ -27,10 +27,19 @@ will consitute of a breaking change warranting a new major release:
|
|||||||
- Bugfix for STR where an invalid reply was received for special requests
|
- Bugfix for STR where an invalid reply was received for special requests
|
||||||
like firmware updates.
|
like firmware updates.
|
||||||
- Bugfix for shell command executors in command controller which lead to a crash.
|
- Bugfix for shell command executors in command controller which lead to a crash.
|
||||||
|
- Important bugfix for STR solution set. Missing STR mode u8 parameter.
|
||||||
|
- Fix for STR image download.
|
||||||
|
- Possible fix for STR image upload.
|
||||||
|
- Fixed regression where the reply result for ACS board and SUS board devices was set to FAILED
|
||||||
|
even when going to OFF mode. In that case, it has to be set to OK so the device handler can
|
||||||
|
complete the OFF transition.
|
||||||
|
|
||||||
## Changed
|
## Changed
|
||||||
|
|
||||||
- STR `wire` library updated to v10.3. Submodule renamed to `sagittactl`.
|
- STR `wire` library updated to v10.3. Submodule renamed to `sagittactl`.
|
||||||
|
- Custom FDIR for TMP1075 sensors. The device handlers reject `NEEDS_RECOVERY` health commands
|
||||||
|
anyway, so it does not really make sense to use the default FDIR.
|
||||||
|
- Reject `NEEDS_RECOVERY` health commands for the heater health devices.
|
||||||
|
|
||||||
## Added
|
## Added
|
||||||
|
|
||||||
|
@ -369,7 +369,7 @@ ReturnValue_t CoreController::executeAction(ActionId_t actionId, MessageQueueId_
|
|||||||
return actionReboot(data, size);
|
return actionReboot(data, size);
|
||||||
}
|
}
|
||||||
case (EXECUTE_SHELL_CMD_BLOCKING): {
|
case (EXECUTE_SHELL_CMD_BLOCKING): {
|
||||||
std::string cmdToExecute = std::string(reinterpret_cast<const char*>(data), size);
|
std::string cmdToExecute = std::string(reinterpret_cast<const char *>(data), size);
|
||||||
int result = std::system(cmdToExecute.c_str());
|
int result = std::system(cmdToExecute.c_str());
|
||||||
if (result != 0) {
|
if (result != 0) {
|
||||||
// TODO: Data reply with returnalue maybe?
|
// TODO: Data reply with returnalue maybe?
|
||||||
@ -378,7 +378,7 @@ ReturnValue_t CoreController::executeAction(ActionId_t actionId, MessageQueueId_
|
|||||||
return EXECUTION_FINISHED;
|
return EXECUTION_FINISHED;
|
||||||
}
|
}
|
||||||
case (EXECUTE_SHELL_CMD_NON_BLOCKING): {
|
case (EXECUTE_SHELL_CMD_NON_BLOCKING): {
|
||||||
std::string cmdToExecute = std::string(reinterpret_cast<const char*>(data), size);
|
std::string cmdToExecute = std::string(reinterpret_cast<const char *>(data), size);
|
||||||
if (cmdExecutor.getCurrentState() == CommandExecutor::States::PENDING or
|
if (cmdExecutor.getCurrentState() == CommandExecutor::States::PENDING or
|
||||||
shellCmdIsExecuting) {
|
shellCmdIsExecuting) {
|
||||||
return HasActionsIF::IS_BUSY;
|
return HasActionsIF::IS_BUSY;
|
||||||
|
@ -27,8 +27,9 @@
|
|||||||
#include <mission/system/acs/ImtqAssembly.h>
|
#include <mission/system/acs/ImtqAssembly.h>
|
||||||
#include <mission/system/acs/StrAssembly.h>
|
#include <mission/system/acs/StrAssembly.h>
|
||||||
#include <mission/system/acs/StrFdir.h>
|
#include <mission/system/acs/StrFdir.h>
|
||||||
|
#include <mission/system/com/SyrlinksAssembly.h>
|
||||||
#include <mission/system/objects/CamSwitcher.h>
|
#include <mission/system/objects/CamSwitcher.h>
|
||||||
#include <mission/system/objects/SyrlinksAssembly.h>
|
#include <mission/system/tcs/TmpDevFdir.h>
|
||||||
|
|
||||||
#include "OBSWConfig.h"
|
#include "OBSWConfig.h"
|
||||||
#include "bsp_q7s/boardtest/Q7STestTask.h"
|
#include "bsp_q7s/boardtest/Q7STestTask.h"
|
||||||
@ -62,17 +63,15 @@
|
|||||||
#include "mission/system/acs/acsModeTree.h"
|
#include "mission/system/acs/acsModeTree.h"
|
||||||
#include "mission/system/com/SyrlinksFdir.h"
|
#include "mission/system/com/SyrlinksFdir.h"
|
||||||
#include "mission/system/com/comModeTree.h"
|
#include "mission/system/com/comModeTree.h"
|
||||||
#include "mission/system/fdir/RtdFdir.h"
|
|
||||||
#include "mission/system/objects/TcsBoardAssembly.h"
|
|
||||||
#include "mission/system/power/GomspacePowerFdir.h"
|
#include "mission/system/power/GomspacePowerFdir.h"
|
||||||
|
#include "mission/system/tcs/RtdFdir.h"
|
||||||
|
#include "mission/system/tcs/TcsBoardAssembly.h"
|
||||||
|
#include "mission/system/tcs/tcsModeTree.h"
|
||||||
#include "mission/system/tree/payloadModeTree.h"
|
#include "mission/system/tree/payloadModeTree.h"
|
||||||
#include "mission/system/tree/tcsModeTree.h"
|
|
||||||
#include "mission/tmtc/tmFilters.h"
|
#include "mission/tmtc/tmFilters.h"
|
||||||
#include "mission/utility/GlobalConfigHandler.h"
|
#include "mission/utility/GlobalConfigHandler.h"
|
||||||
#include "tmtc/pusIds.h"
|
#include "tmtc/pusIds.h"
|
||||||
|
|
||||||
using gpio::Direction;
|
|
||||||
using gpio::Levels;
|
|
||||||
#if OBSW_TEST_LIBGPIOD == 1
|
#if OBSW_TEST_LIBGPIOD == 1
|
||||||
#include "linux/boardtest/LibgpiodTest.h"
|
#include "linux/boardtest/LibgpiodTest.h"
|
||||||
#endif
|
#endif
|
||||||
@ -123,6 +122,9 @@ using gpio::Levels;
|
|||||||
#include "mission/system/acs/AcsBoardAssembly.h"
|
#include "mission/system/acs/AcsBoardAssembly.h"
|
||||||
#include "mission/tmtc/TmFunnelHandler.h"
|
#include "mission/tmtc/TmFunnelHandler.h"
|
||||||
|
|
||||||
|
using gpio::Direction;
|
||||||
|
using gpio::Levels;
|
||||||
|
|
||||||
ResetArgs RESET_ARGS_GNSS;
|
ResetArgs RESET_ARGS_GNSS;
|
||||||
std::atomic_bool LINK_STATE = CcsdsIpCoreHandler::LINK_DOWN;
|
std::atomic_bool LINK_STATE = CcsdsIpCoreHandler::LINK_DOWN;
|
||||||
std::atomic_bool PTME_LOCKED = false;
|
std::atomic_bool PTME_LOCKED = false;
|
||||||
@ -164,6 +166,7 @@ void ObjectFactory::createTmpComponents() {
|
|||||||
new I2cCookie(tmpDevIds[idx].second, TMP1075::MAX_REPLY_LENGTH, q7s::I2C_PS_EIVE));
|
new I2cCookie(tmpDevIds[idx].second, TMP1075::MAX_REPLY_LENGTH, q7s::I2C_PS_EIVE));
|
||||||
auto* tmpDevHandler =
|
auto* tmpDevHandler =
|
||||||
new Tmp1075Handler(tmpDevIds[idx].first, objects::I2C_COM_IF, tmpDevCookies[idx]);
|
new Tmp1075Handler(tmpDevIds[idx].first, objects::I2C_COM_IF, tmpDevCookies[idx]);
|
||||||
|
tmpDevHandler->setCustomFdir(new TmpDevFdir(tmpDevIds[idx].first));
|
||||||
tmpDevHandler->connectModeTreeParent(satsystem::tcs::SUBSYSTEM);
|
tmpDevHandler->connectModeTreeParent(satsystem::tcs::SUBSYSTEM);
|
||||||
// TODO: Remove this after TCS subsystem was added
|
// TODO: Remove this after TCS subsystem was added
|
||||||
// These devices are connected to the 3V3 stack and should be powered permanently. Therefore,
|
// These devices are connected to the 3V3 stack and should be powered permanently. Therefore,
|
||||||
|
@ -30,7 +30,7 @@
|
|||||||
#include <mission/system/acs/ImtqAssembly.h>
|
#include <mission/system/acs/ImtqAssembly.h>
|
||||||
#include <mission/system/acs/StrAssembly.h>
|
#include <mission/system/acs/StrAssembly.h>
|
||||||
#include <mission/system/objects/CamSwitcher.h>
|
#include <mission/system/objects/CamSwitcher.h>
|
||||||
#include <mission/system/objects/TcsBoardAssembly.h>
|
#include <mission/system/tcs/TcsBoardAssembly.h>
|
||||||
|
|
||||||
#include "TemperatureSensorInserter.h"
|
#include "TemperatureSensorInserter.h"
|
||||||
#include "dummies/Max31865Dummy.h"
|
#include "dummies/Max31865Dummy.h"
|
||||||
@ -38,8 +38,8 @@
|
|||||||
#include "mission/genericFactory.h"
|
#include "mission/genericFactory.h"
|
||||||
#include "mission/system/acs/acsModeTree.h"
|
#include "mission/system/acs/acsModeTree.h"
|
||||||
#include "mission/system/com/comModeTree.h"
|
#include "mission/system/com/comModeTree.h"
|
||||||
|
#include "mission/system/tcs/tcsModeTree.h"
|
||||||
#include "mission/system/tree/payloadModeTree.h"
|
#include "mission/system/tree/payloadModeTree.h"
|
||||||
#include "mission/system/tree/tcsModeTree.h"
|
|
||||||
#include "mission/tcs/defs.h"
|
#include "mission/tcs/defs.h"
|
||||||
|
|
||||||
void dummy::createDummies(DummyCfg cfg, PowerSwitchIF& pwrSwitcher, GpioIF* gpioIF) {
|
void dummy::createDummies(DummyCfg cfg, PowerSwitchIF& pwrSwitcher, GpioIF* gpioIF) {
|
||||||
|
@ -17,8 +17,8 @@
|
|||||||
#include <mission/payload/ScexDeviceHandler.h>
|
#include <mission/payload/ScexDeviceHandler.h>
|
||||||
#include <mission/system/acs/SusAssembly.h>
|
#include <mission/system/acs/SusAssembly.h>
|
||||||
#include <mission/system/acs/SusFdir.h>
|
#include <mission/system/acs/SusFdir.h>
|
||||||
#include <mission/system/fdir/RtdFdir.h>
|
#include <mission/system/tcs/RtdFdir.h>
|
||||||
#include <mission/system/objects/TcsBoardAssembly.h>
|
#include <mission/system/tcs/TcsBoardAssembly.h>
|
||||||
#include <mission/tcs/Max31865EiveHandler.h>
|
#include <mission/tcs/Max31865EiveHandler.h>
|
||||||
|
|
||||||
#include "OBSWConfig.h"
|
#include "OBSWConfig.h"
|
||||||
@ -27,8 +27,8 @@
|
|||||||
#include "devices/gpioIds.h"
|
#include "devices/gpioIds.h"
|
||||||
#include "eive/definitions.h"
|
#include "eive/definitions.h"
|
||||||
#include "mission/system/acs/acsModeTree.h"
|
#include "mission/system/acs/acsModeTree.h"
|
||||||
|
#include "mission/system/tcs/tcsModeTree.h"
|
||||||
#include "mission/system/tree/payloadModeTree.h"
|
#include "mission/system/tree/payloadModeTree.h"
|
||||||
#include "mission/system/tree/tcsModeTree.h"
|
|
||||||
#include "mission/tcs/defs.h"
|
#include "mission/tcs/defs.h"
|
||||||
|
|
||||||
void ObjectFactory::createSunSensorComponents(GpioIF* gpioComIF, SpiComIF* spiComIF,
|
void ObjectFactory::createSunSensorComponents(GpioIF* gpioComIF, SpiComIF* spiComIF,
|
||||||
|
@ -122,13 +122,14 @@ ReturnValue_t AcsBoardPolling::sendMessage(CookieIF* cookie, const uint8_t* send
|
|||||||
} else {
|
} else {
|
||||||
sif::warning << "AcsBoardPolling: Unknown ADIS type" << std::endl;
|
sif::warning << "AcsBoardPolling: Unknown ADIS type" << std::endl;
|
||||||
}
|
}
|
||||||
|
adis.replyResult = returnvalue::FAILED;
|
||||||
adis.performStartup = true;
|
adis.performStartup = true;
|
||||||
} else if (req->mode == acs::SimpleSensorMode::OFF) {
|
} else if (req->mode == acs::SimpleSensorMode::OFF) {
|
||||||
adis.performStartup = false;
|
adis.performStartup = false;
|
||||||
adis.ownReply.cfgWasSet = false;
|
adis.ownReply.cfgWasSet = false;
|
||||||
adis.ownReply.dataWasSet = false;
|
adis.ownReply.dataWasSet = false;
|
||||||
|
adis.replyResult = returnvalue::OK;
|
||||||
}
|
}
|
||||||
adis.replyResult = returnvalue::FAILED;
|
|
||||||
adis.mode = req->mode;
|
adis.mode = req->mode;
|
||||||
}
|
}
|
||||||
return returnvalue::OK;
|
return returnvalue::OK;
|
||||||
@ -144,10 +145,11 @@ ReturnValue_t AcsBoardPolling::sendMessage(CookieIF* cookie, const uint8_t* send
|
|||||||
if (req->mode == acs::SimpleSensorMode::NORMAL) {
|
if (req->mode == acs::SimpleSensorMode::NORMAL) {
|
||||||
std::memcpy(gyro.sensorCfg, req->ctrlRegs, 5);
|
std::memcpy(gyro.sensorCfg, req->ctrlRegs, 5);
|
||||||
gyro.performStartup = true;
|
gyro.performStartup = true;
|
||||||
|
gyro.replyResult = returnvalue::FAILED;
|
||||||
} else {
|
} else {
|
||||||
gyro.ownReply.cfgWasSet = false;
|
gyro.ownReply.cfgWasSet = false;
|
||||||
|
gyro.replyResult = returnvalue::OK;
|
||||||
}
|
}
|
||||||
gyro.replyResult = returnvalue::FAILED;
|
|
||||||
gyro.mode = req->mode;
|
gyro.mode = req->mode;
|
||||||
}
|
}
|
||||||
return returnvalue::OK;
|
return returnvalue::OK;
|
||||||
@ -162,11 +164,12 @@ ReturnValue_t AcsBoardPolling::sendMessage(CookieIF* cookie, const uint8_t* send
|
|||||||
if (req->mode != mgm.mode) {
|
if (req->mode != mgm.mode) {
|
||||||
if (req->mode == acs::SimpleSensorMode::NORMAL) {
|
if (req->mode == acs::SimpleSensorMode::NORMAL) {
|
||||||
mgm.performStartup = true;
|
mgm.performStartup = true;
|
||||||
|
mgm.replyResult = returnvalue::FAILED;
|
||||||
} else {
|
} else {
|
||||||
mgm.ownReply.dataWasSet = false;
|
mgm.ownReply.dataWasSet = false;
|
||||||
|
mgm.replyResult = returnvalue::OK;
|
||||||
mgm.ownReply.temperatureWasSet = false;
|
mgm.ownReply.temperatureWasSet = false;
|
||||||
}
|
}
|
||||||
mgm.replyResult = returnvalue::FAILED;
|
|
||||||
mgm.mode = req->mode;
|
mgm.mode = req->mode;
|
||||||
}
|
}
|
||||||
return returnvalue::OK;
|
return returnvalue::OK;
|
||||||
@ -181,10 +184,11 @@ ReturnValue_t AcsBoardPolling::sendMessage(CookieIF* cookie, const uint8_t* send
|
|||||||
if (req->mode != mgm.mode) {
|
if (req->mode != mgm.mode) {
|
||||||
if (req->mode == acs::SimpleSensorMode::NORMAL) {
|
if (req->mode == acs::SimpleSensorMode::NORMAL) {
|
||||||
mgm.performStartup = true;
|
mgm.performStartup = true;
|
||||||
|
mgm.replyResult = returnvalue::FAILED;
|
||||||
} else {
|
} else {
|
||||||
mgm.ownReply.dataWasRead = false;
|
mgm.ownReply.dataWasRead = false;
|
||||||
|
mgm.replyResult = returnvalue::OK;
|
||||||
}
|
}
|
||||||
mgm.replyResult = returnvalue::FAILED;
|
|
||||||
mgm.mode = req->mode;
|
mgm.mode = req->mode;
|
||||||
}
|
}
|
||||||
return returnvalue::OK;
|
return returnvalue::OK;
|
||||||
|
@ -17,6 +17,10 @@
|
|||||||
#include "mission/utility/ProgressPrinter.h"
|
#include "mission/utility/ProgressPrinter.h"
|
||||||
#include "mission/utility/Timestamp.h"
|
#include "mission/utility/Timestamp.h"
|
||||||
|
|
||||||
|
extern "C" {
|
||||||
|
#include <sagitta/client/actionreq.h>
|
||||||
|
}
|
||||||
|
|
||||||
using namespace returnvalue;
|
using namespace returnvalue;
|
||||||
|
|
||||||
StrComHandler::StrComHandler(object_id_t objectId) : SystemObject(objectId) {
|
StrComHandler::StrComHandler(object_id_t objectId) : SystemObject(objectId) {
|
||||||
@ -305,6 +309,7 @@ ReturnValue_t StrComHandler::performImageUpload() {
|
|||||||
uint32_t imageSize = 0;
|
uint32_t imageSize = 0;
|
||||||
struct UploadActionRequest uploadReq;
|
struct UploadActionRequest uploadReq;
|
||||||
uploadReq.position = 0;
|
uploadReq.position = 0;
|
||||||
|
size_t writtenBytes = 0;
|
||||||
#ifdef XIPHOS_Q7S
|
#ifdef XIPHOS_Q7S
|
||||||
if (not sdcMan->getActiveSdCard()) {
|
if (not sdcMan->getActiveSdCard()) {
|
||||||
return HasFileSystemIF::FILESYSTEM_INACTIVE;
|
return HasFileSystemIF::FILESYSTEM_INACTIVE;
|
||||||
@ -327,7 +332,9 @@ ReturnValue_t StrComHandler::performImageUpload() {
|
|||||||
#if OBSW_DEBUG_STARTRACKER == 1
|
#if OBSW_DEBUG_STARTRACKER == 1
|
||||||
ProgressPrinter progressPrinter("Image upload", imageSize);
|
ProgressPrinter progressPrinter("Image upload", imageSize);
|
||||||
#endif /* OBSW_DEBUG_STARTRACKER == 1 */
|
#endif /* OBSW_DEBUG_STARTRACKER == 1 */
|
||||||
while ((uploadReq.position + 1) * SIZE_IMAGE_PART < imageSize) {
|
size_t fullChunks = imageSize / SIZE_IMAGE_PART;
|
||||||
|
size_t remainder = imageSize % SIZE_IMAGE_PART;
|
||||||
|
for (size_t idx = 0; idx < fullChunks; idx++) {
|
||||||
if (terminate) {
|
if (terminate) {
|
||||||
return returnvalue::OK;
|
return returnvalue::OK;
|
||||||
}
|
}
|
||||||
@ -346,6 +353,7 @@ ReturnValue_t StrComHandler::performImageUpload() {
|
|||||||
progressPrinter.print((uploadReq.position + 1) * SIZE_IMAGE_PART);
|
progressPrinter.print((uploadReq.position + 1) * SIZE_IMAGE_PART);
|
||||||
#endif /* OBSW_DEBUG_STARTRACKER == 1 */
|
#endif /* OBSW_DEBUG_STARTRACKER == 1 */
|
||||||
uploadReq.position++;
|
uploadReq.position++;
|
||||||
|
writtenBytes += SIZE_IMAGE_PART;
|
||||||
|
|
||||||
// This does a bit of delaying roughly every second
|
// This does a bit of delaying roughly every second
|
||||||
if (uploadReq.position % 50 == 0) {
|
if (uploadReq.position % 50 == 0) {
|
||||||
@ -353,12 +361,11 @@ ReturnValue_t StrComHandler::performImageUpload() {
|
|||||||
TaskFactory::delayTask(2);
|
TaskFactory::delayTask(2);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (remainder > 0) {
|
||||||
std::memset(uploadReq.data, 0, sizeof(uploadReq.data));
|
std::memset(uploadReq.data, 0, sizeof(uploadReq.data));
|
||||||
uint32_t remainder = imageSize - uploadReq.position * SIZE_IMAGE_PART;
|
file.seekg(fullChunks * SIZE_IMAGE_PART, file.beg);
|
||||||
file.seekg(uploadReq.position * SIZE_IMAGE_PART, file.beg);
|
|
||||||
file.read(reinterpret_cast<char*>(uploadReq.data), remainder);
|
file.read(reinterpret_cast<char*>(uploadReq.data), remainder);
|
||||||
file.close();
|
file.close();
|
||||||
uploadReq.position++;
|
|
||||||
arc_pack_upload_action_req(&uploadReq, cmdBuf.data(), &size);
|
arc_pack_upload_action_req(&uploadReq, cmdBuf.data(), &size);
|
||||||
result = sendAndRead(size, uploadReq.position);
|
result = sendAndRead(size, uploadReq.position);
|
||||||
if (result != returnvalue::OK) {
|
if (result != returnvalue::OK) {
|
||||||
@ -368,6 +375,7 @@ ReturnValue_t StrComHandler::performImageUpload() {
|
|||||||
if (result != returnvalue::OK) {
|
if (result != returnvalue::OK) {
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
#if OBSW_DEBUG_STARTRACKER == 1
|
#if OBSW_DEBUG_STARTRACKER == 1
|
||||||
progressPrinter.print((uploadReq.position + 1) * SIZE_IMAGE_PART);
|
progressPrinter.print((uploadReq.position + 1) * SIZE_IMAGE_PART);
|
||||||
#endif /* OBSW_DEBUG_STARTRACKER == 1 */
|
#endif /* OBSW_DEBUG_STARTRACKER == 1 */
|
||||||
|
@ -18,10 +18,6 @@
|
|||||||
#include "fsfw/tasks/ExecutableObjectIF.h"
|
#include "fsfw/tasks/ExecutableObjectIF.h"
|
||||||
#include "fsfw_hal/linux/serial/SerialComIF.h"
|
#include "fsfw_hal/linux/serial/SerialComIF.h"
|
||||||
|
|
||||||
extern "C" {
|
|
||||||
#include <sagitta/client/arc_client.h>
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Helper class for the star tracker handler to accelerate large data transfers.
|
* @brief Helper class for the star tracker handler to accelerate large data transfers.
|
||||||
*
|
*
|
||||||
@ -176,7 +172,7 @@ class StrComHandler : public SystemObject, public DeviceCommunicationIF, public
|
|||||||
static const uint32_t FLASH_REGION_SIZE = 0x20000;
|
static const uint32_t FLASH_REGION_SIZE = 0x20000;
|
||||||
|
|
||||||
struct ImageDownload {
|
struct ImageDownload {
|
||||||
static const uint32_t LAST_POSITION = 4095;
|
static const uint32_t LAST_POSITION = 4096;
|
||||||
};
|
};
|
||||||
|
|
||||||
static const uint32_t MAX_POLLS = 10000;
|
static const uint32_t MAX_POLLS = 10000;
|
||||||
|
@ -69,11 +69,13 @@ ReturnValue_t SusPolling::sendMessage(CookieIF* cookie, const uint8_t* sendData,
|
|||||||
if (susDevs[susIdx].mode != susReq->mode) {
|
if (susDevs[susIdx].mode != susReq->mode) {
|
||||||
if (susReq->mode == acs::SimpleSensorMode::NORMAL) {
|
if (susReq->mode == acs::SimpleSensorMode::NORMAL) {
|
||||||
susDevs[susIdx].performStartup = true;
|
susDevs[susIdx].performStartup = true;
|
||||||
|
susDevs[susIdx].replyResult = returnvalue::FAILED;
|
||||||
} else {
|
} else {
|
||||||
susDevs[susIdx].ownReply.cfgWasSet = false;
|
susDevs[susIdx].ownReply.cfgWasSet = false;
|
||||||
susDevs[susIdx].ownReply.dataWasSet = false;
|
susDevs[susIdx].ownReply.dataWasSet = false;
|
||||||
|
// We are off now, but DHB wants a proper reply.
|
||||||
|
susDevs[susIdx].replyResult = returnvalue::OK;
|
||||||
}
|
}
|
||||||
susDevs[susIdx].replyResult = returnvalue::FAILED;
|
|
||||||
susDevs[susIdx].mode = susReq->mode;
|
susDevs[susIdx].mode = susReq->mode;
|
||||||
}
|
}
|
||||||
if (state == InternalState::IDLE) {
|
if (state == InternalState::IDLE) {
|
||||||
|
@ -1084,6 +1084,7 @@ ReturnValue_t StarTrackerHandler::initializeLocalDataPool(localpool::DataPool& l
|
|||||||
localDataPoolMap.emplace(startracker::LISA_QZ, new PoolEntry<float>({0}));
|
localDataPoolMap.emplace(startracker::LISA_QZ, new PoolEntry<float>({0}));
|
||||||
localDataPoolMap.emplace(startracker::LISA_PERC_CLOSE, new PoolEntry<float>({0}));
|
localDataPoolMap.emplace(startracker::LISA_PERC_CLOSE, new PoolEntry<float>({0}));
|
||||||
localDataPoolMap.emplace(startracker::LISA_NR_CLOSE, new PoolEntry<uint8_t>({0}));
|
localDataPoolMap.emplace(startracker::LISA_NR_CLOSE, new PoolEntry<uint8_t>({0}));
|
||||||
|
localDataPoolMap.emplace(startracker::STR_MODE, new PoolEntry<uint8_t>({0}));
|
||||||
localDataPoolMap.emplace(startracker::TRUST_WORTHY, new PoolEntry<uint8_t>({0}));
|
localDataPoolMap.emplace(startracker::TRUST_WORTHY, new PoolEntry<uint8_t>({0}));
|
||||||
localDataPoolMap.emplace(startracker::STABLE_COUNT, new PoolEntry<uint32_t>({0}));
|
localDataPoolMap.emplace(startracker::STABLE_COUNT, new PoolEntry<uint32_t>({0}));
|
||||||
localDataPoolMap.emplace(startracker::SOLUTION_STRATEGY, new PoolEntry<uint8_t>({0}));
|
localDataPoolMap.emplace(startracker::SOLUTION_STRATEGY, new PoolEntry<uint8_t>({0}));
|
||||||
|
@ -9,7 +9,7 @@ static const char PROPERTIES[] = "properties";
|
|||||||
static const char NAME[] = "name";
|
static const char NAME[] = "name";
|
||||||
static const char VALUE[] = "value";
|
static const char VALUE[] = "value";
|
||||||
|
|
||||||
static const char LIMITS[] = "limits";
|
static const char LIMITS[] = "Limits";
|
||||||
static const char ACTION[] = "action";
|
static const char ACTION[] = "action";
|
||||||
static const char FPGA18CURRENT[] = "FPGA18Current";
|
static const char FPGA18CURRENT[] = "FPGA18Current";
|
||||||
static const char FPGA25CURRENT[] = "FPGA25Current";
|
static const char FPGA25CURRENT[] = "FPGA25Current";
|
||||||
@ -22,20 +22,20 @@ static const char CMOSVRESCURRENT[] = "CMOSVResCurrent";
|
|||||||
static const char CMOS_TEMPERATURE[] = "CMOSTemperature";
|
static const char CMOS_TEMPERATURE[] = "CMOSTemperature";
|
||||||
static const char MCU_TEMPERATURE[] = "MCUTemperature";
|
static const char MCU_TEMPERATURE[] = "MCUTemperature";
|
||||||
|
|
||||||
static const char MOUNTING[] = "mounting";
|
static const char MOUNTING[] = "Mounting";
|
||||||
static const char qw[] = "qw";
|
static const char qw[] = "qw";
|
||||||
static const char qx[] = "qx";
|
static const char qx[] = "qx";
|
||||||
static const char qy[] = "qy";
|
static const char qy[] = "qy";
|
||||||
static const char qz[] = "qz";
|
static const char qz[] = "qz";
|
||||||
|
|
||||||
static const char IMAGE_PROCESSOR[] = "imageprocessor";
|
static const char IMAGE_PROCESSOR[] = "ImageProcessor";
|
||||||
static const char IMAGE_PROCESSOR_MODE[] = "mode";
|
static const char IMAGE_PROCESSOR_MODE[] = "mode";
|
||||||
static const char STORE[] = "store";
|
static const char STORE[] = "store";
|
||||||
static const char SIGNAL_THRESHOLD[] = "signalThreshold";
|
static const char SIGNAL_THRESHOLD[] = "signalThreshold";
|
||||||
static const char IMAGE_PROCESSOR_DARK_THRESHOLD[] = "darkThreshold";
|
static const char IMAGE_PROCESSOR_DARK_THRESHOLD[] = "darkThreshold";
|
||||||
static const char BACKGROUND_COMPENSATION[] = "backgroundcompensation";
|
static const char BACKGROUND_COMPENSATION[] = "backgroundcompensation";
|
||||||
|
|
||||||
static const char CAMERA[] = "camera";
|
static const char CAMERA[] = "Camera";
|
||||||
static const char MODE[] = "mode";
|
static const char MODE[] = "mode";
|
||||||
static const char FOCALLENGTH[] = "focallength";
|
static const char FOCALLENGTH[] = "focallength";
|
||||||
static const char EXPOSURE[] = "exposure";
|
static const char EXPOSURE[] = "exposure";
|
||||||
@ -77,7 +77,7 @@ static const char ENABLE_HISTOGRAM[] = "enableHistogram";
|
|||||||
static const char ENABLE_CONTRAST[] = "enableContrast";
|
static const char ENABLE_CONTRAST[] = "enableContrast";
|
||||||
static const char BIN_MODE[] = "binMode";
|
static const char BIN_MODE[] = "binMode";
|
||||||
|
|
||||||
static const char CENTROIDING[] = "centroiding";
|
static const char CENTROIDING[] = "Centroiding";
|
||||||
static const char ENABLE_FILTER[] = "enableFilter";
|
static const char ENABLE_FILTER[] = "enableFilter";
|
||||||
static const char MAX_QUALITY[] = "maxquality";
|
static const char MAX_QUALITY[] = "maxquality";
|
||||||
static const char DARK_THRESHOLD[] = "darkthreshold";
|
static const char DARK_THRESHOLD[] = "darkthreshold";
|
||||||
@ -92,7 +92,7 @@ static const char TRANSMATRIX_01[] = "transmatrix01";
|
|||||||
static const char TRANSMATRIX_10[] = "transmatrix10";
|
static const char TRANSMATRIX_10[] = "transmatrix10";
|
||||||
static const char TRANSMATRIX_11[] = "transmatrix11";
|
static const char TRANSMATRIX_11[] = "transmatrix11";
|
||||||
|
|
||||||
static const char LISA[] = "lisa";
|
static const char LISA[] = "LISA";
|
||||||
static const char LISA_MODE[] = "mode";
|
static const char LISA_MODE[] = "mode";
|
||||||
static const char PREFILTER_DIST_THRESHOLD[] = "prefilterDistThreshold";
|
static const char PREFILTER_DIST_THRESHOLD[] = "prefilterDistThreshold";
|
||||||
static const char PREFILTER_ANGLE_THRESHOLD[] = "prefilterAngleThreshold";
|
static const char PREFILTER_ANGLE_THRESHOLD[] = "prefilterAngleThreshold";
|
||||||
@ -108,29 +108,29 @@ static const char MAX_COMBINATIONS[] = "max_combinations";
|
|||||||
static const char NR_STARS_STOP[] = "nr_stars_stop";
|
static const char NR_STARS_STOP[] = "nr_stars_stop";
|
||||||
static const char FRACTION_CLOSE_STOP[] = "fraction_close_stop";
|
static const char FRACTION_CLOSE_STOP[] = "fraction_close_stop";
|
||||||
|
|
||||||
static const char MATCHING[] = "matching";
|
static const char MATCHING[] = "Matching";
|
||||||
static const char SQUARED_DISTANCE_LIMIT[] = "squaredDistanceLimit";
|
static const char SQUARED_DISTANCE_LIMIT[] = "squaredDistanceLimit";
|
||||||
static const char SQUARED_SHIFT_LIMIT[] = "squaredShiftLimit";
|
static const char SQUARED_SHIFT_LIMIT[] = "squaredShiftLimit";
|
||||||
|
|
||||||
static const char VALIDATION[] = "validation";
|
static const char VALIDATION[] = "Validation";
|
||||||
static const char STABLE_COUNT[] = "stable_count";
|
static const char STABLE_COUNT[] = "stable_count";
|
||||||
static const char MAX_DIFFERENCE[] = "max_difference";
|
static const char MAX_DIFFERENCE[] = "max_difference";
|
||||||
static const char MIN_TRACKER_CONFIDENCE[] = "min_trackerConfidence";
|
static const char MIN_TRACKER_CONFIDENCE[] = "min_trackerConfidence";
|
||||||
static const char MIN_MATCHED_STARS[] = "min_matchedStars";
|
static const char MIN_MATCHED_STARS[] = "min_matchedStars";
|
||||||
|
|
||||||
static const char TRACKING[] = "tracking";
|
static const char TRACKING[] = "Tracking";
|
||||||
static const char THIN_LIMIT[] = "thinLimit";
|
static const char THIN_LIMIT[] = "thinLimit";
|
||||||
static const char OUTLIER_THRESHOLD[] = "outlierThreshold";
|
static const char OUTLIER_THRESHOLD[] = "outlierThreshold";
|
||||||
static const char OUTLIER_THRESHOLD_QUEST[] = "outlierThresholdQUEST";
|
static const char OUTLIER_THRESHOLD_QUEST[] = "outlierThresholdQUEST";
|
||||||
static const char TRACKER_CHOICE[] = "trackerChoice";
|
static const char TRACKER_CHOICE[] = "trackerChoice";
|
||||||
|
|
||||||
static const char ALGO[] = "algo";
|
static const char ALGO[] = "Algo";
|
||||||
static const char L2T_MIN_CONFIDENCE[] = "l2t_minConfidence";
|
static const char L2T_MIN_CONFIDENCE[] = "l2t_minConfidence";
|
||||||
static const char L2T_MIN_MATCHED[] = "l2t_minMatched";
|
static const char L2T_MIN_MATCHED[] = "l2t_minMatched";
|
||||||
static const char T2L_MIN_CONFIDENCE[] = "t2l_minConfidence";
|
static const char T2L_MIN_CONFIDENCE[] = "t2l_minConfidence";
|
||||||
static const char T2L_MIN_MATCHED[] = "t2l_minMatched";
|
static const char T2L_MIN_MATCHED[] = "t2l_minMatched";
|
||||||
|
|
||||||
static const char LOGLEVEL[] = "loglevel";
|
static const char LOGLEVEL[] = "LogLevel";
|
||||||
static const char LOGLEVEL1[] = "loglevel1";
|
static const char LOGLEVEL1[] = "loglevel1";
|
||||||
static const char LOGLEVEL2[] = "loglevel2";
|
static const char LOGLEVEL2[] = "loglevel2";
|
||||||
static const char LOGLEVEL3[] = "loglevel3";
|
static const char LOGLEVEL3[] = "loglevel3";
|
||||||
@ -148,7 +148,7 @@ static const char LOGLEVEL14[] = "loglevel14";
|
|||||||
static const char LOGLEVEL15[] = "loglevel15";
|
static const char LOGLEVEL15[] = "loglevel15";
|
||||||
static const char LOGLEVEL16[] = "loglevel16";
|
static const char LOGLEVEL16[] = "loglevel16";
|
||||||
|
|
||||||
static const char SUBSCRIPTION[] = "subscription";
|
static const char SUBSCRIPTION[] = "Subscription";
|
||||||
static const char TELEMETRY_1[] = "telemetry1";
|
static const char TELEMETRY_1[] = "telemetry1";
|
||||||
static const char TELEMETRY_2[] = "telemetry2";
|
static const char TELEMETRY_2[] = "telemetry2";
|
||||||
static const char TELEMETRY_3[] = "telemetry3";
|
static const char TELEMETRY_3[] = "telemetry3";
|
||||||
@ -166,13 +166,13 @@ static const char TELEMETRY_14[] = "telemetry14";
|
|||||||
static const char TELEMETRY_15[] = "telemetry15";
|
static const char TELEMETRY_15[] = "telemetry15";
|
||||||
static const char TELEMETRY_16[] = "telemetry16";
|
static const char TELEMETRY_16[] = "telemetry16";
|
||||||
|
|
||||||
static const char LOG_SUBSCRIPTION[] = "logsubscription";
|
static const char LOG_SUBSCRIPTION[] = "LogSubscription";
|
||||||
static const char LEVEL1[] = "level1";
|
static const char LEVEL1[] = "level1";
|
||||||
static const char MODULE1[] = "module1";
|
static const char MODULE1[] = "module1";
|
||||||
static const char LEVEL2[] = "level2";
|
static const char LEVEL2[] = "level2";
|
||||||
static const char MODULE2[] = "module2";
|
static const char MODULE2[] = "module2";
|
||||||
|
|
||||||
static const char DEBUG_CAMERA[] = "debugcamera";
|
static const char DEBUG_CAMERA[] = "DebugCamera";
|
||||||
static const char TIMING[] = "timing";
|
static const char TIMING[] = "timing";
|
||||||
static const char TEST[] = "test";
|
static const char TEST[] = "test";
|
||||||
|
|
||||||
|
@ -91,6 +91,7 @@ enum PoolIds : lp_id_t {
|
|||||||
LISA_QZ,
|
LISA_QZ,
|
||||||
LISA_PERC_CLOSE,
|
LISA_PERC_CLOSE,
|
||||||
LISA_NR_CLOSE,
|
LISA_NR_CLOSE,
|
||||||
|
STR_MODE,
|
||||||
TRUST_WORTHY,
|
TRUST_WORTHY,
|
||||||
STABLE_COUNT,
|
STABLE_COUNT,
|
||||||
SOLUTION_STRATEGY,
|
SOLUTION_STRATEGY,
|
||||||
@ -358,7 +359,7 @@ static const uint8_t VERSION_SET_ENTRIES = 5;
|
|||||||
static const uint8_t INTERFACE_SET_ENTRIES = 4;
|
static const uint8_t INTERFACE_SET_ENTRIES = 4;
|
||||||
static const uint8_t POWER_SET_ENTRIES = 18;
|
static const uint8_t POWER_SET_ENTRIES = 18;
|
||||||
static const uint8_t TIME_SET_ENTRIES = 4;
|
static const uint8_t TIME_SET_ENTRIES = 4;
|
||||||
static const uint8_t SOLUTION_SET_ENTRIES = 23;
|
static const uint8_t SOLUTION_SET_ENTRIES = 25;
|
||||||
static const uint8_t HISTOGRAM_SET_ENTRIES = 38;
|
static const uint8_t HISTOGRAM_SET_ENTRIES = 38;
|
||||||
static const uint8_t CHECKSUM_SET_ENTRIES = 1;
|
static const uint8_t CHECKSUM_SET_ENTRIES = 1;
|
||||||
static const uint8_t CAMERA_SET_ENTRIES = 24;
|
static const uint8_t CAMERA_SET_ENTRIES = 24;
|
||||||
@ -682,6 +683,7 @@ class SolutionSet : public StaticLocalDataSet<SOLUTION_SET_ENTRIES> {
|
|||||||
lp_var_t<float>(sid.objectId, PoolIds::LISA_PERC_CLOSE, this);
|
lp_var_t<float>(sid.objectId, PoolIds::LISA_PERC_CLOSE, this);
|
||||||
// Number of close stars in LISA solution
|
// Number of close stars in LISA solution
|
||||||
lp_var_t<uint8_t> lisaNrClose = lp_var_t<uint8_t>(sid.objectId, PoolIds::LISA_NR_CLOSE, this);
|
lp_var_t<uint8_t> lisaNrClose = lp_var_t<uint8_t>(sid.objectId, PoolIds::LISA_NR_CLOSE, this);
|
||||||
|
lp_var_t<uint8_t> strMode = lp_var_t<uint8_t>(sid.objectId, PoolIds::STR_MODE, this);
|
||||||
// Gives a combined overview of the validation parameters (1 for valid solution, otherwise 0)
|
// Gives a combined overview of the validation parameters (1 for valid solution, otherwise 0)
|
||||||
lp_var_t<uint8_t> isTrustWorthy = lp_var_t<uint8_t>(sid.objectId, PoolIds::TRUST_WORTHY, this);
|
lp_var_t<uint8_t> isTrustWorthy = lp_var_t<uint8_t>(sid.objectId, PoolIds::TRUST_WORTHY, this);
|
||||||
// Number of times the validation criteria was met
|
// Number of times the validation criteria was met
|
||||||
|
@ -30,7 +30,7 @@
|
|||||||
#include <mission/system/acs/AcsBoardAssembly.h>
|
#include <mission/system/acs/AcsBoardAssembly.h>
|
||||||
#include <mission/system/acs/RwAssembly.h>
|
#include <mission/system/acs/RwAssembly.h>
|
||||||
#include <mission/system/acs/SusAssembly.h>
|
#include <mission/system/acs/SusAssembly.h>
|
||||||
#include <mission/system/objects/TcsBoardAssembly.h>
|
#include <mission/system/tcs/TcsBoardAssembly.h>
|
||||||
#include <mission/tcs/HeaterHandler.h>
|
#include <mission/tcs/HeaterHandler.h>
|
||||||
#include <mission/tmtc/CfdpTmFunnel.h>
|
#include <mission/tmtc/CfdpTmFunnel.h>
|
||||||
#include <mission/tmtc/PersistentTmStore.h>
|
#include <mission/tmtc/PersistentTmStore.h>
|
||||||
@ -47,7 +47,7 @@
|
|||||||
#include "mission/cfdp/Config.h"
|
#include "mission/cfdp/Config.h"
|
||||||
#include "mission/system/acs/RwAssembly.h"
|
#include "mission/system/acs/RwAssembly.h"
|
||||||
#include "mission/system/acs/acsModeTree.h"
|
#include "mission/system/acs/acsModeTree.h"
|
||||||
#include "mission/system/tree/tcsModeTree.h"
|
#include "mission/system/tcs/tcsModeTree.h"
|
||||||
#include "mission/tcs/defs.h"
|
#include "mission/tcs/defs.h"
|
||||||
#include "mission/tmtc/tmFilters.h"
|
#include "mission/tmtc/tmFilters.h"
|
||||||
#include "objects/systemObjectList.h"
|
#include "objects/systemObjectList.h"
|
||||||
@ -287,15 +287,17 @@ void ObjectFactory::produceGenericObjects(HealthTableIF** healthTable_, PusTmFun
|
|||||||
void ObjectFactory::createGenericHeaterComponents(GpioIF& gpioIF, PowerSwitchIF& pwrSwitcher,
|
void ObjectFactory::createGenericHeaterComponents(GpioIF& gpioIF, PowerSwitchIF& pwrSwitcher,
|
||||||
HeaterHandler*& heaterHandler) {
|
HeaterHandler*& heaterHandler) {
|
||||||
HeaterHelper helper({{
|
HeaterHelper helper({{
|
||||||
{new HealthDevice(objects::HEATER_0_PLOC_PROC_BRD, MessageQueueIF::NO_QUEUE),
|
{new HeaterHealthDev(objects::HEATER_0_PLOC_PROC_BRD, MessageQueueIF::NO_QUEUE),
|
||||||
gpioIds::HEATER_0},
|
gpioIds::HEATER_0},
|
||||||
{new HealthDevice(objects::HEATER_1_PCDU_BRD, MessageQueueIF::NO_QUEUE), gpioIds::HEATER_1},
|
{new HeaterHealthDev(objects::HEATER_1_PCDU_BRD, MessageQueueIF::NO_QUEUE),
|
||||||
{new HealthDevice(objects::HEATER_2_ACS_BRD, MessageQueueIF::NO_QUEUE), gpioIds::HEATER_2},
|
gpioIds::HEATER_1},
|
||||||
{new HealthDevice(objects::HEATER_3_OBC_BRD, MessageQueueIF::NO_QUEUE), gpioIds::HEATER_3},
|
{new HeaterHealthDev(objects::HEATER_2_ACS_BRD, MessageQueueIF::NO_QUEUE), gpioIds::HEATER_2},
|
||||||
{new HealthDevice(objects::HEATER_4_CAMERA, MessageQueueIF::NO_QUEUE), gpioIds::HEATER_4},
|
{new HeaterHealthDev(objects::HEATER_3_OBC_BRD, MessageQueueIF::NO_QUEUE), gpioIds::HEATER_3},
|
||||||
{new HealthDevice(objects::HEATER_5_STR, MessageQueueIF::NO_QUEUE), gpioIds::HEATER_5},
|
{new HeaterHealthDev(objects::HEATER_4_CAMERA, MessageQueueIF::NO_QUEUE), gpioIds::HEATER_4},
|
||||||
{new HealthDevice(objects::HEATER_6_DRO, MessageQueueIF::NO_QUEUE), gpioIds::HEATER_6},
|
{new HeaterHealthDev(objects::HEATER_5_STR, MessageQueueIF::NO_QUEUE), gpioIds::HEATER_5},
|
||||||
{new HealthDevice(objects::HEATER_7_SYRLINKS, MessageQueueIF::NO_QUEUE), gpioIds::HEATER_7},
|
{new HeaterHealthDev(objects::HEATER_6_DRO, MessageQueueIF::NO_QUEUE), gpioIds::HEATER_6},
|
||||||
|
{new HeaterHealthDev(objects::HEATER_7_SYRLINKS, MessageQueueIF::NO_QUEUE),
|
||||||
|
gpioIds::HEATER_7},
|
||||||
}});
|
}});
|
||||||
heaterHandler = new HeaterHandler(objects::HEATER_HANDLER, &gpioIF, helper, &pwrSwitcher,
|
heaterHandler = new HeaterHandler(objects::HEATER_HANDLER, &gpioIF, helper, &pwrSwitcher,
|
||||||
power::Switches::PDU2_CH3_TCS_BOARD_HEATER_IN_8V);
|
power::Switches::PDU2_CH3_TCS_BOARD_HEATER_IN_8V);
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
add_subdirectory(objects)
|
add_subdirectory(objects)
|
||||||
add_subdirectory(tree)
|
add_subdirectory(tree)
|
||||||
add_subdirectory(acs)
|
add_subdirectory(acs)
|
||||||
|
add_subdirectory(tcs)
|
||||||
add_subdirectory(com)
|
add_subdirectory(com)
|
||||||
add_subdirectory(fdir)
|
|
||||||
add_subdirectory(power)
|
add_subdirectory(power)
|
||||||
|
|
||||||
target_sources(
|
target_sources(
|
||||||
|
@ -1 +0,0 @@
|
|||||||
target_sources(${LIB_EIVE_MISSION} PRIVATE RtdFdir.cpp)
|
|
@ -1,4 +1,3 @@
|
|||||||
target_sources(
|
target_sources(
|
||||||
${LIB_EIVE_MISSION}
|
${LIB_EIVE_MISSION} PRIVATE CamSwitcher.cpp PayloadSubsystem.cpp
|
||||||
PRIVATE CamSwitcher.cpp TcsSubsystem.cpp PayloadSubsystem.cpp
|
Stack5VHandler.cpp PowerStateMachineBase.cpp)
|
||||||
Stack5VHandler.cpp PowerStateMachineBase.cpp TcsBoardAssembly.cpp)
|
|
||||||
|
@ -1,57 +0,0 @@
|
|||||||
#include "SyrlinksAssembly.h"
|
|
||||||
|
|
||||||
#include <eive/objects.h>
|
|
||||||
|
|
||||||
using namespace returnvalue;
|
|
||||||
|
|
||||||
SyrlinksAssembly::SyrlinksAssembly(object_id_t objectId) : AssemblyBase(objectId) {
|
|
||||||
ModeListEntry entry;
|
|
||||||
entry.setObject(objects::SYRLINKS_HANDLER);
|
|
||||||
entry.setMode(MODE_OFF);
|
|
||||||
entry.setSubmode(SUBMODE_NONE);
|
|
||||||
commandTable.insert(entry);
|
|
||||||
}
|
|
||||||
|
|
||||||
ReturnValue_t SyrlinksAssembly::commandChildren(Mode_t mode, Submode_t submode) {
|
|
||||||
commandTable[0].setMode(mode);
|
|
||||||
commandTable[0].setSubmode(submode);
|
|
||||||
HybridIterator<ModeListEntry> iter(commandTable.begin(), commandTable.end());
|
|
||||||
if (recoveryState == RECOVERY_IDLE) {
|
|
||||||
ReturnValue_t result = checkAndHandleHealthState(mode, submode);
|
|
||||||
if (result == NEED_TO_CHANGE_HEALTH) {
|
|
||||||
return OK;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
executeTable(iter);
|
|
||||||
return returnvalue::OK;
|
|
||||||
}
|
|
||||||
|
|
||||||
ReturnValue_t SyrlinksAssembly::checkChildrenStateOn(Mode_t wantedMode, Submode_t wantedSubmode) {
|
|
||||||
if (childrenMap[objects::SYRLINKS_HANDLER].mode != wantedMode) {
|
|
||||||
return NOT_ENOUGH_CHILDREN_IN_CORRECT_STATE;
|
|
||||||
}
|
|
||||||
return returnvalue::OK;
|
|
||||||
}
|
|
||||||
|
|
||||||
ReturnValue_t SyrlinksAssembly::isModeCombinationValid(Mode_t mode, Submode_t submode) {
|
|
||||||
if (mode == MODE_ON or mode == DeviceHandlerIF::MODE_NORMAL or mode == MODE_OFF) {
|
|
||||||
return returnvalue::OK;
|
|
||||||
}
|
|
||||||
return returnvalue::FAILED;
|
|
||||||
}
|
|
||||||
|
|
||||||
ReturnValue_t SyrlinksAssembly::checkAndHandleHealthState(Mode_t deviceMode,
|
|
||||||
Submode_t deviceSubmode) {
|
|
||||||
HealthState health = healthHelper.healthTable->getHealth(objects::SYRLINKS_HANDLER);
|
|
||||||
if (health == FAULTY or health == PERMANENT_FAULTY) {
|
|
||||||
overwriteDeviceHealth(objects::SYRLINKS_HANDLER, health);
|
|
||||||
return NEED_TO_CHANGE_HEALTH;
|
|
||||||
} else if (health == EXTERNAL_CONTROL) {
|
|
||||||
modeHelper.setForced(true);
|
|
||||||
}
|
|
||||||
return OK;
|
|
||||||
}
|
|
||||||
|
|
||||||
void SyrlinksAssembly::handleChildrenLostMode(ReturnValue_t result) {
|
|
||||||
startTransition(mode, submode);
|
|
||||||
}
|
|
@ -1,20 +0,0 @@
|
|||||||
#ifndef MISSION_SYSTEM_OBJECTS_SYRLINKSASSEMBLY_H_
|
|
||||||
#define MISSION_SYSTEM_OBJECTS_SYRLINKSASSEMBLY_H_
|
|
||||||
#include <fsfw/devicehandlers/AssemblyBase.h>
|
|
||||||
|
|
||||||
class SyrlinksAssembly : public AssemblyBase {
|
|
||||||
public:
|
|
||||||
SyrlinksAssembly(object_id_t objectId);
|
|
||||||
|
|
||||||
private:
|
|
||||||
FixedArrayList<ModeListEntry, 1> commandTable;
|
|
||||||
|
|
||||||
ReturnValue_t commandChildren(Mode_t mode, Submode_t submode) override;
|
|
||||||
ReturnValue_t checkChildrenStateOn(Mode_t wantedMode, Submode_t wantedSubmode) override;
|
|
||||||
ReturnValue_t isModeCombinationValid(Mode_t mode, Submode_t submode) override;
|
|
||||||
void handleChildrenLostMode(ReturnValue_t result) override;
|
|
||||||
|
|
||||||
ReturnValue_t checkAndHandleHealthState(Mode_t deviceMode, Submode_t deviceSubmode);
|
|
||||||
};
|
|
||||||
|
|
||||||
#endif /* MISSION_SYSTEM_OBJECTS_SYRLINKSASSEMBLY_H_ */
|
|
@ -11,8 +11,8 @@
|
|||||||
#include "eive/objects.h"
|
#include "eive/objects.h"
|
||||||
#include "mission/com/defs.h"
|
#include "mission/com/defs.h"
|
||||||
#include "mission/system/acs/acsModeTree.h"
|
#include "mission/system/acs/acsModeTree.h"
|
||||||
|
#include "mission/system/tcs/tcsModeTree.h"
|
||||||
#include "mission/system/tree/payloadModeTree.h"
|
#include "mission/system/tree/payloadModeTree.h"
|
||||||
#include "mission/system/tree/tcsModeTree.h"
|
|
||||||
#include "treeUtil.h"
|
#include "treeUtil.h"
|
||||||
|
|
||||||
namespace {
|
namespace {
|
||||||
|
3
mission/system/tcs/CMakeLists.txt
Normal file
3
mission/system/tcs/CMakeLists.txt
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
target_sources(
|
||||||
|
${LIB_EIVE_MISSION} PRIVATE tcsModeTree.cpp TcsSubsystem.cpp
|
||||||
|
TcsBoardAssembly.cpp RtdFdir.cpp TmpDevFdir.cpp)
|
91
mission/system/tcs/TmpDevFdir.cpp
Normal file
91
mission/system/tcs/TmpDevFdir.cpp
Normal file
@ -0,0 +1,91 @@
|
|||||||
|
#include "TmpDevFdir.h"
|
||||||
|
|
||||||
|
#include <fsfw/devicehandlers/DeviceHandlerIF.h>
|
||||||
|
#include <fsfw/modes/HasModesIF.h>
|
||||||
|
#include <fsfw/power/Fuse.h>
|
||||||
|
#include <fsfw/thermal/ThermalComponentIF.h>
|
||||||
|
|
||||||
|
TmpDevFdir::TmpDevFdir(object_id_t sensorId)
|
||||||
|
: DeviceHandlerFailureIsolation(sensorId, objects::NO_OBJECT) {}
|
||||||
|
|
||||||
|
ReturnValue_t TmpDevFdir::eventReceived(EventMessage* event) {
|
||||||
|
if (isFdirInActionOrAreWeFaulty(event)) {
|
||||||
|
return returnvalue::OK;
|
||||||
|
}
|
||||||
|
ReturnValue_t result = returnvalue::FAILED;
|
||||||
|
switch (event->getEvent()) {
|
||||||
|
case HasModesIF::MODE_TRANSITION_FAILED:
|
||||||
|
case HasModesIF::OBJECT_IN_INVALID_MODE:
|
||||||
|
case DeviceHandlerIF::DEVICE_WANTS_HARD_REBOOT:
|
||||||
|
// We'll try a recovery as long as defined in MAX_REBOOT.
|
||||||
|
// Might cause some AssemblyBase cycles, so keep number low.
|
||||||
|
// Ignored for TMP device, no way to power cycle it without going to OFF/BOOT mode.
|
||||||
|
// handleRecovery(event->getEvent());
|
||||||
|
break;
|
||||||
|
case DeviceHandlerIF::DEVICE_INTERPRETING_REPLY_FAILED:
|
||||||
|
case DeviceHandlerIF::DEVICE_READING_REPLY_FAILED:
|
||||||
|
case DeviceHandlerIF::DEVICE_UNREQUESTED_REPLY:
|
||||||
|
case DeviceHandlerIF::DEVICE_UNKNOWN_REPLY: // Some DH's generate generic reply-ids.
|
||||||
|
case DeviceHandlerIF::DEVICE_BUILDING_COMMAND_FAILED:
|
||||||
|
// These faults all mean that there were stupid replies from a device.
|
||||||
|
// With now way to do a recovery, set the device to faulty immediately.
|
||||||
|
setFaulty(event->getEvent());
|
||||||
|
break;
|
||||||
|
case DeviceHandlerIF::DEVICE_SENDING_COMMAND_FAILED:
|
||||||
|
case DeviceHandlerIF::DEVICE_REQUESTING_REPLY_FAILED:
|
||||||
|
// The two above should never be confirmed.
|
||||||
|
case DeviceHandlerIF::DEVICE_MISSED_REPLY:
|
||||||
|
result = sendConfirmationRequest(event);
|
||||||
|
if (result == returnvalue::OK) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
// else
|
||||||
|
setFaulty(event->getEvent());
|
||||||
|
break;
|
||||||
|
case StorageManagerIF::GET_DATA_FAILED:
|
||||||
|
case StorageManagerIF::STORE_DATA_FAILED:
|
||||||
|
// Rather strange bugs, occur in RAW mode only. Ignore.
|
||||||
|
break;
|
||||||
|
case DeviceHandlerIF::INVALID_DEVICE_COMMAND:
|
||||||
|
// Ignore, is bad configuration. We can't do anything in flight.
|
||||||
|
break;
|
||||||
|
case HasHealthIF::HEALTH_INFO:
|
||||||
|
case HasModesIF::MODE_INFO:
|
||||||
|
case HasModesIF::CHANGING_MODE:
|
||||||
|
// Do nothing, but mark as handled.
|
||||||
|
break;
|
||||||
|
//****Thermal*****
|
||||||
|
case ThermalComponentIF::COMPONENT_TEMP_LOW:
|
||||||
|
case ThermalComponentIF::COMPONENT_TEMP_HIGH:
|
||||||
|
case ThermalComponentIF::COMPONENT_TEMP_OOL_LOW:
|
||||||
|
case ThermalComponentIF::COMPONENT_TEMP_OOL_HIGH:
|
||||||
|
// Well, the device is not really faulty, but it is required to stay off as long as possible.
|
||||||
|
setFaulty(event->getEvent());
|
||||||
|
break;
|
||||||
|
case ThermalComponentIF::TEMP_NOT_IN_OP_RANGE:
|
||||||
|
// Ignore, is information only.
|
||||||
|
break;
|
||||||
|
//*******Default monitoring variables. Are currently not used.*****
|
||||||
|
// case DeviceHandlerIF::MONITORING_LIMIT_EXCEEDED:
|
||||||
|
// setFaulty(event->getEvent());
|
||||||
|
// break;
|
||||||
|
// case DeviceHandlerIF::MONITORING_AMBIGUOUS:
|
||||||
|
// break;
|
||||||
|
default:
|
||||||
|
// We don't know the event, someone else should handle it.
|
||||||
|
return returnvalue::FAILED;
|
||||||
|
}
|
||||||
|
return returnvalue::OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
void TmpDevFdir::eventConfirmed(EventMessage* event) {
|
||||||
|
switch (event->getEvent()) {
|
||||||
|
case DeviceHandlerIF::DEVICE_SENDING_COMMAND_FAILED:
|
||||||
|
case DeviceHandlerIF::DEVICE_REQUESTING_REPLY_FAILED:
|
||||||
|
case DeviceHandlerIF::DEVICE_MISSED_REPLY:
|
||||||
|
setFaulty(event->getEvent());
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
20
mission/system/tcs/TmpDevFdir.h
Normal file
20
mission/system/tcs/TmpDevFdir.h
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
#ifndef MISSION_SYSTEM_TCS_TMPDEVFDIR_H_
|
||||||
|
#define MISSION_SYSTEM_TCS_TMPDEVFDIR_H_
|
||||||
|
#include <fsfw/devicehandlers/DeviceHandlerFailureIsolation.h>
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Special FDIR because we can not simply power cycle the TMP devices which are powered by the
|
||||||
|
* 3.3 V stack and there is also no way to logically reset or re-configure the TMP devices in
|
||||||
|
* any way. In general, instead of doing a recovery, the TMP devices should be set faulty
|
||||||
|
* immediately for the EIVE project.
|
||||||
|
*/
|
||||||
|
class TmpDevFdir : public DeviceHandlerFailureIsolation {
|
||||||
|
public:
|
||||||
|
TmpDevFdir(object_id_t sensorId);
|
||||||
|
|
||||||
|
private:
|
||||||
|
ReturnValue_t eventReceived(EventMessage* event) override;
|
||||||
|
void eventConfirmed(EventMessage* event) override;
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif /* MISSION_SYSTEM_TCS_TMPDEVFDIR_H_ */
|
@ -1,7 +1,7 @@
|
|||||||
#ifndef MISSION_SYSTEM_TREE_TCSMODETREE_H_
|
#ifndef MISSION_SYSTEM_TREE_TCSMODETREE_H_
|
||||||
#define MISSION_SYSTEM_TREE_TCSMODETREE_H_
|
#define MISSION_SYSTEM_TREE_TCSMODETREE_H_
|
||||||
|
|
||||||
#include <mission/system/objects/TcsSubsystem.h>
|
#include <mission/system/tcs/TcsSubsystem.h>
|
||||||
|
|
||||||
namespace satsystem {
|
namespace satsystem {
|
||||||
namespace tcs {
|
namespace tcs {
|
@ -1 +1 @@
|
|||||||
target_sources(${LIB_EIVE_MISSION} PRIVATE payloadModeTree.cpp tcsModeTree.cpp)
|
target_sources(${LIB_EIVE_MISSION} PRIVATE payloadModeTree.cpp)
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
target_sources(
|
target_sources(
|
||||||
${LIB_EIVE_MISSION} PRIVATE HeaterHandler.cpp max1227.cpp
|
${LIB_EIVE_MISSION}
|
||||||
Max31865EiveHandler.cpp Tmp1075Handler.cpp)
|
PRIVATE HeaterHandler.cpp max1227.cpp Max31865EiveHandler.cpp
|
||||||
|
Tmp1075Handler.cpp HeaterHealthDev.cpp)
|
||||||
|
@ -15,6 +15,7 @@
|
|||||||
#include <fsfw/tasks/ExecutableObjectIF.h>
|
#include <fsfw/tasks/ExecutableObjectIF.h>
|
||||||
#include <fsfw/timemanager/Countdown.h>
|
#include <fsfw/timemanager/Countdown.h>
|
||||||
#include <fsfw_hal/common/gpio/GpioIF.h>
|
#include <fsfw_hal/common/gpio/GpioIF.h>
|
||||||
|
#include <mission/tcs/HeaterHealthDev.h>
|
||||||
|
|
||||||
#include <array>
|
#include <array>
|
||||||
#include <utility>
|
#include <utility>
|
||||||
@ -27,7 +28,7 @@
|
|||||||
class PowerSwitchIF;
|
class PowerSwitchIF;
|
||||||
class HealthTableIF;
|
class HealthTableIF;
|
||||||
|
|
||||||
using HeaterPair = std::pair<HealthDevice*, gpioId_t>;
|
using HeaterPair = std::pair<HeaterHealthDev*, gpioId_t>;
|
||||||
|
|
||||||
struct HeaterHelper {
|
struct HeaterHelper {
|
||||||
public:
|
public:
|
||||||
|
12
mission/tcs/HeaterHealthDev.cpp
Normal file
12
mission/tcs/HeaterHealthDev.cpp
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
#include "HeaterHealthDev.h"
|
||||||
|
|
||||||
|
HeaterHealthDev::HeaterHealthDev(object_id_t setObjectId, MessageQueueId_t parentQueue)
|
||||||
|
: HealthDevice(setObjectId, parentQueue) {}
|
||||||
|
|
||||||
|
ReturnValue_t HeaterHealthDev::setHealth(HealthState health) {
|
||||||
|
// Does not make sense for a simple heater.
|
||||||
|
if (health == HealthState::NEEDS_RECOVERY) {
|
||||||
|
return returnvalue::FAILED;
|
||||||
|
}
|
||||||
|
return HealthDevice::setHealth(health);
|
||||||
|
}
|
12
mission/tcs/HeaterHealthDev.h
Normal file
12
mission/tcs/HeaterHealthDev.h
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
#ifndef MISSION_TCS_HEATERHEALTHDEV_H_
|
||||||
|
#define MISSION_TCS_HEATERHEALTHDEV_H_
|
||||||
|
#include <fsfw/devicehandlers/HealthDevice.h>
|
||||||
|
|
||||||
|
class HeaterHealthDev : public HealthDevice {
|
||||||
|
public:
|
||||||
|
HeaterHealthDev(object_id_t setObjectId, MessageQueueId_t parentQueue);
|
||||||
|
|
||||||
|
ReturnValue_t setHealth(HealthState health) override;
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif /* MISSION_TCS_HEATERHEALTHDEV_H_ */
|
2
thirdparty/sagittactl
vendored
2
thirdparty/sagittactl
vendored
@ -1 +1 @@
|
|||||||
Subproject commit 64332216c193fa6483258060b53fc2842c08dcf4
|
Subproject commit 29e876671a72fcdb0b393e2f692303725f00724f
|
2
tmtc
2
tmtc
@ -1 +1 @@
|
|||||||
Subproject commit f8da9cff7c5d6d6bdd483f90ccefb67b2d1e11a4
|
Subproject commit f57342602da3232c0bfecaecb0c10be6d692b384
|
Loading…
Reference in New Issue
Block a user